From 618d72cdc4a0c7b354619f13e1f0ce91db8990c2 Mon Sep 17 00:00:00 2001 From: ac-stef Date: Tue, 28 Apr 2015 17:52:10 +0200 Subject: [PATCH] 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. --- source/src/menus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/menus.cpp b/source/src/menus.cpp index df11a6a0..4b025f79 100644 --- a/source/src/menus.cpp +++ b/source/src/menus.cpp @@ -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(); }