mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Add textbox indexes, update trinket/crew textboxes
This adds an attribute to textboxclass to allow a text box to keep an index that references another text box inside the graphics.textboxes std::vector. This is needed because the second text box of a "You have found a shiny trinket!" or "You have found a lost crewmate!" pair of text boxes explicitly relies on the height of the first text box. With this, I have moved those text boxes over to the new text box translation system. Since the update order now matters, I added a comment to recomputetextboxes() that clarifies that the text boxes must be updated in linear order, starting from 0.
This commit is contained in:
@@ -1525,6 +1525,17 @@ int Graphics::getlinegap(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Graphics::textboxindex(const int index)
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
{
|
||||
vlog_error("textboxindex() out-of-bounds!");
|
||||
return;
|
||||
}
|
||||
|
||||
textboxes[m].other_textbox_index = index;
|
||||
}
|
||||
|
||||
void Graphics::createtextboxreal(
|
||||
const std::string& t,
|
||||
int xp, int yp,
|
||||
|
||||
Reference in New Issue
Block a user