MCPcopy Create free account
hub / github.com/assaultcube/AC / open

Method open

source/src/menus.cpp:1306–1323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1304}
1305
1306void gmenu::open()
1307{
1308 inited = false;
1309 if(!allowinput) menusel = 0;
1310 if(!forwardkeys) player1->stopmoving();
1311 setcontext("menu", name);
1312 if(initaction)
1313 {
1314 gmenu *oldlastmenu = lastmenu;
1315 lastmenu = this;
1316 execute(initaction);
1317 lastmenu = oldlastmenu;
1318 }
1319 if(items.inrange(menuselinit)) { menusel = menuselinit; menuselinit = -1; }
1320 if(items.inrange(menusel) && !items[menusel]->greyedout) items[menusel]->focus(true);
1321 init();
1322 resetcontext();
1323}
1324
1325void gmenu::close()
1326{

Callers 4

menusetFunction · 0.45
musicMethod · 0.45
musicpreloadMethod · 0.45
musicsuggestMethod · 0.45

Calls 6

setcontextFunction · 0.85
executeFunction · 0.85
resetcontextFunction · 0.85
stopmovingMethod · 0.80
inrangeMethod · 0.80
focusMethod · 0.45

Tested by

no test coverage detected