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{
5 entity me;
7 me.configureXonoticWeaponarenaCheckBox(me, theWeapon, theText);
8 return me;
9}
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 10 of file weaponarenacheckbox.qc.

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

References entity().

◆ XonoticWeaponarenaCheckBox_loadCvars()

void XonoticWeaponarenaCheckBox_loadCvars ( entity me)

Definition at line 22 of file weaponarenacheckbox.qc.

23{
24 int n = tokenize_console(cvar_string("menu_weaponarena"));
25 for (int i = 0; i < n; ++i)
26 {
27 if(argv(i) == me.netname)
28 {
29 me.checked = true;
30 break;
31 }
32 }
33}
#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 35 of file weaponarenacheckbox.qc.

36{
37 if(me.checked)
38 localcmd(strcat("\nmenu_cmd addtolist menu_weaponarena ", me.netname, "\n"));
39 else
40 localcmd(strcat("\nmenu_cmd removefromlist menu_weaponarena ", me.netname, "\n"));
41 localcmd("\ng_weaponarena \"$menu_weaponarena\"\n");
42}
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 17 of file weaponarenacheckbox.qc.

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

References entity().