1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

Fix position of crewmate in "You have rescued a crew member!" box

At first my CJK changes also misaligned this sprite, and my solution
that time was to position the textbox higher depending on the height
of the textbox, so it would be centered around the crewmate sprite
(which stayed at a hardcoded place onscreen). Recently, #987 changed
these sprites to be relative to the position of the textbox instead of
relative to the screen, which is much more logical, but it stopped
centering these sprites again. But it's an easy fix: simply account for
the extra-added height when adding the sprite in.
This commit is contained in:
Dav999 2023-11-27 23:25:18 +01:00 committed by Misa Elizabeth Kai
parent c9fd9e7924
commit 61c5e18413

View file

@ -702,7 +702,7 @@ void Game::crewmate_textbox(const int color)
float spaces_per_8 = font::len(PR_FONT_INTERFACE, " ")/8.0f;
graphics.textboxpad(SDL_ceilf(5/spaces_per_8), SDL_ceilf(2/spaces_per_8));
graphics.textboxcenterx();
graphics.addsprite(14, 12, 0, color);
graphics.addsprite(14, 12 + extra_cjk_height/2, 0, color);
}
void Game::remaining_textbox(void)