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, disabledAlpha, float, SKINALPHA_DISABLED)
19 ENDCLASS(NexuizGametypeButton)
20 entity makeNexuizGametypeButton(float, string, string);
24 void GameTypeButton_Click(entity me, entity other);
25 entity makeNexuizGametypeButton(float theGroup, string theCvar, string theText)
28 me = spawnNexuizGametypeButton();
29 me.configureNexuizGametypeButton(me, theGroup, theCvar, theText);
32 void configureNexuizGametypeButtonNexuizGametypeButton(entity me, float theGroup, string theCvar, string theText)
36 me.cvarName = theCvar;
39 me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
41 me.onClick = GameTypeButton_Click;
42 me.onClickEntity = NULL;
44 void setCheckedNexuizGametypeButton(entity me, float val)
52 void loadCvarsNexuizGametypeButton(entity me)
54 me.checked = cvar(me.cvarName);
56 void saveCvarsNexuizGametypeButton(entity me)
58 cvar_set(me.cvarName, ftos(me.checked));
60 void GameTypeButton_Click(entity me, entity other)
62 RadioButton_Click(me, other);
63 me.parent.gameTypeChangeNotify(me.parent);