1 #include "dialog_settings_misc_cvars.qh"
4 #include "textlabel.qh"
8 void XonoticCvarsDialog_showNotify(entity me)
10 SUPER(XonoticCvarsDialog).showNotify(me);
13 void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIST_CONTROLS to color ALL controls
18 cvarlist = makeXonoticCvarList();
24 SKINCOLOR_CVARLIST_CONTROLS;
27 // add button which does cvar_resettodefaults_saveonly
30 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:")));
31 me.TD(me, 1, 3, e = makeXonoticInputBox(0, string_null));
32 e.color = e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
33 e.cb_color = e.cb_colorC = e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
34 e.onChange = CvarList_Filter_Change;
35 e.onChangeEntity = cvarlist;
36 cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
37 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "menu_cvarlist_onlymodified", _("Modified cvars only")));
38 e.color = e.colorC = e.colorF = e.colorD = SKINCOLOR_CVARLIST_CONTROLS;
39 e.onClickEntity = cvarlist;
40 e.onClick = CvarList_Filter_ModifiedCvars;
42 me.TD(me, me.rows - me.currentRow - 9, me.columns, cvarlist);
43 me.gotoRC(me, me.rows - 8, 0);
44 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:")));
45 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
46 cvarlist.cvarNameBox = e;
48 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:")));
49 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
50 cvarlist.cvarTypeBox = e;
52 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:")));
53 me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
54 cvarlist.cvarValueBox = e;
55 e.color = e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
56 e.cb_color = e.cb_colorC = e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
57 e.onChange = CvarList_Value_Change;
58 e.onChangeEntity = cvarlist;
59 e.onEnter = CvarList_End_Editing;
60 e.onEnterEntity = cvarlist;
61 me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_CONTROLS));
62 cvarlist.cvarDefaultBox = e;
63 e.onClick = CvarList_Revert_Click;
64 e.onClickEntity = cvarlist;
66 e.marginLeft = e.marginRight = 0.5;
69 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Description:")));
70 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
71 cvarlist.cvarDescriptionBox = e;
73 me.gotoRC(me, me.rows - 1, 0);
74 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), SKINCOLOR_CVARLIST_CONTROLS));
75 e.onClick = Dialog_Close;