2 CLASS(XonoticCvarsDialog) EXTENDS(XonoticDialog)
3 METHOD(XonoticCvarsDialog, toString, string(entity))
4 METHOD(XonoticCvarsDialog, fill, void(entity))
5 METHOD(XonoticCvarsDialog, showNotify, void(entity))
6 ATTRIB(XonoticCvarsDialog, title, string, "Advanced settings")
7 ATTRIB(XonoticCvarsDialog, color, vector, SKINCOLOR_DIALOG_CVARS)
8 ATTRIB(XonoticCvarsDialog, intendedWidth, float, 0.8)
9 ATTRIB(XonoticCvarsDialog, rows, float, 25)
10 ATTRIB(XonoticCvarsDialog, columns, float, 6)
11 ENDCLASS(XonoticCvarsDialog)
15 void XonoticCvarsDialog_showNotify(entity me)
19 string XonoticCvarsDialog_toString(entity me)
23 void XonoticCvarsDialog_fill(entity me)
25 entity e, cvarlist, btn;
26 cvarlist = makeXonoticCvarList();
28 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Cvar filter:"));
29 me.TD(me, 1, 0.5, btn = makeXonoticButton("Clear", '0 0 0'));
30 me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
31 e.onChange = CvarList_Filter_Change;
32 e.onChangeEntity = cvarlist;
33 btn.onClick = InputBox_Clear_Click;
34 btn.onClickEntity = e;
35 cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
37 me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
38 me.gotoRC(me, me.rows - 7, 0);
39 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Setting:"));
40 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
41 cvarlist.cvarNameBox = e;
43 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Type:"));
44 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
45 cvarlist.cvarTypeBox = e;
47 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Value:"));
48 me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
49 cvarlist.cvarValueBox = e;
50 e.onChange = CvarList_Value_Change;
51 e.onChangeEntity = cvarlist;
52 me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_REVERTBUTTON));
53 cvarlist.cvarDefaultBox = e;
54 e.onClick = CvarList_Revert_Click;
55 e.onClickEntity = cvarlist;
57 e.marginLeft = e.marginRight = 0.5;
59 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Description:"));
60 me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
61 cvarlist.cvarDescriptionBox = e;
63 me.gotoRC(me, me.rows - 1, 0);
64 me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
65 e.onClick = Dialog_Close;