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
1 changed files with 1 additions and 1 deletions

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)