]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Properly set/reset highlightedAction
authorterencehill <piuntn@gmail.com>
Sat, 28 Feb 2015 17:15:46 +0000 (18:15 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 28 Feb 2015 17:15:46 +0000 (18:15 +0100)
qcsrc/client/hud_config.qc

index 898f3eb56f00f9cf6bb1195ba6d31e7a41035e74..764b42a9a3efc77619ad489b238149f61c420f53 100644 (file)
@@ -433,8 +433,7 @@ void HUD_Panel_SetPosSize(vector mySize)
 {
        panel = highlightedPanel;
        HUD_Panel_UpdatePosSize();
-       vector resizeorigin;
-       resizeorigin = panel_click_resizeorigin;
+       vector resizeorigin = panel_click_resizeorigin;
        vector myPos;
 
        // minimum panel size cap
@@ -567,7 +566,6 @@ void HUD_Panel_Arrow_Action(float nPrimary)
 
        if (hudShiftState & S_ALT) // resize
        {
-               highlightedAction = 1;
                if(nPrimary == K_UPARROW)
                        resizeCorner = 1;
                else if(nPrimary == K_RIGHTARROW)
@@ -604,7 +602,6 @@ void HUD_Panel_Arrow_Action(float nPrimary)
        }
        else // move
        {
-               highlightedAction = 2;
                vector pos;
                pos = panel_pos;
                if(nPrimary == K_UPARROW)
@@ -1178,6 +1175,8 @@ void HUD_Panel_Mouse()
        }
        else
        {
+               if(prevMouseClicked)
+                       highlightedAction = 0;
                if(menu_enabled == 2)
                        mouse_over_panel = 0;
                else