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, me.columns - 1, e = makeXonoticInputBox(0, string_null));
32 e.color = SKINCOLOR_CVARLIST_CONTROLS;
33 e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
34 e.cb_color = SKINCOLOR_CVARLIST_CONTROLS;
35 e.cb_colorC = SKINCOLOR_CVARLIST_CONTROLS;
36 e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
37 e.onChange = CvarList_Filter_Change;
38 e.onChangeEntity = cvarlist;
39 cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
41 me.TD(me, me.rows - me.currentRow - 9, me.columns, cvarlist);
42 me.gotoRC(me, me.rows - 8, 0);
43 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:")));
44 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
45 cvarlist.cvarNameBox = e;
47 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:")));
48 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
49 cvarlist.cvarTypeBox = e;
51 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:")));
52 me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
53 cvarlist.cvarValueBox = e;
54 e.color = SKINCOLOR_CVARLIST_CONTROLS;
55 e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
56 e.cb_color = SKINCOLOR_CVARLIST_CONTROLS;
57 e.cb_colorC = SKINCOLOR_CVARLIST_CONTROLS;
58 e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
59 e.onChange = CvarList_Value_Change;
60 e.onChangeEntity = cvarlist;
61 e.onEnter = CvarList_End_Editing;
62 e.onEnterEntity = cvarlist;
63 me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_CONTROLS));
64 cvarlist.cvarDefaultBox = e;
65 e.onClick = CvarList_Revert_Click;
66 e.onClickEntity = cvarlist;
68 e.marginLeft = e.marginRight = 0.5;
71 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Description:")));
72 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
73 cvarlist.cvarDescriptionBox = e;
75 me.gotoRC(me, me.rows - 1, 0);
76 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), SKINCOLOR_CVARLIST_CONTROLS));
77 e.onClick = Dialog_Close;