1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-23 21:18:29 +02:00

Move text box fadeout removal to Graphics::drawgui()

Something that's slightly annoying is that in order to make the vector
of text boxes be properly used, the text box cannot remove itself.
Because the text box does not know it's in a vector. So move the removal
of the text box to drawgui() instead.
This commit is contained in:
Misa 2020-04-03 17:10:10 -07:00 committed by Ethan Lee
parent 313c2661af
commit 0127a84698
2 changed files with 6 additions and 1 deletions

View File

@ -586,6 +586,11 @@ void Graphics::drawgui()
textbox[i].update();
if (textbox[i].active)
{
if (textbox[i].tm == 2 && textbox[i].tl <= 0.5)
{
textbox[i].active = false;
}
if (textbox[i].r == 0 && textbox[i].g == 0 && textbox[i].b == 0)
{
if(flipmode)

View File

@ -105,7 +105,7 @@ void textboxclass::update()
if (tl <= 0.5)
{
tl = 0.5;
active = false;
//this textbox will be removed by drawgui() later
}
setcol(int(tr * tl), int(tg * tl), int(tb * tl));
}