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
@@ -944,7 +944,7 @@ void Graphics::drawgui(void)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (textboxes[i].yp == 12 && textboxes[i].r == 165)
|
||||
if (textboxes[i].image == TEXTIMAGE_LEVELCOMPLETE)
|
||||
{
|
||||
// Level complete
|
||||
const char* english = "Level Complete!";
|
||||
@@ -981,7 +981,7 @@ void Graphics::drawgui(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (textboxes[i].yp == 12 && textboxes[i].g == 165)
|
||||
else if (textboxes[i].image == TEXTIMAGE_GAMECOMPLETE)
|
||||
{
|
||||
// Game complete
|
||||
const char* english = "Game Complete!";
|
||||
@@ -1430,6 +1430,17 @@ void Graphics::addsprite(int x, int y, int tile, int col)
|
||||
textboxes[m].addsprite(x, y, tile, col);
|
||||
}
|
||||
|
||||
void Graphics::setimage(TextboxImage image)
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
{
|
||||
vlog_error("setimage() out-of-bounds!");
|
||||
return;
|
||||
}
|
||||
|
||||
textboxes[m].setimage(image);
|
||||
}
|
||||
|
||||
void Graphics::addline( const std::string& t )
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
|
||||
Reference in New Issue
Block a user