From a9565c9974399e1a616244c05d41207b6de3fd31 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Thu, 13 May 2010 10:53:46 +0300 Subject: [PATCH] allow disabling collision checking against other panels --- defaultXonotic.cfg | 4 +++- qcsrc/client/hud.qc | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 979df639f..51ebd1158 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1333,10 +1333,12 @@ seta hud_progressbar_alpha "0.5" "alpha of progressbars" seta hud_bg "border" "sets the default background for the panels, file must exist in data/gfx/hud/. 0 = disable background by default" seta hud_bg_color "0 0.7 0.8" "sets the default background color for the panels" seta hud_bg_alpha 0.8 "alpha of the background" -seta hud_configure_bg_minalpha 0.5 "minimum panel background alpha when in hud configure mode" seta hud_bg_border 10 "sets the default border size for the panels" seta hud_fg_alpha 1 "alpha of the foreground" +seta hud_configure_checkcollisions 1 "check for collisions against other panels when in hud configure mode" +seta hud_configure_bg_minalpha 0.5 "minimum panel background alpha when in hud configure mode" + seta hud_dock 0 "overlay the whole screen with this dock background, 0 = disable" seta hud_dock_color "0 0.7 0.8" "dock color" seta hud_dock_alpha 0.8 "alpha of the dock" diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 8cd8794a9..5286b2c30 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -752,7 +752,8 @@ float HUD_Panel_SetSize(float id, vector mySize) myPos = HUD_Panel_GetPos(id); // check for collisions - mySize = HUD_Panel_CheckResize(id, HUD_Panel_GetPos(id), mySize); + if(cvar("hud_configure_checkcollisions")) + mySize = HUD_Panel_CheckResize(id, HUD_Panel_GetPos(id), mySize); mySize_x = bound(0.025 * vid_conwidth, mySize_x, vid_conwidth - myPos_x); mySize_y = bound(0.025 * vid_conheight, mySize_y, vid_conheight - myPos_y); @@ -864,7 +865,8 @@ void HUD_Panel_SetPos(float id, vector pos, float didntresize) vector mySize; mySize = HUD_Panel_GetSize(id); - pos = HUD_Panel_CheckMove(id, pos, mySize); + if(cvar("hud_configure_checkcollisions")) + pos = HUD_Panel_CheckMove(id, pos, mySize); pos_x = bound(0, pos_x, vid_conwidth - mySize_x); pos_y = bound(0, pos_y, vid_conheight - mySize_y); -- 2.39.2