]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix bug where a panel resized to fullscreen cannot be resized anymore (with mouse...
authorterencehill <piuntn@gmail.com>
Sat, 13 Oct 2012 22:37:32 +0000 (00:37 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 13 Oct 2012 22:37:32 +0000 (00:37 +0200)
qcsrc/client/hud_config.qc

index 0f990c69410d2646ccb0f8dca6a2281d6f46e3be..c1d67af6c38224daf3e5fd9965367ed5970b83a8 100644 (file)
@@ -908,7 +908,7 @@ float HUD_Panel_Check_Mouse_Pos(float allow_move)
                border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
 
                // move
-               if(allow_move && mousepos_x >= panel_pos_x && mousepos_y >= panel_pos_y && mousepos_x <= panel_pos_x + panel_size_x && mousepos_y <= panel_pos_y + panel_size_y)
+               if(allow_move && mousepos_x > panel_pos_x && mousepos_y > panel_pos_y && mousepos_x < panel_pos_x + panel_size_x && mousepos_y < panel_pos_y + panel_size_y)
                {
                        return 1;
                }
@@ -988,7 +988,7 @@ void HUD_Panel_Highlight(float allow_move)
                border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
 
                // move
-               if(allow_move && mousepos_x >= panel_pos_x && mousepos_y >= panel_pos_y && mousepos_x <= panel_pos_x + panel_size_x && mousepos_y <= panel_pos_y + panel_size_y)
+               if(allow_move && mousepos_x > panel_pos_x && mousepos_y > panel_pos_y && mousepos_x < panel_pos_x + panel_size_x && mousepos_y < panel_pos_y + panel_size_y)
                {
                        highlightedPanel = i;
                        HUD_Panel_FirstInDrawQ(i);