Update text boxes in the inner fixed-timestep loop

So they don't go really quickly.
This commit is contained in:
Misa
2020-04-28 18:38:43 -07:00
committed by Ethan Lee
parent 4e3406d5aa
commit 495bea2e87
4 changed files with 20 additions and 10 deletions

View File

@@ -609,15 +609,6 @@ void Graphics::drawgui()
//Draw all the textboxes to the screen
for (size_t i = 0; i<textbox.size(); i++)
{
//This routine also updates the textboxs
textbox[i].update();
if (textbox[i].tm == 2 && textbox[i].tl <= 0.5)
{
textbox.erase(textbox.begin() + i);
i--;
continue;
}
if (textbox[i].r == 0 && textbox[i].g == 0 && textbox[i].b == 0)
{
if(flipmode)
@@ -752,6 +743,21 @@ void Graphics::drawgui()
}
}
void Graphics::updatetextboxes()
{
for (size_t i = 0; i < textbox.size(); i++)
{
textbox[i].update();
if (textbox[i].tm == 2 && textbox[i].tl <= 0.5)
{
textbox.erase(textbox.begin() + i);
i--;
continue;
}
}
}
void Graphics::drawimagecol( int t, int xp, int yp, int r = 0, int g = 0, int b = 0, bool cent/*= false*/ )
{
if (!INBOUNDS(t, images))