Xonotic
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_ModifiedCvars (entity box, entity me)
 
void CvarList_Revert_Click (entity btn, entity me)
 
void CvarList_Value_Change (entity box, entity me)
 
entity makeXonoticCvarList ()
 

Variables

float autocvar_menu_cvarlist_onlymodified
 

Function Documentation

◆ CvarList_End_Editing()

void CvarList_End_Editing ( entity  box,
entity  me 
)

Definition at line 251 of file cvarlist.qc.

252 {
253  box.parent.setFocus(box.parent, me);
254 }

◆ CvarList_Filter_Change()

void CvarList_Filter_Change ( entity  box,
entity  me 
)

Definition at line 126 of file cvarlist.qc.

References CvarList_Load().

127 {
128  CvarList_Load(me, box.text);
129  me.setSelected(me, 0);
130 }
void CvarList_Load(entity me, string filter)
Definition: cvarlist.qc:21
+ Here is the call graph for this function:

◆ CvarList_Filter_ModifiedCvars()

void CvarList_Filter_ModifiedCvars ( entity  box,
entity  me 
)

Definition at line 131 of file cvarlist.qc.

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

132 {
133  cvar_set("menu_cvarlist_onlymodified", ftos(!autocvar_menu_cvarlist_onlymodified));
134  box.setChecked(box, autocvar_menu_cvarlist_onlymodified);
135  CvarList_Load(me, me.controlledTextbox.text);
136  me.setSelected(me, 0);
137 }
void CvarList_Load(entity me, string filter)
Definition: cvarlist.qc:21
float autocvar_menu_cvarlist_onlymodified
Definition: cvarlist.qh:47
+ Here is the call graph for this function:

◆ CvarList_Revert_Click()

void CvarList_Revert_Click ( entity  btn,
entity  me 
)

Definition at line 236 of file cvarlist.qc.

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

Referenced by XonoticCvarList_keyDown().

237 {
238  me.cvarValueBox.setText(me.cvarValueBox, me.cvarDefault);
239  me.cvarValueBox.cursorPos = strlen(me.cvarDefault);
241  {
242  cvar_set("menu_forced_saved_cvars", substring(strreplace(strcat(" ", me.cvarName, " "), " ", strcat(" ", autocvar_menu_forced_saved_cvars, " ")), 1, -2));
244  cvar_set("menu_reverted_nonsaved_cvars", me.cvarName);
245  else
246  cvar_set("menu_reverted_nonsaved_cvars", strcat(autocvar_menu_reverted_nonsaved_cvars, " ", me.cvarName));
247  }
248  me.cvarNeedsForcing = me.updateCvarType(me);
249 }
string autocvar_menu_forced_saved_cvars
Definition: cvarlist.qc:63
#define strhasword(s, w)
Definition: string.qh:352
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
string autocvar_menu_reverted_nonsaved_cvars
Definition: cvarlist.qc:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CvarList_Value_Change()

void CvarList_Value_Change ( entity  box,
entity  me 
)

Definition at line 220 of file cvarlist.qc.

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

221 {
222  cvar_set(me.cvarNameBox.text, box.text);
223  if(me.cvarNeedsForcing)
224  {
225  localcmd(sprintf("\nseta %1$s \"$%1$s\"\n", me.cvarName));
226  cvar_set("menu_reverted_nonsaved_cvars", substring(strreplace(strcat(" ", me.cvarName, " "), " ", strcat(" ", autocvar_menu_reverted_nonsaved_cvars, " ")), 1, -2));
228  cvar_set("menu_forced_saved_cvars", me.cvarName);
229  else
230  cvar_set("menu_forced_saved_cvars", strcat(autocvar_menu_forced_saved_cvars, " ", me.cvarName));
231  me.cvarNeedsForcing = 0;
232  me.updateCvarType(me);
233  }
234 }
string autocvar_menu_forced_saved_cvars
Definition: cvarlist.qc:63
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
string autocvar_menu_reverted_nonsaved_cvars
Definition: cvarlist.qc:64
+ Here is the call graph for this function:

◆ makeXonoticCvarList()

entity makeXonoticCvarList ( )

Definition at line 8 of file cvarlist.qc.

References entity(), and NEW.

Referenced by XonoticCvarsDialog_fill().

9 {
10  entity me;
11  me = NEW(XonoticCvarList);
12  me.configureXonoticCvarList(me);
13  return me;
14 }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ autocvar_menu_cvarlist_onlymodified

float autocvar_menu_cvarlist_onlymodified

Definition at line 47 of file cvarlist.qh.

Referenced by CvarList_Filter_ModifiedCvars(), and CvarList_Load().