2 CLASS(XonoticDemoBrowserTab) EXTENDS(XonoticTab)
3 METHOD(XonoticDemoBrowserTab, fill, void(entity))
4 ATTRIB(XonoticDemoBrowserTab, title, string, "Demo")
5 ATTRIB(XonoticDemoBrowserTab, intendedWidth, float, 0.9)
6 ATTRIB(XonoticDemoBrowserTab, rows, float, 22)
7 ATTRIB(XonoticDemoBrowserTab, columns, float, 6.5)
8 ATTRIB(XonoticDemoBrowserTab, name, string, "DemoBroswer")
9 ENDCLASS(XonoticDemoBrowserTab)
10 entity makeXonoticDemoBrowserTab();
14 entity makeXonoticDemoBrowserTab()
17 me = spawnXonoticDemoBrowserTab();
18 me.configureDialog(me);
21 void XonoticDemoBrowserTab_fill(entity me)
28 me.TD(me, 1, me.columns, e = makeXonoticCheckBox(0, "cl_autodemo", "Record demos while playing"));
30 dlist = makeXonoticDemoList();
32 me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Filter:"));
33 me.TD(me, 1, 0.5, btn = makeXonoticButton("Clear", '0 0 0'));
34 btn.onClick = InputBox_Clear_Click;
35 me.TD(me, 1, me.columns - 1, e = makeXonoticInputBox(0, string_null));
36 e.onChange = DemoList_Filter_Change;
37 e.onChangeEntity = dlist;
38 btn.onClickEntity = e;
39 dlist.controlledTextbox = e;
41 me.TD(me, me.rows - 4, me.columns, dlist);
42 me.gotoRC(me, me.rows - 1, 0);
43 me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Timedemo", '0 0 0'));
44 e.onClick = TimeDemo_Click;
45 e.onClickEntity = dlist;
46 me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Play", '0 0 0'));
47 e.onClick = StartDemo_Click;
48 e.onClickEntity = dlist;