swap execution order of menuinit and item init

Now the command specified by menuinit is executed first, and then the
various menu item init commands (for example getting the value for
menuitemtextinput lines).

This may affect some menu init scripts - but I couldn't find any problems.
It only affects menus which use "menuinit" _and_ menu items with
initialisation.
This commit is contained in:
ac-stef
2015-05-18 14:59:41 +02:00
parent b0227a1e19
commit 618d72cdc4
+1 -1
View File
@@ -1230,8 +1230,8 @@ void gmenu::open()
if(!forwardkeys) player1->stopmoving();
if(items.inrange(menusel)) items[menusel]->focus(true);
setcontext("menu", name);
init();
if(initaction) execute(initaction);
init();
resetcontext();
}