Optimized x adjustment

This commit is contained in:
Eduardo Quezada D'Ottone 2022-08-25 00:03:43 -04:00 committed by GitHub
parent 17b47de90d
commit 5659f6178f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2928,8 +2928,8 @@ static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTi
if (alignAbilityChars && i == MAX_CHARS_PRINTED)
{
u32 width = GetStringWidth(FONT_SMALL, text1, 0);
while (x1 + width < 64)
x1++;
if (x1 + width < 64)
x1 += 64 - (x1 + width);
}
windowTileData = AddTextPrinterAndCreateWindowOnAbilityPopUp(text1, x1, y, color1, color2, color3, &windowId);