2 CLASS(XonoticCvarsDialog) EXTENDS(XonoticDialog)
3 METHOD(XonoticCvarsDialog, fill, void(entity))
4 METHOD(XonoticCvarsDialog, showNotify, void(entity))
5 ATTRIB(XonoticCvarsDialog, title, string, _("Advanced settings"))
6 ATTRIB(XonoticCvarsDialog, color, vector, SKINCOLOR_DIALOG_CVARS)
7 ATTRIB(XonoticCvarsDialog, intendedWidth, float, 0.8)
8 ATTRIB(XonoticCvarsDialog, rows, float, 24)
9 ATTRIB(XonoticCvarsDialog, columns, float, 6)
10 ENDCLASS(XonoticCvarsDialog)
14 void XonoticCvarsDialog_showNotify(entity me)
18 void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIST_CONTROLS to color ALL controls
23 cvarlist = makeXonoticCvarList();
29 SKINCOLOR_CVARLIST_CONTROLS;
32 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:")));
33 me.TD(me, 1, me.columns - 1, e = makeXonoticInputBox(0, string_null));
34 e.color = SKINCOLOR_CVARLIST_CONTROLS;
35 e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
36 e.cb_color = SKINCOLOR_CVARLIST_CONTROLS;
37 e.cb_colorC = SKINCOLOR_CVARLIST_CONTROLS;
38 e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
39 e.onChange = CvarList_Filter_Change;
40 e.onChangeEntity = cvarlist;
41 cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
43 me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
44 me.gotoRC(me, me.rows - 6, 0);
45 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:")));
46 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
47 cvarlist.cvarNameBox = e;
49 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:")));
50 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
51 cvarlist.cvarTypeBox = e;
53 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:")));
54 me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
55 cvarlist.cvarValueBox = e;
56 e.color = SKINCOLOR_CVARLIST_CONTROLS;
57 e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
58 e.cb_color = SKINCOLOR_CVARLIST_CONTROLS;
59 e.cb_colorC = SKINCOLOR_CVARLIST_CONTROLS;
60 e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
61 e.onChange = CvarList_Value_Change;
62 e.onChangeEntity = cvarlist;
63 e.onEnter = CvarList_End_Editing;
64 e.onEnterEntity = cvarlist;
65 me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_CONTROLS));
66 cvarlist.cvarDefaultBox = e;
67 e.onClick = CvarList_Revert_Click;
68 e.onClickEntity = cvarlist;
70 e.marginLeft = e.marginRight = 0.5;
72 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Description:")));
73 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
74 cvarlist.cvarDescriptionBox = e;
76 me.gotoRC(me, me.rows - 1, 0);
77 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), SKINCOLOR_CVARLIST_CONTROLS));
78 e.onClick = Dialog_Close;