2 void CheckBox_Click(entity me, entity other);
3 CLASS(CheckBox) EXTENDS(Button)
4 METHOD(CheckBox, configureCheckBox, void(entity, string, float, string))
5 METHOD(CheckBox, draw, void(entity))
6 METHOD(CheckBox, toString, string(entity))
7 METHOD(CheckBox, setChecked, void(entity, float))
8 ATTRIB(CheckBox, useDownAsChecked, float, 0)
9 ATTRIB(CheckBox, checked, float, 0)
10 ATTRIB(CheckBox, onClick, void(entity, entity), CheckBox_Click)
11 ATTRIB(CheckBox, srcMulti, float, 0)
12 ATTRIB(CheckBox, disabled, float, 0)
17 void CheckBox_setChecked(entity me, float val)
21 void CheckBox_Click(entity me, entity other)
23 me.setChecked(me, !me.checked);
25 string CheckBox_toString(entity me)
27 return strcat(SUPER(CheckBox).toString(me), ", ", me.checked ? "checked" : "unchecked");
29 void CheckBox_configureCheckBox(entity me, string txt, float sz, string gfx)
31 me.configureButton(me, txt, sz, gfx);
34 void CheckBox_draw(entity me)
38 if(me.useDownAsChecked)
40 me.srcSuffix = string_null;
41 me.forcePressed = me.checked;
44 me.srcSuffix = (me.checked ? "1" : "0");
46 SUPER(CheckBox).draw(me);