Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
weaponarenacheckbox.qc File Reference
Include dependency graph for weaponarenacheckbox.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

entity makeXonoticWeaponarenaCheckBox (string theWeapon, string theText)
void XonoticWeaponarenaCheckBox_configureXonoticWeaponarenaCheckBox (entity me, string theWeapon, string theText)
void XonoticWeaponarenaCheckBox_loadCvars (entity me)
void XonoticWeaponarenaCheckBox_saveCvars (entity me)
void XonoticWeaponarenaCheckBox_setChecked (entity me, bool foo)

Function Documentation

◆ makeXonoticWeaponarenaCheckBox()

entity makeXonoticWeaponarenaCheckBox ( string theWeapon,
string theText )

Definition at line 3 of file weaponarenacheckbox.qc.

4{
6 me.configureXonoticWeaponarenaCheckBox(me, theWeapon, theText);
7 return me;
8}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define NEW(cname,...)
Definition oo.qh:117

References entity(), and NEW.

Referenced by XonoticWeaponarenaCheckBox::saveCvars(), and XonoticMutatorsDialog_fill().

◆ XonoticWeaponarenaCheckBox_configureXonoticWeaponarenaCheckBox()

void XonoticWeaponarenaCheckBox_configureXonoticWeaponarenaCheckBox ( entity me,
string theWeapon,
string theText )

Definition at line 9 of file weaponarenacheckbox.qc.

10{
11 me.netname = theWeapon;
12 me.checked = false;
13 me.loadCvars(me);
14 me.configureCheckBox(me, theText, me.fontSize, me.image);
15}

References entity().

◆ XonoticWeaponarenaCheckBox_loadCvars()

void XonoticWeaponarenaCheckBox_loadCvars ( entity me)

Definition at line 21 of file weaponarenacheckbox.qc.

22{
23 int n = tokenize_console(cvar_string("menu_weaponarena"));
24 for (int i = 0; i < n; ++i)
25 {
26 if(argv(i) == me.netname)
27 {
28 me.checked = true;
29 break;
30 }
31 }
32}
#define tokenize_console
const string cvar_string(string name)
string argv(float n)

References argv(), cvar_string(), entity(), and tokenize_console.

◆ XonoticWeaponarenaCheckBox_saveCvars()

void XonoticWeaponarenaCheckBox_saveCvars ( entity me)

Definition at line 34 of file weaponarenacheckbox.qc.

35{
36 if(me.checked)
37 localcmd(strcat("\nmenu_cmd addtolist menu_weaponarena ", me.netname, "\n"));
38 else
39 localcmd(strcat("\nmenu_cmd removefromlist menu_weaponarena ", me.netname, "\n"));
40 localcmd("\ng_weaponarena \"$menu_weaponarena\"\n");
41}
void localcmd(string command,...)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))

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

◆ XonoticWeaponarenaCheckBox_setChecked()

void XonoticWeaponarenaCheckBox_setChecked ( entity me,
bool foo )

Definition at line 16 of file weaponarenacheckbox.qc.

17{
18 me.checked = !me.checked;
19 me.saveCvars(me);
20}

References entity().