From: FruitieX Date: Fri, 11 Jun 2010 11:55:08 +0000 (+0300) Subject: add a yay print with current hud panel id (and commit before i break something else) X-Git-Tag: xonotic-v0.1.0preview~541^2~62^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=76876299a58a832d2405e99d2f888fe0665664a4;p=xonotic%2Fxonotic-data.pk3dir.git add a yay print with current hud panel id (and commit before i break something else) --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 1f23a8798..f7a68e749 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1694,7 +1694,7 @@ exec turrets.cfg // alias for switching the teamselect menu alias menu_showteamselect "menu_cmd directmenu TeamSelect" alias menu_showhudexit "menu_cmd directmenu HUDExit" -alias menu_showhudoptions "menu_cmd directmenu HUDOptions" +alias menu_showhudoptions "menu_cmd directpanelhudmenu $*" alias menu_sync "menu_cmd sync" bind f5 menu_showteamselect diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index f043dade2..bc8fe15f6 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1305,7 +1305,7 @@ void HUD_Panel_Mouse() disable_menu_alphacheck = 2; menu_enabled = 1; menu_enabled_time = time; - localcmd("menu_showhudoptions\n"); + localcmd("menu_showhudoptions ", ftos(highlightedPanel), "\n"); return; } if(prevMouseClicked == 0) diff --git a/qcsrc/menu/gamecommand.qc b/qcsrc/menu/gamecommand.qc index 84c98e0da..3be1f89e3 100644 --- a/qcsrc/menu/gamecommand.qc +++ b/qcsrc/menu/gamecommand.qc @@ -62,6 +62,14 @@ void GameCommand(string theCommand) return; } + if(argv(0) == "directpanelhudmenu") + { + // switch to a menu item + m_goto("HUDOptions"); + changeXonoticHUDPanel(stof(argv(1))); + return; + } + if(argv(0) == "skinselect") { m_goto_skin_selector(); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_options.c b/qcsrc/menu/xonotic/dialog_hudpanel_options.c index 77655230c..0536adede 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_options.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_options.c @@ -17,5 +17,11 @@ void fillXonoticHUDOptionsDialog(entity me) entity e; me.TR(me); +} + +void changeXonoticHUDPanel(float id) +{ + print("Yay!", ftos(id), "\n"); + } #endif