Move all other text boxes to new system

These include the room name translator text boxes (which aren't
translated) and the foundlab and foundlab2 text boxes.
This commit is contained in:
Misa 2024-01-21 13:47:26 -08:00 committed by Misa Elizabeth Kai
parent b14ca5e366
commit 3de2c543a5
2 changed files with 30 additions and 6 deletions

View File

@ -271,6 +271,8 @@ namespace roomname_translator
graphics.textboxcenterx();
graphics.textboxtimer(50);
}
graphics.textboxoriginalcontextauto();
graphics.textboxapplyposition();
}
static void save_translation(const char* translation)
@ -293,6 +295,8 @@ namespace roomname_translator
graphics.textboxcenterx();
graphics.textboxtimer(180);
}
graphics.textboxoriginalcontextauto();
graphics.textboxapplyposition();
}
bool held_tab = false;
@ -349,9 +353,11 @@ namespace roomname_translator
if (loc::lang == "en")
{
graphics.createtextboxflipme("ERROR: Can't add EN-EN translation", -1, 176, TEXT_COLOUR("red"));
graphics.textboxoriginalcontextauto();
graphics.textboxprintflags(PR_FONT_8X8);
graphics.textboxcenterx();
graphics.textboxtimer(50);
graphics.textboxapplyposition();
}
else
{

View File

@ -162,6 +162,24 @@ static int getcrewmanfromname(std::string name)
void foundtrinket_textbox1(textboxclass* THIS);
void foundtrinket_textbox2(textboxclass* THIS);
static void foundlab_textbox1(textboxclass* THIS)
{
THIS->lines.clear();
THIS->lines.push_back(loc::gettext("Congratulations!\n\nYou have found the secret lab!"));
THIS->wrap(2);
THIS->centertext();
THIS->pad(1, 1);
}
static void foundlab_textbox2(textboxclass* THIS)
{
THIS->lines.clear();
THIS->lines.push_back(loc::gettext("The secret lab is separate from the rest of the game. You can now come back here at any time by selecting the new SECRET LAB option in the play menu."));
THIS->wrap(0);
}
void scriptclass::run(void)
{
if (!running)
@ -1816,13 +1834,12 @@ void scriptclass::run(void)
graphics.textboxremovefast();
graphics.createtextbox(loc::gettext("Congratulations!\n\nYou have found the secret lab!"), 50, 85, TEXT_COLOUR("gray"));
graphics.createtextbox("", 50, 85, TEXT_COLOUR("gray"));
graphics.textboxprintflags(PR_FONT_INTERFACE);
graphics.textboxwrap(2);
graphics.textboxcentertext();
graphics.textboxpad(1, 1);
graphics.textboxcenterx();
graphics.textboxcentery();
graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundlab_textbox1);
graphics.textboxapplyposition();
if (!game.backgroundtext)
{
@ -1838,11 +1855,12 @@ void scriptclass::run(void)
{
graphics.textboxremovefast();
graphics.createtextbox(loc::gettext("The secret lab is separate from the rest of the game. You can now come back here at any time by selecting the new SECRET LAB option in the play menu."), 50, 85, TEXT_COLOUR("gray"));
graphics.createtextbox("", 50, 85, TEXT_COLOUR("gray"));
graphics.textboxprintflags(PR_FONT_INTERFACE);
graphics.textboxwrap(0);
graphics.textboxcenterx();
graphics.textboxcentery();
graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundlab_textbox2);
graphics.textboxapplyposition();
if (!game.backgroundtext)
{