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

Go to the source code of this file.

Functions

void XonoticCvarsDialog_fill (entity me)
void XonoticCvarsDialog_showNotify (entity me)

Function Documentation

◆ XonoticCvarsDialog_fill()

void XonoticCvarsDialog_fill ( entity me)

Definition at line 14 of file dialog_settings_misc_cvars.qc.

15{
16
17 entity e, cvarlist;
18
19 cvarlist = makeXonoticCvarList();
20
21 cvarlist.color =
22 cvarlist.colorF =
23 cvarlist.color2 =
24 cvarlist.colorC =
25 SKINCOLOR_CVARLIST_CONTROLS;
26
27 // todo:
28 // add button which does cvar_resettodefaults_saveonly
29
30 me.TR(me);
31 me.TDempty(me, 0.2);
32 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Filter:")));
33 me.TD(me, 1, 3, e = makeXonoticInputBox(0, string_null));
34 e.color = e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
35 e.cb_color = e.cb_colorC = e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
36 e.onChange = CvarList_Filter_Change;
37 e.onChangeEntity = cvarlist;
38 cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
39 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "menu_cvarlist_onlymodified", _("Modified cvars only")));
40 e.color = e.colorC = e.colorF = e.colorD = SKINCOLOR_CVARLIST_CONTROLS;
41 e.onClickEntity = cvarlist;
43 me.TR(me);
44 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, string_null));
45 cvarlist.cvarlistResultCountBox = e;
46 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "menu_cvarlist_descriptions", _("Search in cvar descriptions too")));
47 e.color = e.colorC = e.colorF = e.colorD = SKINCOLOR_CVARLIST_CONTROLS;
48 e.onClickEntity = cvarlist;
50 me.TR(me);
51 me.TD(me, me.rows - me.currentRow - 8, me.columns, cvarlist);
52 me.gotoRC(me, me.rows - 8, 0);
53 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:")));
54 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
55 e.colorL = '1 1 0'; // draw the cvar name yellow
56 cvarlist.cvarNameBox = e;
57 me.TR(me);
58 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:")));
59 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
60 cvarlist.cvarTypeBox = e;
61 me.TR(me);
62 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:")));
63 me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
64 cvarlist.cvarValueBox = e;
65 e.color = e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
66 e.cb_color = e.cb_colorC = e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
67 e.onChange = CvarList_Value_Change;
68 e.onChangeEntity = cvarlist;
69 e.onEnter = CvarList_End_Editing;
70 e.onEnterEntity = cvarlist;
71 me.TD(me, 1, 1, e = makeXonoticButton_T(string_null, SKINCOLOR_CVARLIST_CONTROLS, _("Reset to default")));
72 cvarlist.cvarDefaultBox = e;
73 e.onClick = CvarList_Revert_Click;
74 e.onClickEntity = cvarlist;
75 e.allowCut = true;
76 e.marginLeft = e.marginRight = 0.5;
77 me.TR(me);
78 me.TR(me);
79 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Description:")));
80 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
81 cvarlist.cvarDescriptionBox = e;
82 e.allowWrap = true;
83 me.gotoRC(me, me.rows - 1, 0);
84 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), SKINCOLOR_CVARLIST_CONTROLS));
85 e.onClick = Dialog_Close;
86 e.onClickEntity = me;
87}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void CvarList_Filter_Descriptions(entity box, entity me)
Definition cvarlist.qc:194
void CvarList_Filter_Change(entity box, entity me)
Definition cvarlist.qc:182
void CvarList_Value_Change(entity box, entity me)
Definition cvarlist.qc:283
void CvarList_End_Editing(entity box, entity me)
Definition cvarlist.qc:316
entity makeXonoticCvarList()
Definition cvarlist.qc:8
void CvarList_Filter_ModifiedCvars(entity box, entity me)
Definition cvarlist.qc:187
void CvarList_Revert_Click(entity btn, entity me)
Definition cvarlist.qc:301
void Dialog_Close(entity button, entity me)
Definition dialog.qc:7
entity makeXonoticButton_T(string theText, vector theColor, string theTooltip)
Definition button.qc:3
entity makeXonoticButton(string theText, vector theColor)
Definition button.qc:10
string string_null
Definition nil.qh:9
entity makeXonoticTextLabel(float theAlign, string theText)
Definition textlabel.qc:3
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition checkbox.qc:28
entity makeXonoticInputBox(bool doEditColorCodes, string theCvar)
Definition inputbox.qc:10

References CvarList_End_Editing(), CvarList_Filter_Change(), CvarList_Filter_Descriptions(), CvarList_Filter_ModifiedCvars(), CvarList_Revert_Click(), CvarList_Value_Change(), Dialog_Close(), entity(), makeXonoticButton(), makeXonoticButton_T(), makeXonoticCheckBox(), makeXonoticCvarList(), makeXonoticInputBox(), makeXonoticTextLabel(), and string_null.

◆ XonoticCvarsDialog_showNotify()

void XonoticCvarsDialog_showNotify ( entity me)

Definition at line 9 of file dialog_settings_misc_cvars.qc.

10{
11 SUPER(XonoticCvarsDialog).showNotify(me);
12 loadAllCvars(me);
13}
void loadAllCvars(entity root)
Definition util.qc:53
#define SUPER(cname)
Definition oo.qh:231

References entity(), loadAllCvars(), and SUPER.