From: Matthias Krüger Date: Fri, 6 Mar 2015 14:35:32 +0000 (+0100) Subject: Merge branch 'master' into matthiaskrgr/hudsetup X-Git-Tag: xonotic-v0.8.1~94^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d1ec6cd7b36e2c16817720fe5cce775fc3d26357;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into matthiaskrgr/hudsetup --- d1ec6cd7b36e2c16817720fe5cce775fc3d26357 diff --cc qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc index 000000000,9f327c3f5..2c6f76f2a mode 000000,100644..100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc @@@ -1,0 -1,40 +1,40 @@@ + #ifdef INTERFACE + CLASS(XonoticHUDConfirmDialog) EXTENDS(XonoticDialog) + METHOD(XonoticHUDConfirmDialog, fill, void(entity)) + ATTRIB(XonoticHUDConfirmDialog, title, string, _("Enter HUD editor")) + ATTRIB(XonoticHUDConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM) + ATTRIB(XonoticHUDConfirmDialog, intendedWidth, float, 0.5) + ATTRIB(XonoticHUDConfirmDialog, rows, float, 4) + ATTRIB(XonoticHUDConfirmDialog, columns, float, 2) + ENDCLASS(XonoticHUDConfirmDialog) + #endif + + #ifdef IMPLEMENTATION + void HUDSetup_Start(entity me, entity btn) + { + if (!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) - localcmd("map hudsetup/hudsetup", "\n"); ++ localcmd("map hudsetup", "\n"); + else + localcmd("togglemenu 0\n"); + + localcmd("_hud_configure 1", "\n"); + } + + void XonoticHUDConfirmDialog_fill(entity me) + { + entity e; + + me.TR(me); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("In order for the HUD editor to show, you must first be in game."))); + me.TR(me); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?"))); + me.TR(me); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticButton(_("Yes"), '1 0 0')); + e.onClick = HUDSetup_Start; + e.onClickEntity = me; + me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0')); + e.onClick = Dialog_Close; + e.onClickEntity = me; + } + #endif