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

Function refreshapplymenu

source/src/menus.cpp:1564–1574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1562}
1563
1564void refreshapplymenu(void *menu, bool init)
1565{
1566 gmenu *m = (gmenu *) menu;
1567 if(!m || (!init && needsapply.length() != m->items.length()-3)) return;
1568 m->items.deletecontents();
1569 loopv(needsapply) m->items.add(new mitemtext(m, newstring(needsapply[i]), NULL, NULL, NULL));
1570 m->items.add(new mitemtext(m, newstring(""), NULL, NULL, NULL));
1571 m->items.add(new mitemtext(m, newstring("Yes"), newstring("resetgl"), NULL, NULL));
1572 m->items.add(new mitemtext(m, newstring("No"), newstring("echo [..restart AssaultCube to apply the new settings]"), NULL, NULL));
1573 if(init) m->menusel = m->items.length()-2; // select OK
1574}

Callers

nothing calls this directly

Calls 5

newstringFunction · 0.85
deletecontentsMethod · 0.80
loopvFunction · 0.70
lengthMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected