1 #include "checkbox_string.qh"
3 entity makeXonoticCheckBoxString(string theYesValue, string theNoValue, string theCvar, string theText)
6 me = NEW(XonoticCheckBoxString);
7 me.configureXonoticCheckBoxString(me, theYesValue, theNoValue, theCvar, theText);
10 void XonoticCheckBoxString_configureXonoticCheckBoxString(entity me, string theYesValue, string theNoValue, string theCvar, string theText)
12 me.yesString = theYesValue;
13 me.noString = theNoValue;
15 me.cvarName = (theCvar) ? theCvar : string_null;
17 me.configureCheckBox(me, theText, me.fontSize, me.image);
19 void XonoticCheckBoxString_setChecked(entity me, float foo)
21 me.checked = !me.checked;
24 void XonoticCheckBoxString_loadCvars(entity me)
29 if(cvar_string(me.cvarName) == me.yesString)
32 void XonoticCheckBoxString_saveCvars(entity me)
38 cvar_set(me.cvarName, me.yesString);
40 cvar_set(me.cvarName, me.noString);
42 CheckSendCvars(me, me.cvarName);