]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
use relative coordinates, limit powerups to 99 instead of 999
authorFruitieX <rasse@rasse-lappy.localdomain>
Thu, 13 May 2010 14:25:21 +0000 (17:25 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Thu, 13 May 2010 14:25:21 +0000 (17:25 +0300)
defaultXonotic.cfg
qcsrc/client/hud.qc

index 51ebd115808a001bc67097b34ebc61515f803de4..0ad1ed638b55e962cfe62789eca7f9104671ccb9 100644 (file)
@@ -1339,7 +1339,7 @@ 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 dock_oldhud "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"
 
@@ -1349,8 +1349,8 @@ seta hud_hudselector 1    "0 = health/armor positions flipped, 1 = default hud layo
 seta hud_showcurrentammo 0 "0 = show all ammo types, 1 = show only the ammo type of the current weapon"
 
 seta hud_weaponicons 1 "enable/disable this panel"
-seta hud_weaponicons_pos "157 -55" "position of this panel"
-seta hud_weaponicons_size "175 55" "size of this panel"
+seta hud_weaponicons_pos "0 0" "position of this panel"
+seta hud_weaponicons_size "0.1 0.1" "size of this panel"
 seta hud_weaponicons_number 1 "show number of weapon"
 seta hud_weaponicons_accuracybar_height 3 "height of accuracy bar"
 seta hud_weaponicons_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
@@ -1359,8 +1359,8 @@ seta hud_weaponicons_bg_alpha 0 "if set to something else than 0 = override defa
 seta hud_weaponicons_bg_border 0 "if set to something else than 0 = override size of border around the background"
 
 seta hud_inventory 1 "enable/disable this panel"
-seta hud_inventory_pos "0 -55" "position of this panel"
-seta hud_inventory_size "150 55" "size of this panel"
+seta hud_inventory_pos "0.2 0.2" "position of this panel"
+seta hud_inventory_size "0.1 0.1" "size of this panel"
 seta hud_inventory_onlycurrent 0 "1 = show only current ammo type"
 seta hud_inventory_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_inventory_bg_color "" "optional R G B string of the background color, otherwise use hud default"
@@ -1368,8 +1368,8 @@ seta hud_inventory_bg_alpha 0 "if set to something else than 0 = override defaul
 seta hud_inventory_bg_border 0 "if set to something else than 0 = override size of border around the background"
 
 seta hud_powerups 1 "enable/disable this panel"
-seta hud_powerups_pos "-130 47.5" "position of this panel"
-seta hud_powerups_size "130 30" "size of this panel"
+seta hud_powerups_pos "0.3 0.3" "position of this panel"
+seta hud_powerups_size "0.1 0.1" "size of this panel"
 seta hud_powerups_flip 1 "flip strength/shield positions"
 seta hud_powerups_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_powerups_bg_color "" "optional R G B string of the background color, otherwise use hud default"
@@ -1379,8 +1379,8 @@ seta hud_progressbar_strength_color "0 0 0.6" "R G B vector of the progress bar
 seta hud_progressbar_shield_color "0.6 0 0.6" "R G B vector of the progress bar background color"
 
 seta hud_healtharmor 1 "enable/disable this panel"
-seta hud_healtharmor_pos "0 -92.5" "position of this panel"
-seta hud_healtharmor_size "332 30" "size of this panel"
+seta hud_healtharmor_pos "0 0.1" "position of this panel"
+seta hud_healtharmor_size "0.1 0.1" "size of this panel"
 seta hud_healtharmor_flip 1 "flip health/armor positions"
 seta hud_healtharmor_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_healtharmor_bg_color "" "optional R G B string of the background color, otherwise use hud default"
@@ -1391,16 +1391,16 @@ seta hud_progressbar_armor_color "0 0.6 0" "R G B vector of the progress bar bac
 seta hud_progressbar_fuel_color "0.6 0.6 0" "R G B vector of the progress bar background color"
 
 seta hud_notify 0 "enable/disable this panel"
-seta hud_notify_pos "-300 -37.5" "position of this base of the panel"
-seta hud_notify_size "200 37.5" "size of this panel with all notifications on"
+seta hud_notify_pos "0.1 0" "position of this base of the panel"
+seta hud_notify_size "0.1 0.1" "size of this panel with all notifications on"
 seta hud_notify_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_notify_bg_color "" "optional R G B string of the background color, otherwise use hud default"
 seta hud_notify_bg_alpha 0 "if set to something else than 0 = override default alpha"
 seta hud_notify_bg_border 0 "if set to something else than 0 = override size of border around the background"
 
 seta hud_timer 1 "enable/disable this panel"
-seta hud_timer_pos "-210 0" "position of this base of the panel"
-seta hud_timer_size "210 40" "size of this panel"
+seta hud_timer_pos "0.2 0" "position of this base of the panel"
+seta hud_timer_size "0.1 0.1" "size of this panel"
 seta hud_timer_increment 0 "show elapsed time instead of remaining time"
 seta hud_timer_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_timer_bg_color "" "optional R G B string of the background color, otherwise use hud default"
@@ -1408,32 +1408,32 @@ seta hud_timer_bg_alpha 0 "if set to something else than 0 = override default al
 seta hud_timer_bg_border 0 "if set to something else than 0 = override size of border around the background"
 
 seta hud_radar 1 "enable/disable this panel"
-seta hud_radar_pos "0 0" "position of this base of the panel"
-seta hud_radar_size "180 150" "size of this panel"
+seta hud_radar_pos "0.2 0.1" "position of this base of the panel"
+seta hud_radar_size "0.1 0.1" "size of this panel"
 seta hud_radar_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_radar_bg_color "" "optional R G B string of the background color, otherwise use hud default"
 seta hud_radar_bg_alpha 0 "if set to something else than 0 = override default alpha"
 seta hud_radar_bg_border 0 "if set to something else than 0 = override size of border around the background"
 
 seta hud_score 1 "enable/disable this panel"
-seta hud_score_pos "-300 -37.5" "position of this base of the panel"
-seta hud_score_size "200 37.5" "size of this panel"
+seta hud_score_pos "0 0.3" "position of this base of the panel"
+seta hud_score_size "0.1 0.1" "size of this panel"
 seta hud_score_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_score_bg_color "" "optional R G B string of the background color, otherwise use hud default"
 seta hud_score_bg_alpha 0 "if set to something else than 0 = override default alpha"
 seta hud_score_bg_border 0 "if set to something else than 0 = override size of border around the background"
 
 seta hud_racetimer 1 "enable/disable this panel"
-seta hud_racetimer_pos "280 0" "position of this base of the panel"
-seta hud_racetimer_size "240 60" "size of this panel"
+seta hud_racetimer_pos "0 0.4 0" "position of this base of the panel"
+seta hud_racetimer_size "0.1 0.1" "size of this panel"
 seta hud_racetimer_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_racetimer_bg_color "" "optional R G B string of the background color, otherwise use hud default"
 seta hud_racetimer_bg_alpha 0 "if set to something else than 0 = override default alpha"
 seta hud_racetimer_bg_border 0 "if set to something else than 0 = override size of border around the background"
 
 seta hud_vote 1 "enable/disable this panel"
-seta hud_vote_pos "-240 -60" "position of this base of the panel"
-seta hud_vote_size "240 60" "size of this panel"
+seta hud_vote_pos "0 0.5" "position of this base of the panel"
+seta hud_vote_size "0.1 0.1" "size of this panel"
 seta hud_vote_alreadyvoted_alpha 0.75 "alpha of the vote dialog after you have voted"
 seta hud_vote_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_vote_bg_color "" "optional R G B string of the background color, otherwise use hud default"
@@ -1441,8 +1441,8 @@ seta hud_vote_bg_alpha 0 "if set to something else than 0 = override default alp
 seta hud_vote_bg_border 0 "if set to something else than 0 = override size of border around the background"
 
 seta hud_pressedkeys 1 "enable/disable this panel"
-seta hud_pressedkeys_pos "-150 -155.97" "position of this base of the panel"
-seta hud_pressedkeys_size "150 88.47" "size of this panel"
+seta hud_pressedkeys_pos "0.6 0" "position of this base of the panel"
+seta hud_pressedkeys_size "0.1 0.1" "size of this panel"
 seta hud_pressedkeys_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
 seta hud_pressedkeys_bg_color "" "optional R G B string of the background color, otherwise use hud default"
 seta hud_pressedkeys_bg_alpha 0 "if set to something else than 0 = override default alpha"
index 5286b2c3072121e55c6b482fb5060ccba29a52b3..73e0f61063c0aa918f3195767bf8fafe21005a5a 100644 (file)
@@ -566,7 +566,7 @@ vector HUD_Panel_CheckLimitSize(float id, vector mySize)
                        mySize_x = max(mySize_y * 0.7, mySize_x); // at least 0.7 * height
                        break;
                case 2: 
-                       mySize_x = max(mySize_y * 2, mySize_x); // at least 2 * height
+                       mySize_x = max(mySize_y * 1.5, mySize_x); // at least 2 * height
                        break;
                case 3: 
                        mySize_x = max(mySize_y * 2, mySize_x); // at least 2 * height
@@ -601,7 +601,12 @@ float HUD_Panel_CheckActive(float id)
 // return size of given panel
 vector HUD_Panel_GetSize(float id)
 {
-       return stov(cvar_string(strcat("hud_", HUD_Panel_GetName(id), "_size")));
+       vector mySize;
+       mySize = stov(cvar_string(strcat("hud_", HUD_Panel_GetName(id), "_size")));
+
+       mySize = eX * mySize_x * vid_conwidth + eY * mySize_y * vid_conheight;
+
+       return mySize;
 }
 
 // return pos of given panel
@@ -610,6 +615,8 @@ vector HUD_Panel_GetPos(float id)
        vector pos;
        pos = stov(cvar_string(strcat("hud_", HUD_Panel_GetName(id), "_pos")));
 
+       pos = eX * pos_x * vid_conwidth + eY * pos_y * vid_conheight;
+
        if (pos_x < 0)
                pos_x = vid_conwidth + pos_x;
        if (pos_y < 0)
@@ -774,7 +781,7 @@ float HUD_Panel_SetSize(float id, vector mySize)
                didntresize = 1; // resized X
 
        string s;
-       s = strcat(ftos(mySize_x), " ", ftos(mySize_y));
+       s = strcat(ftos(mySize_x/vid_conwidth), " ", ftos(mySize_y/vid_conheight));
        cvar_set(strcat("hud_", HUD_Panel_GetName(id), "_size"), s);
        return didntresize;
 }
@@ -877,7 +884,7 @@ void HUD_Panel_SetPos(float id, vector pos, float didntresize)
                pos_y = pos_y - vid_conheight;
 
        string s;
-       s = strcat(ftos(pos_x), " ", ftos(pos_y));
+       s = strcat(ftos(pos_x/vid_conwidth), " ", ftos(pos_y/vid_conheight));
 
        cvar_set(strcat("hud_", HUD_Panel_GetName(id), "_pos"), s);
 }
@@ -1283,8 +1290,8 @@ void HUD_Powerups() {
 
        float strength_time, shield_time;
 
-       strength_time = bound(0, ceil(getstatf(STAT_STRENGTH_FINISHED) - time), 999);
-       shield_time = bound(0, ceil(getstatf(STAT_INVINCIBLE_FINISHED) - time), 999);
+       strength_time = bound(0, ceil(getstatf(STAT_STRENGTH_FINISHED) - time), 99);
+       shield_time = bound(0, ceil(getstatf(STAT_INVINCIBLE_FINISHED) - time), 99);
 
        if(cvar("_hud_configure"))
        {