]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Now it's possible to individually disable progressbar/text for speed and acceleration
authorterencehill <piuntn@gmail.com>
Sat, 15 Jan 2011 18:59:00 +0000 (19:59 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 15 Jan 2011 18:59:00 +0000 (19:59 +0100)
FFS cannot add anything to the menu, it's full :(

Also rename hud_panel_physics_acceleration_progressbar_mode to hud_panel_physics_progressbar_acceleration_mode

_hud_descriptions.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_xhair_minimal.cfg
hud_nexuiz.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc
qcsrc/menu/xonotic/dialog_hudpanel_physics.c

index 16ae97565bbf45e6bcd25aa3fc06f05e0b39eab3..8c4343fb8349a816d44b82caf2eb6d9270401635 100644 (file)
@@ -230,5 +230,6 @@ seta hud_panel_physics_bg_border "" "if set to something else than \"\" = overri
 seta hud_panel_physics_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 seta hud_panel_physics_baralign "" "0 = align bars to the left, 1 = align bars to the right, 2 = align only left bar to the right, 3 = align only right bar to the right, 4 = align bars to the center"
 seta hud_panel_physics_flip "" "flip speed/acceleration positions"
-seta hud_panel_physics_progressbar "" "enable progressbar in panel"
-seta hud_panel_physics_progressbar_acceleration_mode "" "0 = progressbar increases from the center to the right if the acceleration is positive, to the left if it's negative; 1 = progressbar increases from the border in the same direction for both positive and negative accelerations"
+seta hud_panel_physics_progressbar "" "enable progressbar in panel (2 = only for speed; 3 = only for acceleration)"
+seta hud_panel_physics_acceleration_progressbar_mode "" "0 = progressbar increases from the center to the right if the acceleration is positive, to the left if it's negative; 1 = progressbar increases from the border in the same direction for both positive and negative accelerations"
+seta hud_panel_physics_text "" "show text in panel (2 = only for speed; 3 = only for acceleration)"
index 7e94d8ce081aa4c5ec7d53ec19e147f25aca2cc0..cda91be1b2c67ee8ad5b65ecce88a1cd41ad0252 100644 (file)
@@ -228,7 +228,8 @@ seta hud_panel_physics_bg_border ""
 seta hud_panel_physics_bg_padding ""
 seta hud_panel_physics_flip "0"
 seta hud_panel_physics_baralign "0"
+seta hud_panel_physics_acceleration_progressbar_mode "0"
 seta hud_panel_physics_progressbar "1"
-seta hud_panel_physics_progressbar_acceleration_mode "0"
+seta hud_panel_physics_text "1"
 
 menu_sync
index e6b849b21d2018ab7cd541bb5a564971c4e56bbb..753e6810fe8bac37997de79c560b5387a09b0d6e 100644 (file)
@@ -228,7 +228,8 @@ seta hud_panel_physics_bg_border ""
 seta hud_panel_physics_bg_padding ""
 seta hud_panel_physics_flip "0"
 seta hud_panel_physics_baralign "0"
-seta hud_panel_physics_progressbar "1"
-seta hud_panel_physics_progressbar_acceleration_mode "0"
+seta hud_panel_physics_acceleration_progressbar_mode "0"
+seta hud_panel_physics_progressbar "3"
+seta hud_panel_physics_text "2"
 
 menu_sync
index 18be11cec2decf5450bb8bcf14e5fe627f5c3ba7..48d1efd59275229843c134933b8c15d60dc1b9f3 100644 (file)
@@ -227,7 +227,8 @@ seta hud_panel_physics_bg_border ""
 seta hud_panel_physics_bg_padding ""
 seta hud_panel_physics_flip "0"
 seta hud_panel_physics_baralign "0"
-seta hud_panel_physics_progressbar "1"
-seta hud_panel_physics_progressbar_acceleration_mode "0"
+seta hud_panel_physics_acceleration_progressbar_mode "0"
+seta hud_panel_physics_progressbar "3"
+seta hud_panel_physics_text "2"
 
 menu_sync
index 514d347042c208b974de64d2f9ec0d0c525a02c2..29bfab2b2840cc628cac75586c35dbe092eba71e 100644 (file)
@@ -228,7 +228,8 @@ seta hud_panel_physics_bg_border ""
 seta hud_panel_physics_bg_padding ""
 seta hud_panel_physics_flip "0"
 seta hud_panel_physics_baralign "0"
-seta hud_panel_physics_progressbar "1"
-seta hud_panel_physics_progressbar_acceleration_mode "0"
+seta hud_panel_physics_acceleration_progressbar_mode "0"
+seta hud_panel_physics_progressbar "3"
+seta hud_panel_physics_text "2"
 
 menu_sync
index 4635407cb36ac51d38666aabb9f9f7a07a8e8751..f866f5a5d094f6b12221c561f5e89b07897066ec 100644 (file)
@@ -189,16 +189,17 @@ float autocvar_hud_panel_notify_flip;
 float autocvar_hud_panel_notify_print;
 float autocvar_hud_panel_notify_time;
 float autocvar_hud_panel_physics;
-float autocvar_hud_panel_physics_progressbar_acceleration_mode;
+float autocvar_hud_panel_physics_acceleration_progressbar_mode;
 float autocvar_hud_panel_physics_acceleration_max;
+float autocvar_hud_panel_physics_progressbar;
 float autocvar_hud_panel_physics_acceleration_vertical;
 float autocvar_hud_panel_physics_baralign;
 float autocvar_hud_panel_physics_flip;
-float autocvar_hud_panel_physics_progressbar;
 float autocvar_hud_panel_physics_speed_max;
 float autocvar_hud_panel_physics_speed_unit;
 float autocvar_hud_panel_physics_speed_unit_show;
 float autocvar_hud_panel_physics_speed_vertical;
+float autocvar_hud_panel_physics_text;
 float autocvar_hud_panel_physics_topspeed;
 float autocvar_hud_panel_physics_topspeed_time;
 float autocvar_hud_panel_powerups;
index b029ad450e8d1e8aa006078fcc676647e7b9b95a..f0d972593458e81ef33744bbcbd5fd7079123fbe 100644 (file)
@@ -4302,39 +4302,44 @@ void HUD_Physics(void)
                speed_baralign = (autocvar_hud_panel_physics_baralign == 2);
                acceleration_baralign = (autocvar_hud_panel_physics_baralign == 3);
        }
-       if (autocvar_hud_panel_physics_progressbar_acceleration_mode == 0)
+       if (autocvar_hud_panel_physics_acceleration_progressbar_mode == 0)
                acceleration_baralign = 3; //override hud_panel_physics_baralign value for acceleration
 
        //draw speed
-       if(speed && autocvar_hud_panel_physics_progressbar)
+       if(speed)
+       if(autocvar_hud_panel_physics_progressbar == 1 || autocvar_hud_panel_physics_progressbar == 2)
        {
                HUD_Panel_GetProgressBarColor(speed);
                HUD_Panel_DrawProgressBar(panel_pos + speed_offset, panel_size, "progressbar", speed/max_speed, 0, speed_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
        }
        vector tmp_offset, tmp_size;
-       tmp_size_x = panel_size_x * 0.75;
-       tmp_size_y = panel_size_y;
-       if (speed_baralign)
-               tmp_offset_x = panel_size_x - tmp_size_x;
-       //else
-               //tmp_offset_x = 0;
-       drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(speed), tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-
-       //draw speed unit
-       if (speed_baralign)
-               tmp_offset_x = 0;
-       else
-               tmp_offset_x = tmp_size_x;
-       if (autocvar_hud_panel_physics_speed_unit_show)
-       {
-               //tmp_offset_y = 0;
-               tmp_size_x = panel_size_x * (1 - 0.75);
-               tmp_size_y = panel_size_y * 0.4;
-               drawstring_aspect(panel_pos + speed_offset + tmp_offset, unit, tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       if (autocvar_hud_panel_physics_text == 1 || autocvar_hud_panel_physics_text == 2)
+       {
+               tmp_size_x = panel_size_x * 0.75;
+               tmp_size_y = panel_size_y;
+               if (speed_baralign)
+                       tmp_offset_x = panel_size_x - tmp_size_x;
+               //else
+                       //tmp_offset_x = 0;
+               drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(speed), tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+
+               //draw speed unit
+               if (speed_baralign)
+                       tmp_offset_x = 0;
+               else
+                       tmp_offset_x = tmp_size_x;
+               if (autocvar_hud_panel_physics_speed_unit_show)
+               {
+                       //tmp_offset_y = 0;
+                       tmp_size_x = panel_size_x * (1 - 0.75);
+                       tmp_size_y = panel_size_y * 0.4;
+                       drawstring_aspect(panel_pos + speed_offset + tmp_offset, unit, tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               }
        }
 
        //compute and draw top speed
        if (autocvar_hud_panel_physics_topspeed)
+       if (autocvar_hud_panel_physics_text == 1 || autocvar_hud_panel_physics_text == 2)
        {
                if (autocvar__hud_configure)
                {
@@ -4360,7 +4365,8 @@ void HUD_Physics(void)
                if (f > 0)
                {
                        //top speed progressbar peak
-                       if(autocvar_hud_panel_physics_progressbar && speed < top_speed)
+                       if(speed < top_speed)
+                       if(autocvar_hud_panel_physics_progressbar == 1 || autocvar_hud_panel_physics_progressbar == 2)
                        {
                                float peak_offset_x;
                                vector peak_size;
@@ -4395,7 +4401,8 @@ void HUD_Physics(void)
        }
 
        //draw acceleration
-       if(acceleration && autocvar_hud_panel_physics_progressbar)
+       if(acceleration)
+       if(autocvar_hud_panel_physics_progressbar == 1 || autocvar_hud_panel_physics_progressbar == 3)
        {
                if (acceleration < 0)
                        HUD_Panel_GetProgressBarColor(acceleration_neg);
@@ -4403,7 +4410,8 @@ void HUD_Physics(void)
                        HUD_Panel_GetProgressBarColor(acceleration);
                HUD_Panel_DrawProgressBar(panel_pos + acceleration_offset, panel_size, "progressbar", acceleration/autocvar_hud_panel_physics_acceleration_max, 0, acceleration_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
        }
-       drawstring_aspect(panel_pos + acceleration_offset, strcat(ftos_decimals(acceleration, 2), "g"), panel_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       if (autocvar_hud_panel_physics_text == 1 || autocvar_hud_panel_physics_text == 3)
+               drawstring_aspect(panel_pos + acceleration_offset, strcat(ftos_decimals(acceleration, 2), "g"), panel_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 }
 
 /*
index ae3767e5d217506067605e36ae38074911c3dd22..c245f97bdc3ce53c85379e7df65602fa19a019ba 100644 (file)
@@ -84,7 +84,7 @@ void XonoticHUDPhysicsDialog_fill(entity me)
                        e.addValue(e, "Inward align" , "2");
                        e.addValue(e, "Outward align", "3");
                        e.configureXonoticTextSliderValues(e);
-                       setDependent(e, "hud_panel_physics_progressbar", 1, 1);
+                       setDependent(e, "hud_panel_physics_progressbar", 1, 3);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_flip", "Flip speed/acceleration positions"));