1 #include "weaponarenacheckbox.qh"
3 entity makeXonoticWeaponarenaCheckBox(string theWeapon, string theText)
6 me = NEW(XonoticWeaponarenaCheckBox);
7 me.configureXonoticWeaponarenaCheckBox(me, theWeapon, theText);
10 void XonoticWeaponarenaCheckBox_configureXonoticWeaponarenaCheckBox(entity me, string theWeapon, string theText)
12 me.netname = theWeapon;
15 me.configureCheckBox(me, theText, me.fontSize, me.image);
17 void XonoticWeaponarenaCheckBox_setChecked(entity me, float foo)
19 me.checked = !me.checked;
22 void XonoticWeaponarenaCheckBox_loadCvars(entity me)
24 float n = tokenize_console(cvar_string("menu_weaponarena"));
28 if(argv(i) == me.netname)
36 void XonoticWeaponarenaCheckBox_saveCvars(entity me)
39 localcmd(strcat("\nmenu_cmd addtolist menu_weaponarena ", me.netname, "\n"));
41 localcmd(strcat("\nmenu_cmd removefromlist menu_weaponarena ", me.netname, "\n"));
42 localcmd("\ng_weaponarena \"$menu_weaponarena\"\n");