]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
And fix interaction with mouse :)
authorterencehill <piuntn@gmail.com>
Sun, 12 Dec 2010 22:02:47 +0000 (23:02 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 12 Dec 2010 22:02:47 +0000 (23:02 +0100)
qcsrc/client/hud.qc

index d7095dbcede972c9fd763abea44197b732c15df7..ee1597072d6fdfc5401ef3ffce55aca557750013 100644 (file)
@@ -1146,7 +1146,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
        }
        else if(nPrimary == K_TAB && hudShiftState & S_CTRL) //TODO: move this case down
        {
-               if (bInputType == 1)
+               if (bInputType == 1 || mouseClicked)
                        return true;
 
                //FIXME: if a panel is highlighted, has the same pos_x and lays in the same level
@@ -1529,6 +1529,12 @@ void HUD_Panel_Mouse()
 
        if(mouseClicked)
        {
+               if (tab_panel != -1)
+               {
+                       //stop ctrl-tab selection
+                       tab_panel = -1;
+                       reset_tab_panels();
+               }
                if(prevMouseClicked == 0)
                {
                        HUD_Panel_Highlight(); // sets highlightedPanel, highlightedAction, panel_click_distance, panel_click_resizeorigin