2 CLASS(NexuizRadioButton) EXTENDS(RadioButton)
3 METHOD(NexuizRadioButton, configureNexuizRadioButton, void(entity, float, string, string, string))
4 METHOD(NexuizRadioButton, setChecked, void(entity, float))
5 ATTRIB(NexuizRadioButton, fontSize, float, SKINFONTSIZE_NORMAL)
6 ATTRIB(NexuizRadioButton, image, string, SKINGFX_RADIOBUTTON)
8 ATTRIB(NexuizRadioButton, cvarName, string, string_null)
9 ATTRIB(NexuizRadioButton, cvarValue, string, string_null)
10 METHOD(NexuizRadioButton, loadCvars, void(entity))
11 METHOD(NexuizRadioButton, saveCvars, void(entity))
12 ENDCLASS(NexuizRadioButton)
13 entity makeNexuizRadioButton(float, string, string, string);
17 entity makeNexuizRadioButton(float theGroup, string theCvar, string theValue, string theText)
20 me = spawnNexuizRadioButton();
21 me.configureNexuizRadioButton(me, theGroup, theCvar, theValue, theText);
24 void configureNexuizRadioButtonNexuizRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText)
28 me.cvarName = theCvar;
29 me.cvarValue = theValue;
32 me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
34 void setCheckedNexuizRadioButton(entity me, float val)
42 void loadCvarsNexuizRadioButton(entity me)
44 me.checked = (cvar_string(me.cvarName) == me.cvarValue);
46 void saveCvarsNexuizRadioButton(entity me)
49 cvar_set(me.cvarName, me.cvarValue);