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

Function showmenu

source/src/menus.cpp:32–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void showmenu(const char *name, bool top)
33{
34 menurighttabwidth = max(VIRTW/4, 15 * text_width("w")); // adapt to screen and font size every time a menu opens
35 if(!name)
36 {
37 setcurmenu(NULL);
38 return;
39 }
40 gmenu *m = menus.access(name);
41 if(!m) return;
42 if(!top && curmenu)
43 {
44 if(curmenu==m) return;
45 loopv(menustack) if(menustack[i]==m) return;
46 menustack.insert(0, m);
47 return;
48 }
49 menuset(m);
50}
51
52void closemenu(const char *name)
53{

Callers 7

changemapservFunction · 0.85
showmenu_Function · 0.85
addchangeFunction · 0.85
searchnicknameFunction · 0.85
serverskeyFunction · 0.85
serverinfokeyFunction · 0.85
showscoresFunction · 0.85

Calls 7

maxFunction · 0.85
text_widthFunction · 0.85
setcurmenuFunction · 0.85
menusetFunction · 0.85
accessMethod · 0.80
loopvFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected