]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc
take3: format 903 files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_game_hudconfirm.qc
1 #include "dialog_settings_game_hudconfirm.qh"
2
3 #include "textlabel.qh"
4 #include "button.qh"
5
6 void HUDSetup_Start(entity me, entity btn)
7 {
8         if (!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) {
9                 localcmd("map _hudsetup\n");
10         } else {
11                 localcmd("togglemenu 0\n");
12         }
13
14         localcmd("_hud_configure 1\n");
15 }
16
17 void XonoticHUDConfirmDialog_fill(entity me)
18 {
19         entity e;
20
21         me.TR(me);
22         me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("In order for the HUD editor to show, you must first be in game.")));
23         me.TR(me);
24         me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?")));
25         me.TR(me);
26         me.TR(me);
27         me.TD(me, 1, 1, e = makeXonoticButton(_("Yes"), '1 0 0'));
28         e.onClick = HUDSetup_Start;
29         e.onClickEntity = me;
30         me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
31         e.onClick = Dialog_Close;
32         e.onClickEntity = me;
33 }