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)"
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
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
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
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
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;
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)
{
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;
}
//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);
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);
}
/*
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"));