]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c
Move cvars to the proper location
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_playersetup_hudconfirm.c
1 #ifdef INTERFACE
2 CLASS(XonoticHUDConfirmDialog) EXTENDS(XonoticDialog)
3         METHOD(XonoticHUDConfirmDialog, fill, void(entity))
4         ATTRIB(XonoticHUDConfirmDialog, title, string, _("Enter HUD editor"))
5         ATTRIB(XonoticHUDConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM)
6         ATTRIB(XonoticHUDConfirmDialog, intendedWidth, float, 0.5)
7         ATTRIB(XonoticHUDConfirmDialog, rows, float, 4)
8         ATTRIB(XonoticHUDConfirmDialog, columns, float, 2)
9 ENDCLASS(XonoticHUDConfirmDialog)
10 #endif
11
12 #ifdef IMPLEMENTATION
13 void HUDSetup_Start(entity me, entity btn)
14 {
15         if (!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)))
16                 localcmd("map hudsetup/hudsetup", "\n");
17         else
18                 localcmd("togglemenu 0\n");
19
20         localcmd("_hud_configure 1", "\n");
21 }
22
23 void XonoticHUDConfirmDialog_fill(entity me)
24 {
25         entity e;
26
27         me.TR(me);
28                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("In order for the HUD editor to show, you must first be in game.")));
29         me.TR(me);
30                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?")));
31         me.TR(me);
32         me.TR(me);
33                 me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^Yes")), '1 0 0'));
34                         e.onClick = HUDSetup_Start;
35                         e.onClickEntity = me;
36                 me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^No")), '0 1 0'));
37                         e.onClick = Dialog_Close;
38                         e.onClickEntity = me;
39 }
40 #endif