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, 25)
9 ATTRIB(XonoticCvarsDialog, columns, float, 6)
10 ENDCLASS(XonoticCvarsDialog)
14 void XonoticCvarsDialog_showNotify(entity me)
18 void XonoticCvarsDialog_fill(entity me)
20 entity e, cvarlist, btn;
21 cvarlist = makeXonoticCvarList();
23 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:")));
24 me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), '0 0 0'));
25 me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
26 e.onChange = CvarList_Filter_Change;
27 e.onChangeEntity = cvarlist;
28 btn.onClick = InputBox_Clear_Click;
29 btn.onClickEntity = e;
30 cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
32 me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
33 me.gotoRC(me, me.rows - 7, 0);
34 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:")));
35 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
36 cvarlist.cvarNameBox = e;
38 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:")));
39 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
40 cvarlist.cvarTypeBox = e;
42 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:")));
43 me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
44 cvarlist.cvarValueBox = e;
45 e.onChange = CvarList_Value_Change;
46 e.onChangeEntity = cvarlist;
47 e.onEnter = CvarList_End_Editing;
48 e.onEnterEntity = cvarlist;
49 me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_REVERTBUTTON));
50 cvarlist.cvarDefaultBox = e;
51 e.onClick = CvarList_Revert_Click;
52 e.onClickEntity = cvarlist;
54 e.marginLeft = e.marginRight = 0.5;
56 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Description:")));
57 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
58 cvarlist.cvarDescriptionBox = e;
60 me.gotoRC(me, me.rows - 1, 0);
61 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
62 e.onClick = Dialog_Close;