]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add a yay print with current hud panel id (and commit before i break something else)
authorFruitieX <rasse@rasse-lappy.localdomain>
Fri, 11 Jun 2010 11:55:08 +0000 (14:55 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Fri, 11 Jun 2010 11:55:08 +0000 (14:55 +0300)
defaultXonotic.cfg
qcsrc/client/hud.qc
qcsrc/menu/gamecommand.qc
qcsrc/menu/xonotic/dialog_hudpanel_options.c

index 1f23a8798fd6b199f0acfac001e2b39a18ae7c39..f7a68e749a5c7ceb84bcbb3d5e0b0b53105b1dbb 100644 (file)
@@ -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
 
index f043dade24031241c780e01c4a2966168ccfa484..bc8fe15f6f3734538a2d2ebe304561eb69a894ab 100644 (file)
@@ -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)
index 84c98e0da2db4f2f8fb76e1cc3b5b374214072bc..3be1f89e36e610aa8ec79571c3d048007dca5835 100644 (file)
@@ -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();
index 77655230cfc3b19ca2bd53768f86c736e4ef337d..0536adede63b92e458993d530a2c564a2e6636dd 100644 (file)
@@ -17,5 +17,11 @@ void fillXonoticHUDOptionsDialog(entity me)
        entity e;
        me.TR(me);
        
+}
+
+void changeXonoticHUDPanel(float id)
+{
+       print("Yay!", ftos(id), "\n");
+
 }
 #endif