1 #ifndef DIALOG_SETTINGS_GAME_HUDCONFIRM_H
2 #define DIALOG_SETTINGS_GAME_HUDCONFIRM_H
3 CLASS(XonoticHUDConfirmDialog, XonoticDialog)
4 METHOD(XonoticHUDConfirmDialog, fill, void(entity))
5 ATTRIB(XonoticHUDConfirmDialog, title, string, _("Enter HUD editor"))
6 ATTRIB(XonoticHUDConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM)
7 ATTRIB(XonoticHUDConfirmDialog, intendedWidth, float, 0.5)
8 ATTRIB(XonoticHUDConfirmDialog, rows, float, 4)
9 ATTRIB(XonoticHUDConfirmDialog, columns, float, 2)
10 ENDCLASS(XonoticHUDConfirmDialog)
14 void HUDSetup_Start(entity me, entity btn)
16 if (!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)))
17 localcmd("map _hudsetup\n");
19 localcmd("togglemenu 0\n");
21 localcmd("_hud_configure 1\n");
24 void XonoticHUDConfirmDialog_fill(entity me)
29 me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("In order for the HUD editor to show, you must first be in game.")));
31 me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?")));
34 me.TD(me, 1, 1, e = makeXonoticButton(_("Yes"), '1 0 0'));
35 e.onClick = HUDSetup_Start;
37 me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
38 e.onClick = Dialog_Close;