mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 18:04:09 +03:00
Move Comms Relay text boxes to new system
These seemed annoying to do without copy-pasting, because I didn't want to make a separate function for every single dialogue, and I didn't know how to pass through the English text, until I realized that I can just use the existing original.lines vector in the text box to store the English text. After that, getting it translated on-the-fly isn't too bad.
This commit is contained in:
@@ -3367,7 +3367,21 @@ void Graphics::textboxtranslate(const TextboxTranslate translate, const TextboxF
|
||||
textboxes[m].updatetext();
|
||||
}
|
||||
|
||||
void Graphics::textboxcommsrelay(void)
|
||||
static void commsrelay_textbox(textboxclass* THIS)
|
||||
{
|
||||
THIS->lines.clear();
|
||||
|
||||
if (THIS->original.lines.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
THIS->lines.push_back(loc::gettext(THIS->original.lines[0].c_str()));
|
||||
THIS->wrap(11);
|
||||
THIS->resize();
|
||||
THIS->xp = 224 - THIS->w;
|
||||
}
|
||||
|
||||
void Graphics::textboxcommsrelay(const char* text)
|
||||
{
|
||||
// Special treatment for the gamestate textboxes in Comms Relay
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
@@ -3376,8 +3390,8 @@ void Graphics::textboxcommsrelay(void)
|
||||
return;
|
||||
}
|
||||
textboxprintflags(PR_FONT_INTERFACE);
|
||||
textboxwrap(11);
|
||||
textboxes[m].xp = 224 - textboxes[m].w;
|
||||
textboxes[m].original.lines.push_back(text);
|
||||
textboxtranslate(TEXTTRANSLATE_FUNCTION, commsrelay_textbox);
|
||||
}
|
||||
|
||||
int Graphics::crewcolour(const int t)
|
||||
|
||||
Reference in New Issue
Block a user