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 int n = tokenize_console(cvar_string("menu_weaponarena"));
25 for (int i = 0; i < n; i++)
27 if(argv(i) == me.netname)
35 void XonoticWeaponarenaCheckBox_saveCvars(entity me)
38 localcmd(strcat("\nmenu_cmd addtolist menu_weaponarena ", me.netname, "\n"));
40 localcmd(strcat("\nmenu_cmd removefromlist menu_weaponarena ", me.netname, "\n"));
41 localcmd("\ng_weaponarena \"$menu_weaponarena\"\n");