1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-13 16:23:38 +02:00

Use .clear() when removing text boxes in reset functions

graphics.textbox.clear() should be used instead of
graphics.textboxremove() or graphics.textboxremovefast(), because even
with graphics.textboxremovefast(), you'll still have to process at least
one frame of GAMEMODE logic before the text boxes are actually properly
removed, and this caused a 1-frame glitch when exiting playtesting with
text boxes on-screen and then re-entering playtesting.

Technically I could've only fixed it in Game::returntoeditor(), but I
wanted to be safe, so I also fixed it in scriptclass::hardreset(), too.
This commit is contained in:
Misa 2020-07-11 00:10:06 -07:00 committed by Ethan Lee
parent 7fada0548b
commit 846c6f61d4
2 changed files with 2 additions and 2 deletions

View File

@ -7298,7 +7298,7 @@ void Game::returntoeditor()
{
game.gamestate = EDITORMODE;
graphics.textboxremove();
graphics.textbox.clear();
game.hascontrol = true;
game.advancetext = false;
game.completestop = false;

View File

@ -3648,7 +3648,7 @@ void scriptclass::hardreset()
//dwgraphicsclass
graphics.backgrounddrawn = false;
graphics.textboxremovefast();
graphics.textbox.clear();
graphics.flipmode = false; //This will be reset if needs be elsewhere
graphics.showcutscenebars = false;
graphics.cutscenebarspos = 0;