mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add textimage for levelcomplete and gamecomplete
`levelcomplete` and `gamecomplete` were hardcoded using textbox colors which were offset by 1. This PR fixes that, no longer requiring slightly-off colors, and instead adding a new property to textboxes which tell the game to display either level complete or game complete.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
b5c9508dd4
commit
103b4d36a1
@@ -54,6 +54,7 @@ scriptclass::scriptclass(void)
|
||||
textbuttons = false;
|
||||
textlarge = false;
|
||||
textbox_sprites.clear();
|
||||
textbox_image = TEXTIMAGE_NONE;
|
||||
}
|
||||
|
||||
void scriptclass::add_default_colours(void)
|
||||
@@ -530,6 +531,7 @@ void scriptclass::run(void)
|
||||
textpadtowidth = 0;
|
||||
textboxtimer = 0;
|
||||
textbox_sprites.clear();
|
||||
textbox_image = TEXTIMAGE_NONE;
|
||||
|
||||
translate_dialogue();
|
||||
}
|
||||
@@ -709,6 +711,21 @@ void scriptclass::run(void)
|
||||
sprite.col = ss_toi(words[4]);
|
||||
textbox_sprites.push_back(sprite);
|
||||
}
|
||||
else if (words[0] == "textimage")
|
||||
{
|
||||
if (words[1] == "levelcomplete")
|
||||
{
|
||||
textbox_image = TEXTIMAGE_LEVELCOMPLETE;
|
||||
}
|
||||
else if (words[1] == "gamecomplete")
|
||||
{
|
||||
textbox_image = TEXTIMAGE_GAMECOMPLETE;
|
||||
}
|
||||
else
|
||||
{
|
||||
textbox_image = TEXTIMAGE_NONE;
|
||||
}
|
||||
}
|
||||
else if (words[0] == "flipme")
|
||||
{
|
||||
textflipme = !textflipme;
|
||||
@@ -745,6 +762,8 @@ void scriptclass::run(void)
|
||||
graphics.addsprite(textbox_sprites[i].x, textbox_sprites[i].y, textbox_sprites[i].tile, textbox_sprites[i].col);
|
||||
}
|
||||
|
||||
graphics.setimage(textbox_image);
|
||||
|
||||
// Some textbox formatting that can be set by translations...
|
||||
if (textcentertext)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user