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;
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:231

References entity(), string_null, and SUPER.

◆ CheckBox_playClickSound()

void CheckBox_playClickSound ( entity me)

Definition at line 36 of file checkbox.qc.

37 {
39 }
void m_play_click_sound(string soundfile)
Definition menu.qc:1106
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.