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

Go to the source code of this file.

Classes

class  XonoticCvarList

Functions

void CvarList_End_Editing (entity box, entity me)
void CvarList_Filter_Change (entity box, entity me)
void CvarList_Filter_Descriptions (entity box, entity me)
void CvarList_Filter_ModifiedCvars (entity box, entity me)
void CvarList_Revert_Click (entity btn, entity me)
void CvarList_Value_Change (entity box, entity me)
entity makeXonoticCvarList ()

Variables

bool autocvar_menu_cvarlist_descriptions
bool autocvar_menu_cvarlist_onlymodified

Function Documentation

◆ CvarList_End_Editing()

void CvarList_End_Editing ( entity box,
entity me )

Definition at line 316 of file cvarlist.qc.

317{
318 if (!box.disabled)
319 box.parent.setFocus(box.parent, me);
320}

References entity().

Referenced by XonoticCvarList::ATTRIB(), and XonoticCvarsDialog_fill().

◆ CvarList_Filter_Change()

void CvarList_Filter_Change ( entity box,
entity me )

Definition at line 182 of file cvarlist.qc.

183{
184 CvarList_Load(me, box.text);
185 me.setSelected(me, 0);
186}
void CvarList_Load(entity me, string filter)
Definition cvarlist.qc:28

References CvarList_Load(), and entity().

Referenced by XonoticCvarList::ATTRIB(), and XonoticCvarsDialog_fill().

◆ CvarList_Filter_Descriptions()

void CvarList_Filter_Descriptions ( entity box,
entity me )

Definition at line 194 of file cvarlist.qc.

195{
196 cvar_set("menu_cvarlist_descriptions", ftos(!autocvar_menu_cvarlist_descriptions));
197 box.setChecked(box, autocvar_menu_cvarlist_descriptions);
198 CvarList_Load(me, me.controlledTextbox.text);
199 me.setSelected(me, 0);
200}
bool autocvar_menu_cvarlist_descriptions
Definition cvarlist.qh:50
void cvar_set(string name, string value)
string ftos(float f)

References autocvar_menu_cvarlist_descriptions, cvar_set(), CvarList_Load(), entity(), and ftos().

Referenced by XonoticCvarList::ATTRIB(), and XonoticCvarsDialog_fill().

◆ CvarList_Filter_ModifiedCvars()

void CvarList_Filter_ModifiedCvars ( entity box,
entity me )

Definition at line 187 of file cvarlist.qc.

188{
189 cvar_set("menu_cvarlist_onlymodified", ftos(!autocvar_menu_cvarlist_onlymodified));
190 box.setChecked(box, autocvar_menu_cvarlist_onlymodified);
191 CvarList_Load(me, me.controlledTextbox.text);
192 me.setSelected(me, 0);
193}
bool autocvar_menu_cvarlist_onlymodified
Definition cvarlist.qh:49

References autocvar_menu_cvarlist_onlymodified, cvar_set(), CvarList_Load(), entity(), and ftos().

Referenced by XonoticCvarList::ATTRIB(), and XonoticCvarsDialog_fill().

◆ CvarList_Revert_Click()

void CvarList_Revert_Click ( entity btn,
entity me )

Definition at line 301 of file cvarlist.qc.

302{
303 me.cvarValueBox.setText(me.cvarValueBox, me.cvarDefault);
304 me.cvarValueBox.cursorPos = strlen(me.cvarDefault);
306 {
307 cvar_set("menu_forced_saved_cvars", substring(strreplace(strcat(" ", me.cvarName, " "), " ", strcat(" ", autocvar_menu_forced_saved_cvars, " ")), 1, -2));
309 cvar_set("menu_reverted_nonsaved_cvars", me.cvarName);
310 else
311 cvar_set("menu_reverted_nonsaved_cvars", strcat(autocvar_menu_reverted_nonsaved_cvars, " ", me.cvarName));
312 }
313 me.cvarNeedsForcing = me.updateCvarType(me);
314}
string autocvar_menu_forced_saved_cvars
Definition cvarlist.qc:110
string autocvar_menu_reverted_nonsaved_cvars
Definition cvarlist.qc:111
#define strlen
string substring(string s, float start, float length)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define strhasword(s, w)
Definition string.qh:370

References autocvar_menu_forced_saved_cvars, autocvar_menu_reverted_nonsaved_cvars, cvar_set(), entity(), strcat(), strhasword, strlen, and substring().

Referenced by XonoticCvarList::ATTRIB(), XonoticCvarList_keyDown(), and XonoticCvarsDialog_fill().

◆ CvarList_Value_Change()

void CvarList_Value_Change ( entity box,
entity me )

Definition at line 283 of file cvarlist.qc.

284{
285 if (box.disabled)
286 return;
287 cvar_set(me.cvarNameBox.text, box.text);
288 if(me.cvarNeedsForcing)
289 {
290 localcmd(sprintf("\nseta %1$s \"$%1$s\"\n", me.cvarName));
291 cvar_set("menu_reverted_nonsaved_cvars", substring(strreplace(strcat(" ", me.cvarName, " "), " ", strcat(" ", autocvar_menu_reverted_nonsaved_cvars, " ")), 1, -2));
293 cvar_set("menu_forced_saved_cvars", me.cvarName);
294 else
295 cvar_set("menu_forced_saved_cvars", strcat(autocvar_menu_forced_saved_cvars, " ", me.cvarName));
296 me.cvarNeedsForcing = false;
297 me.updateCvarType(me);
298 }
299}
void localcmd(string command,...)

References autocvar_menu_forced_saved_cvars, autocvar_menu_reverted_nonsaved_cvars, cvar_set(), entity(), localcmd(), strcat(), and substring().

Referenced by XonoticCvarList::ATTRIB(), and XonoticCvarsDialog_fill().

◆ makeXonoticCvarList()

entity makeXonoticCvarList ( )

Definition at line 8 of file cvarlist.qc.

9{
10 entity me;
11 me = NEW(XonoticCvarList);
12 me.configureXonoticCvarList(me);
13 return me;
14}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define NEW(cname,...)
Definition oo.qh:117

References entity(), and NEW.

Referenced by XonoticCvarList::ATTRIB(), and XonoticCvarsDialog_fill().

Variable Documentation

◆ autocvar_menu_cvarlist_descriptions

bool autocvar_menu_cvarlist_descriptions

Definition at line 50 of file cvarlist.qh.

Referenced by CvarList_Filter_Descriptions(), and CvarList_Load().

◆ autocvar_menu_cvarlist_onlymodified

bool autocvar_menu_cvarlist_onlymodified

Definition at line 49 of file cvarlist.qh.

Referenced by CvarList_Filter_ModifiedCvars(), and CvarList_Load().