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)
21 cvarlist = makeXonoticCvarList();
23 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:")));
24 me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
25 e.onChange = CvarList_Filter_Change;
26 e.onChangeEntity = cvarlist;
27 cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
29 me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
30 me.gotoRC(me, me.rows - 7, 0);
31 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:")));
32 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
33 cvarlist.cvarNameBox = e;
35 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:")));
36 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
37 cvarlist.cvarTypeBox = e;
39 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:")));
40 me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
41 cvarlist.cvarValueBox = e;
42 e.onChange = CvarList_Value_Change;
43 e.onChangeEntity = cvarlist;
44 e.onEnter = CvarList_End_Editing;
45 e.onEnterEntity = cvarlist;
46 me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_REVERTBUTTON));
47 cvarlist.cvarDefaultBox = e;
48 e.onClick = CvarList_Revert_Click;
49 e.onClickEntity = cvarlist;
51 e.marginLeft = e.marginRight = 0.5;
53 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Description:")));
54 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
55 cvarlist.cvarDescriptionBox = e;
57 me.gotoRC(me, me.rows - 1, 0);
58 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
59 e.onClick = Dialog_Close;