From: terencehill Date: Sat, 13 Oct 2012 22:37:32 +0000 (+0200) Subject: Fix bug where a panel resized to fullscreen cannot be resized anymore (with mouse... X-Git-Tag: xonotic-v0.7.0~200^2^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b7d48ce83747935ff6e84166b6f78726778fb538;p=xonotic%2Fxonotic-data.pk3dir.git Fix bug where a panel resized to fullscreen cannot be resized anymore (with mouse left button) --- diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index 0f990c694..c1d67af6c 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -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);