Migrate more prints to font::, determine font for most textboxes

Some textboxes need to be in the level font (like room names, cutscene
dialogue, etc - even in the main game), and some need to be in the
interface font (like when you collect a shiny trinket or crewmate). So
most of these textboxes now have graphics.textboxprintflags(font_flag)
as appropriate.

RoomnameTranslator.cpp is now also migrated to the new print system -
in room name translator mode, the room name is now displayed in the 8x8
font if it's untranslated and the level font if it is.
This commit is contained in:
Dav999-v
2023-01-13 05:11:39 +01:00
committed by Misa Elizabeth Kai
parent 6ca83114bc
commit 48a4e19635
11 changed files with 157 additions and 56 deletions

View File

@@ -430,9 +430,9 @@ static void editormenurender(int tr, int tg, int tb)
}
case Menu::ed_music:
{
graphics.bigprint( -1, 65, loc::gettext("Map Music"), tr, tg, tb, true);
font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, 65, loc::gettext("Map Music"), tr, tg, tb);
graphics.PrintWrap( -1, 85, loc::gettext("Current map music:"), tr, tg, tb, true);
font::print_wrap(PR_CEN | PR_CJK_LOW, -1, 85, loc::gettext("Current map music:"), tr, tg, tb);
const char* songname;
switch(cl.levmusic)
{
@@ -1219,13 +1219,13 @@ void editorrender(void)
{
if(i+ed.pagey<(int)ed.sb.size())
{
font::print(PR_FONT_LEVEL, 16, 20+(i*font_height), ed.sb[i+ed.pagey], 123, 111, 218);
font::print(PR_FONT_LEVEL | PR_CJK_LOW, 16, 20+(i*font_height), ed.sb[i+ed.pagey], 123, 111, 218);
}
}
//Draw cursor
if(ed.entframe<2)
{
font::print(PR_FONT_LEVEL, 16+font::len(PR_FONT_LEVEL, ed.sb[ed.pagey+ed.sby]),20+(ed.sby*font_height),"_",123, 111, 218);
font::print(PR_FONT_LEVEL | PR_CJK_LOW, 16+font::len(PR_FONT_LEVEL, ed.sb[ed.pagey+ed.sby]),20+(ed.sby*font_height),"_",123, 111, 218);
}
break;
}