Xonotic
checkbox.qc File Reference
#include "checkbox.qh"
+ Include dependency graph for checkbox.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void CheckBox_Click (entity me, entity other)
 
void CheckBox_configureCheckBox (entity me, string txt, float sz, string gfx)
 
void CheckBox_draw (entity me)
 
void CheckBox_playClickSound (entity me)
 
void CheckBox_setChecked (entity me, float val)
 
string CheckBox_toString (entity me)
 

Function Documentation

◆ CheckBox_Click()

void CheckBox_Click ( entity  me,
entity  other 
)

Definition at line 7 of file checkbox.qc.

Referenced by CheckBox_Click_Redisplay().

8  {
9  me.setChecked(me, !me.checked);
10  }
+ Here is the caller graph for this function:

◆ CheckBox_configureCheckBox()

void CheckBox_configureCheckBox ( entity  me,
string  txt,
float  sz,
string  gfx 
)

Definition at line 15 of file checkbox.qc.

16  {
17  me.configureButton(me, txt, sz, gfx);
18  me.align = 0;
19  }

◆ CheckBox_draw()

void CheckBox_draw ( entity  me)

Definition at line 20 of file checkbox.qc.

References string_null, and SUPER.

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  }
string string_null
Definition: nil.qh:9
#define SUPER(cname)
Definition: oo.qh:219

◆ CheckBox_playClickSound()

void CheckBox_playClickSound ( entity  me)

Definition at line 36 of file checkbox.qc.

References m_play_click_sound(), and MENU_SOUND_SELECT.

37  {
39  }
+ Here is the call graph for this function:

◆ CheckBox_setChecked()

void CheckBox_setChecked ( entity  me,
float  val 
)

Definition at line 3 of file checkbox.qc.

4  {
5  me.checked = val;
6  }

◆ CheckBox_toString()

string CheckBox_toString ( entity  me)

Definition at line 11 of file checkbox.qc.

References strcat(), and SUPER.

12  {
13  return strcat(SUPER(CheckBox).toString(me), ", ", me.checked ? "checked" : "unchecked");
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"))
+ Here is the call graph for this function: