Xonotic
checkbox.qc
Go to the documentation of this file.
1 #include "checkbox.qh"
2 
3  void CheckBox_setChecked(entity me, float val)
4  {
5  me.checked = val;
6  }
8  {
9  me.setChecked(me, !me.checked);
10  }
12  {
13  return strcat(SUPER(CheckBox).toString(me), ", ", me.checked ? "checked" : "unchecked");
14  }
15  void CheckBox_configureCheckBox(entity me, string txt, float sz, string gfx)
16  {
17  me.configureButton(me, txt, sz, gfx);
18  me.align = 0;
19  }
21  {
22  float s;
23  s = me.pressed;
24  if (me.useDownAsChecked)
25  {
26  me.srcSuffix = string_null;
27  me.forcePressed = me.checked;
28  }
29  else
30  {
31  me.srcSuffix = (me.checked ? "1" : "0");
32  }
33  me.pressed = s;
34  SUPER(CheckBox).draw(me);
35  }
37  {
39  }
string string_null
Definition: nil.qh:9
entity() spawn
void CheckBox_draw(entity me)
Definition: checkbox.qc:20
entity other
Definition: csprogsdefs.qc:14
#define SUPER(cname)
Definition: oo.qh:219
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
void CheckBox_configureCheckBox(entity me, string txt, float sz, string gfx)
Definition: checkbox.qc:15
void CheckBox_Click(entity me, entity other)
Definition: checkbox.qc:7
void CheckBox_playClickSound(entity me)
Definition: checkbox.qc:36
string CheckBox_toString(entity me)
Definition: checkbox.qc:11
void CheckBox_setChecked(entity me, float val)
Definition: checkbox.qc:3