From: FruitieX Date: Tue, 8 Jun 2010 17:20:46 +0000 (+0300) Subject: fix resizing the notify panel X-Git-Tag: xonotic-v0.1.0preview~541^2~97 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=84c44c54d68aab2629ded6ecb2ee41ea629260a8;p=xonotic%2Fxonotic-data.pk3dir.git fix resizing the notify panel --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 96af1bfbc..6a9e8695c 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -661,6 +661,10 @@ vector HUD_Panel_GetMinSize(float id) if(cvar("hud_healtharmor") == 2) mySize_y = 0.23; // 0.23 * width, trial and error... break; + case 4: + mySize_x = 0.8; // 8/10 * height, as panel cant support more than 10 entries... + mySize_y = 1/8; // 1/8 * width + break; case 5: mySize_y = 1/4.1; // 1/4.1 * width, trial and error... break; @@ -2386,7 +2390,7 @@ void HUD_Notify (void) } float entries, height; - entries = 8 * mySize_y/mySize_x; + entries = bound(1, floor(8 * mySize_y/mySize_x), 10); height = mySize_y/entries; vector fontsize; @@ -2401,7 +2405,7 @@ void HUD_Notify (void) string s; float i; - for(i = 0; i <= entries; ++i) + for(i = 0; i < entries; ++i) { a = bound(0, when + (fadetime - (time - killnotify_times[i]))/fadetime, 1);