mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Adapt font size as needed for "Credits" title in rolling credits
In Italian, "Credits" is "Riconoscimenti", which runs offscreen with the 3x font size that this title uses in the rolling credits at the end of the game. I'm not sure if the translators saw that specific instance, or thought the limit complaint was about the main menu button all along (which is more prominent and *does* stick out far enough that the complaint could plausibly have been about that, from a translator's perspective!) Either way, it's solved now: this string's width is now checked, and if it will run offscreen at 3x size, it will now be displayed at 2x size instead. The limit has been increased from 13 to 20 in the language files accordingly.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
3b9d3a687b
commit
943362559c
@@ -1766,7 +1766,16 @@ void gamecompleterender(void)
|
||||
font::print(0, 100, 480 + position, loc::gettext("Doctor Victoria"), tr, tg, tb);
|
||||
}
|
||||
|
||||
if (graphics.onscreen(520 + position)) font::print(PR_3X | PR_CEN, -1, 520 + position, loc::gettext("Credits"), tr, tg, tb);
|
||||
if (graphics.onscreen(520 + position))
|
||||
{
|
||||
uint32_t flag = PR_3X;
|
||||
const char* text = loc::gettext("Credits");
|
||||
if (font::len(flag, text) > SCREEN_WIDTH_PIXELS)
|
||||
{
|
||||
flag = PR_2X;
|
||||
}
|
||||
font::print(flag | PR_CEN, -1, 520 + position, text, tr, tg, tb);
|
||||
}
|
||||
|
||||
if (graphics.onscreen(560 + position))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user