From: FruitieX Date: Thu, 3 Jun 2010 17:51:48 +0000 (+0300) Subject: cleanup X-Git-Tag: xonotic-v0.1.0preview~541^2~116 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=29ca16a09197e2c6f7571295c41f3a6598a1aa24 cleanup --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index a7792e9dca..f6faae15b2 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1051,6 +1051,10 @@ void HUD_Panel_SetPosSize(float id, vector resizeorigin) mySize_x = max(minSize_x * mySize_y, mySize_x); mySize_y = max(minSize_y * mySize_x, mySize_y); + // minimum panel size cap + mySize_x = max(0.025 * vid_conwidth, mySize_x); + mySize_y = max(0.025 * vid_conheight, mySize_y); + // needed? oldPos = HUD_Panel_GetPos(id); oldSize = HUD_Panel_GetSize(id); @@ -1078,8 +1082,8 @@ void HUD_Panel_SetPosSize(float id, vector resizeorigin) mySize_y = min(myPos_y + mySize_y, mySize_y); // bottom/right screen edges - mySize_x = bound(0.025 * vid_conwidth, mySize_x, vid_conwidth - myPos_x); // TODO: make this a min like above, move 0.025 stuff elsewhere - mySize_y = bound(0.025 * vid_conheight, mySize_y, vid_conheight - myPos_y); + mySize_x = min(vid_conwidth - myPos_x, mySize_x); + mySize_y = min(vid_conheight - myPos_y, mySize_y); if(cvar("hud_configure_grid")) {