1 #include "radiobutton.qh"
2 #ifndef ITEM_RADIOBUTTON_H
3 #define ITEM_RADIOBUTTON_H
5 void RadioButton_Click(entity me, entity other);
6 CLASS(RadioButton, CheckBox)
7 METHOD(RadioButton, configureRadioButton, void(entity, string, float, string, float, float));
8 ATTRIB(RadioButton, checked, float, 0)
9 ATTRIB(RadioButton, group, float, 0)
10 ATTRIB(RadioButton, allowDeselect, float, 0)
11 ATTRIB(RadioButton, onClick, void(entity, entity), RadioButton_Click)
16 void RadioButton_configureRadioButton(entity me, string txt, float sz, string gfx, float theGroup, float doAllowDeselect)
18 me.configureCheckBox(me, txt, sz, gfx);
21 me.allowDeselect = doAllowDeselect;
23 void RadioButton_Click(entity me, entity other)
27 if (me.allowDeselect) me.setChecked(me, 0);
32 for (e = me.parent.firstChild; e; e = e.nextSibling)
34 if (e.group == me.group) e.setChecked(e, 0);