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