Vanilla species names fit in health box without narrowing (#4979)
This commit is contained in:
parent
2b40e79ac3
commit
684e8af181
@ -1743,7 +1743,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
break;
|
||||
}
|
||||
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthboxToFit(gDisplayedStringBattle, 0, 3, 2, &windowId, 54);
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthboxToFit(gDisplayedStringBattle, 0, 3, 2, &windowId, 55);
|
||||
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
|
||||
|
||||
21
test/text.c
21
test/text.c
@ -275,7 +275,7 @@ TEST("Item names fit on Shop Screen")
|
||||
TEST("Species names fit on Battle Screen HP box")
|
||||
{
|
||||
u32 i, genderWidthPx;
|
||||
const u32 fontId = FONT_SMALL_NARROWER, widthPx = 54;
|
||||
const u32 fontId = FONT_SMALL_NARROWER, widthPx = 55;
|
||||
u32 species = SPECIES_NONE;
|
||||
genderWidthPx = GetStringWidth(fontId, COMPOUND_STRING("♂"), 0);
|
||||
for (i = 1; i < NUM_SPECIES; i++)
|
||||
@ -501,6 +501,25 @@ TEST("Species names fit on PokeNav Ribbon List Screen")
|
||||
EXPECT_LE(GetStringWidth(fontId, gSpeciesInfo[species].speciesName, 0), widthPx);
|
||||
}
|
||||
|
||||
TEST("Species names fit on Battle Screen HP box for vanilla mons with the default font")
|
||||
{
|
||||
u32 i, genderWidthPx;
|
||||
const u32 fontId = FONT_SMALL, widthPx = 55;
|
||||
u32 species = SPECIES_NONE;
|
||||
genderWidthPx = GetStringWidth(fontId, COMPOUND_STRING("♂"), 0);
|
||||
for (i = 1; i < SPECIES_TURTWIG; i++)
|
||||
{
|
||||
if (IsSpeciesEnabled(i))
|
||||
{
|
||||
PARAMETRIZE_LABEL("%S", gSpeciesInfo[i].speciesName) { species = i; }
|
||||
}
|
||||
}
|
||||
if (gSpeciesInfo[i].genderRatio != MON_GENDERLESS)
|
||||
EXPECT_LE(GetStringWidth(fontId, gSpeciesInfo[species].speciesName, 0) - genderWidthPx, widthPx);
|
||||
else
|
||||
EXPECT_LE(GetStringWidth(fontId, gSpeciesInfo[species].speciesName, 0), widthPx);
|
||||
}
|
||||
|
||||
TEST("Ability names fit on Pokemon Summary Screen")
|
||||
{
|
||||
u32 i;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user