Crew screen tweaks for custom levels.

See #1226 for a full overview with comparison images.
This commit is contained in:
mothbeanie
2025-04-12 13:41:30 -07:00
committed by GitHub
parent d419c6ed5b
commit b0d53e85a0
2 changed files with 40 additions and 30 deletions

View File

@@ -425,22 +425,23 @@ void Graphics::print_level_creator(
int width_for_face = 17;
int total_width = width_for_face + font::len(print_flags, creator.c_str());
int face_x, text_x, sprite_x;
int offset_x = -7;
if (!font::is_rtl(print_flags))
{
face_x = (SCREEN_WIDTH_PIXELS - total_width) / 2;
text_x = face_x + width_for_face;
sprite_x = 7;
sprite_x = 0;
}
else
{
face_x = (SCREEN_WIDTH_PIXELS + total_width) / 2;
text_x = face_x - width_for_face;
face_x -= 10; // sprite origin
sprite_x = 103;
sprite_x = 96;
print_flags |= PR_RIGHT;
}
set_texture_color_mod(grphx.im_sprites, r, g, b);
draw_texture_part(grphx.im_sprites, face_x, y - 1, sprite_x, 2, 10, 10, 1, 1);
draw_texture_part(grphx.im_sprites, face_x + offset_x, y - 3, sprite_x, 0, 24, 12, 1, 1);
set_texture_color_mod(grphx.im_sprites, 255, 255, 255);
font::print(print_flags, text_x, y, creator, r, g, b);
}