X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fitem%2Fradiobutton.qc;fp=qcsrc%2Fmenu%2Fitem%2Fradiobutton.qc;h=e2a2c9fe0cea3b59df8d4027d62730714087a7e1;hb=cf41044c9d897080866da6e0ca39d807e094e23e;hp=00dcb680ad0d7e652000719d8312e02eacdaab95;hpb=43e59796e138c96dda6663007654bfe9496e391f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/item/radiobutton.qc b/qcsrc/menu/item/radiobutton.qc index 00dcb680a..e2a2c9fe0 100644 --- a/qcsrc/menu/item/radiobutton.qc +++ b/qcsrc/menu/item/radiobutton.qc @@ -1,24 +1,22 @@ #include "radiobutton.qh" - void RadioButton_configureRadioButton(entity me, string txt, float sz, string gfx, float theGroup, float doAllowDeselect) - { - me.configureCheckBox(me, txt, sz, gfx); - me.align = 0; - me.group = theGroup; - me.allowDeselect = doAllowDeselect; - } - void RadioButton_Click(entity me, entity other) - { - if (me.checked) - { - if (me.allowDeselect) me.setChecked(me, 0); - } - else - { - entity e; - for (e = me.parent.firstChild; e; e = e.nextSibling) - if (e != me) - if (e.group == me.group) e.setChecked(e, 0); - me.setChecked(me, 1); +void RadioButton_configureRadioButton(entity me, string txt, float sz, string gfx, float theGroup, float doAllowDeselect) +{ + me.configureCheckBox(me, txt, sz, gfx); + me.align = 0; + me.group = theGroup; + me.allowDeselect = doAllowDeselect; +} +void RadioButton_Click(entity me, entity other) +{ + if (me.checked) { + if (me.allowDeselect) { me.setChecked(me, 0); } + } else { + entity e; + for (e = me.parent.firstChild; e; e = e.nextSibling) { + if (e != me) { + if (e.group == me.group) { e.setChecked(e, 0); } } } + me.setChecked(me, 1); } +}