Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
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, bool 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.

8 {
9 me.setChecked(me, !me.checked);
10 }

References entity(), and other.

Referenced by CheckBox_Click_Redisplay().

◆ 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 }

References entity().

◆ CheckBox_draw()

void CheckBox_draw ( entity me)

Definition at line 20 of file checkbox.qc.

21 {
22 float s = me.pressed;
23 if (me.useDownAsChecked)
24 {
25 me.srcSuffix = string_null;
26 me.forcePressed = me.checked;
27 }
28 else
29 {
30 me.srcSuffix = (me.checked ? "1" : "0");
31 }
32 me.pressed = s;
33 SUPER(CheckBox).draw(me);
34 }
string string_null
Definition nil.qh:9
#define SUPER(cname)
Definition oo.qh:231

References entity(), string_null, and SUPER.

◆ CheckBox_playClickSound()

void CheckBox_playClickSound ( entity me)

Definition at line 35 of file checkbox.qc.

36 {
38 }
void m_play_click_sound(string soundfile)
Definition menu.qc:1111
const string MENU_SOUND_SELECT
Definition menu.qh:54

References entity(), m_play_click_sound(), and MENU_SOUND_SELECT.

◆ CheckBox_setChecked()

void CheckBox_setChecked ( entity me,
bool val )

Definition at line 3 of file checkbox.qc.

4 {
5 me.checked = val;
6 }

References entity().

◆ CheckBox_toString()

string CheckBox_toString ( entity me)

Definition at line 11 of file checkbox.qc.

12 {
13 return strcat(SUPER(CheckBox).toString(me), ", ", me.checked ? "checked" : "unchecked");
14 }
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))

References entity(), strcat(), and SUPER.