2 CLASS(XonoticDemoConfirmDialog) EXTENDS(XonoticDialog)
3 METHOD(XonoticDemoConfirmDialog, fill, void(entity))
4 ATTRIB(XonoticDemoConfirmDialog, title, string, _("Disconnect"))
5 ATTRIB(XonoticDemoConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM)
6 ATTRIB(XonoticDemoConfirmDialog, intendedWidth, float, 0.5)
7 ATTRIB(XonoticDemoConfirmDialog, rows, float, 4)
8 ATTRIB(XonoticDemoConfirmDialog, columns, float, 2)
9 ENDCLASS(XonoticDemoConfirmDialog)
13 void Demo_Confirm(entity me, entity btn)
15 if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
16 //me.onClick = TimeDemo_Click;
17 me.onClick = StartDemo_Click;
19 localcmd("togglemenu 0\n");
22 void XonoticDemoConfirmDialog_fill(entity me)
27 me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Playing a demo will disconnect you from the current match.")));
29 me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you really wish to disconnect now?")));
32 me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("DMCNFRM^Yes")), '1 0 0'));
33 e.onClick = Demo_Confirm;
35 me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("DMCNFRM^No")), '0 1 0'));
36 e.onClick = Dialog_Close;