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

@@ -23,6 +23,8 @@ textboxclass::textboxclass(void)
flipme = false;
rand = 0;
print_flags = PR_FONT_LEVEL;
}
void textboxclass::centerx(void)
@@ -102,13 +104,13 @@ void textboxclass::resize(void)
int max = 0;
for (size_t iter = 0; iter < lines.size(); iter++)
{
int len = font::len(PR_FONT_LEVEL, lines[iter]);
int len = font::len(print_flags, lines[iter]);
if (len > (unsigned int)max) max = len;
}
// 16 for the borders
w = max + 16;
h = lines.size()*font::height(PR_FONT_LEVEL) + 16;
h = lines.size()*font::height(print_flags) + 16;
}
void textboxclass::addline(const std::string& t)