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 314 of file cvarlist.qc.

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

References entity().

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

◆ CvarList_Filter_Change()

void CvarList_Filter_Change ( entity box,
entity me )

Definition at line 180 of file cvarlist.qc.

181{
182 CvarList_Load(me, box.text);
183 me.setSelected(me, 0);
184}
void CvarList_Load(entity me, string filter)
Definition cvarlist.qc:27

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 192 of file cvarlist.qc.

193{
194 cvar_set("menu_cvarlist_descriptions", ftos(!autocvar_menu_cvarlist_descriptions));
195 box.setChecked(box, autocvar_menu_cvarlist_descriptions);
196 CvarList_Load(me, me.controlledTextbox.text);
197 me.setSelected(me, 0);
198}
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 185 of file cvarlist.qc.

186{
187 cvar_set("menu_cvarlist_onlymodified", ftos(!autocvar_menu_cvarlist_onlymodified));
188 box.setChecked(box, autocvar_menu_cvarlist_onlymodified);
189 CvarList_Load(me, me.controlledTextbox.text);
190 me.setSelected(me, 0);
191}
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 299 of file cvarlist.qc.

300{
301 me.cvarValueBox.setText(me.cvarValueBox, me.cvarDefault);
302 me.cvarValueBox.cursorPos = strlen(me.cvarDefault);
304 {
305 cvar_set("menu_forced_saved_cvars", substring(strreplace(strcat(" ", me.cvarName, " "), " ", strcat(" ", autocvar_menu_forced_saved_cvars, " ")), 1, -2));
307 cvar_set("menu_reverted_nonsaved_cvars", me.cvarName);
308 else
309 cvar_set("menu_reverted_nonsaved_cvars", strcat(autocvar_menu_reverted_nonsaved_cvars, " ", me.cvarName));
310 }
311 me.cvarNeedsForcing = me.updateCvarType(me);
312}
string autocvar_menu_forced_saved_cvars
Definition cvarlist.qc:109
string autocvar_menu_reverted_nonsaved_cvars
Definition cvarlist.qc:110
#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 281 of file cvarlist.qc.

282{
283 if (box.disabled)
284 return;
285 cvar_set(me.cvarNameBox.text, box.text);
286 if(me.cvarNeedsForcing)
287 {
288 localcmd(sprintf("\nseta %1$s \"$%1$s\"\n", me.cvarName));
289 cvar_set("menu_reverted_nonsaved_cvars", substring(strreplace(strcat(" ", me.cvarName, " "), " ", strcat(" ", autocvar_menu_reverted_nonsaved_cvars, " ")), 1, -2));
291 cvar_set("menu_forced_saved_cvars", me.cvarName);
292 else
293 cvar_set("menu_forced_saved_cvars", strcat(autocvar_menu_forced_saved_cvars, " ", me.cvarName));
294 me.cvarNeedsForcing = false;
295 me.updateCvarType(me);
296 }
297}
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{
11 me.configureXonoticCvarList(me);
12 return me;
13}
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().