1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-12 14:09:43 +01:00

Keep currentmenuoption if it's the same menu

When recreating the same menu, there's basically no reason to reset the
currently-selected menu option. (Also, no need to worry about indexing
out of bounds or anything - the number gets checked while iterating over
all menu options; it's never used to actually index anything. At worst
there might be a 1-frame flicker as the bounds code in gameinput() kicks
in, but that shouldn't happen anyways.)
This commit is contained in:
Misa 2021-03-05 00:42:55 -08:00 committed by Ethan Lee
parent 1dd4634298
commit ac04281a9f

View file

@ -6239,9 +6239,9 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
frame.option = currentmenuoption;
frame.name = currentmenuname;
menustack.push_back(frame);
currentmenuoption = 0;
}
currentmenuoption = 0;
currentmenuname = t;
menuyoff = 0;
int maxspacing = 30; // maximum value for menuspacing, can only become lower.