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, playClickSound, void(entity))
7 METHOD(CheckBox, toString, string(entity))
8 METHOD(CheckBox, setChecked, void(entity, float))
9 ATTRIB(CheckBox, useDownAsChecked, float, 0)
10 ATTRIB(CheckBox, checked, float, 0)
11 ATTRIB(CheckBox, onClick, void(entity, entity), CheckBox_Click)
12 ATTRIB(CheckBox, srcMulti, float, 0)
13 ATTRIB(CheckBox, disabled, float, 0)
18 void CheckBox_setChecked(entity me, float val)
22 void CheckBox_Click(entity me, entity other)
24 me.setChecked(me, !me.checked);
26 string CheckBox_toString(entity me)
28 return strcat(SUPER(CheckBox).toString(me), ", ", me.checked ? "checked" : "unchecked");
30 void CheckBox_configureCheckBox(entity me, string txt, float sz, string gfx)
32 me.configureButton(me, txt, sz, gfx);
35 void CheckBox_draw(entity me)
39 if(me.useDownAsChecked)
41 me.srcSuffix = string_null;
42 me.forcePressed = me.checked;
45 me.srcSuffix = (me.checked ? "1" : "0");
47 SUPER(CheckBox).draw(me);
49 void CheckBox_playClickSound(entity me)
51 m_play_click_sound(MENU_SOUND_SELECT);