2 CLASS(NexuizGametypeButton) EXTENDS(RadioButton)
3 METHOD(NexuizGametypeButton, configureNexuizGametypeButton, void(entity, float, string, string))
4 METHOD(NexuizGametypeButton, setChecked, void(entity, float))
5 ATTRIB(NexuizGametypeButton, fontSize, float, SKINFONTSIZE_NORMAL)
6 ATTRIB(NexuizGametypeButton, image, string, SKINGFX_BUTTON)
7 ATTRIB(NexuizGametypeButton, color, vector, SKINCOLOR_BUTTON_N)
8 ATTRIB(NexuizGametypeButton, colorC, vector, SKINCOLOR_BUTTON_C)
9 ATTRIB(NexuizGametypeButton, colorF, vector, SKINCOLOR_BUTTON_F)
10 ATTRIB(NexuizGametypeButton, colorD, vector, SKINCOLOR_BUTTON_D)
11 ATTRIB(NexuizGametypeButton, srcMulti, float, 1)
12 ATTRIB(NexuizGametypeButton, useDownAsChecked, float, 1)
14 ATTRIB(NexuizGametypeButton, cvarName, string, string_null)
15 METHOD(NexuizGametypeButton, loadCvars, void(entity))
16 METHOD(NexuizGametypeButton, saveCvars, void(entity))
18 ATTRIB(NexuizGametypeButton, alpha, float, SKINALPHA_TEXT)
19 ATTRIB(NexuizGametypeButton, disabledAlpha, float, SKINALPHA_DISABLED)
20 ENDCLASS(NexuizGametypeButton)
21 entity makeNexuizGametypeButton(float, string, string);
25 void GameTypeButton_Click(entity me, entity other);
26 entity makeNexuizGametypeButton(float theGroup, string theCvar, string theText)
29 me = spawnNexuizGametypeButton();
30 me.configureNexuizGametypeButton(me, theGroup, theCvar, theText);
33 void configureNexuizGametypeButtonNexuizGametypeButton(entity me, float theGroup, string theCvar, string theText)
37 me.cvarName = theCvar;
40 me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
42 me.onClick = GameTypeButton_Click;
43 me.onClickEntity = NULL;
45 void setCheckedNexuizGametypeButton(entity me, float val)
53 void loadCvarsNexuizGametypeButton(entity me)
55 me.checked = cvar(me.cvarName);
57 void saveCvarsNexuizGametypeButton(entity me)
59 cvar_set(me.cvarName, ftos(me.checked));
61 void GameTypeButton_Click(entity me, entity other)
63 RadioButton_Click(me, other);
64 me.parent.gameTypeChangeNotify(me.parent);