]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
strafehud: minor adjustments
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Wed, 1 Jul 2020 13:06:31 +0000 (15:06 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Wed, 1 Jul 2020 13:06:31 +0000 (15:06 +0200)
qcsrc/client/hud/panel/strafehud.qc
qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc
qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qh

index 97f0c45e4fdd1e55106d3b661e63ff865ce1a131..08831681c16aa6e56b4b8d1ab1ac607e57964b6c 100644 (file)
@@ -457,10 +457,10 @@ void HUD_StrafeHUD()
         overturn_width = 180/hudangle * panel_size.x;
         overturn_width_visible = (hudangle/2 - maxangle) / hudangle * panel_size.x;
 
-        // the strafe bar fills the whole hud panel
+        // the neutral zone fills the whole strafe bar
         if(speed <= (swimming ? antiflicker_speed : 0))
         {
-            // add a background to the strafe-o-meter
+            // draw neutral zone
             if(panel_size.x > 0 && panel_size.y > 0 && autocvar_hud_panel_strafehud_bar_neutral_alpha * panel_fg_alpha > 0)
             {
                 switch(autocvar_hud_panel_strafehud_style)
@@ -482,7 +482,7 @@ void HUD_StrafeHUD()
             {
                 // calculate zone in which strafe acceleration happens
                 accelzone_width = bestangle_offset;
-                // calculate offset of overturn area
+                // calculate offset of overturn zone
                 overturn_offset = overturn_width_visible - overturn_width;
                 // move/adjust acceleration zone
                 accelzone_offset = overturn_width_visible;
@@ -490,7 +490,7 @@ void HUD_StrafeHUD()
                 // calculate zone in which strafe acceleration could also happen without changing wishdir
                 odd_accelzone_width = accelzone_width;
                 odd_accelzone_offset = overturn_offset - odd_accelzone_width;
-                // calculate the background of the strafe-o-meter
+                // calculate the neutral zone of the strafe-o-meter
                 bar_offset = bestangle_offset;
             }
             else // turning right or moving forward
@@ -498,14 +498,14 @@ void HUD_StrafeHUD()
                 // calculate zone in which strafe acceleration happens
                 accelzone_offset = bestangle_offset;
                 accelzone_width = panel_size.x - accelzone_offset;
-                // calculate offset of overturn area
+                // calculate offset of overturn zone
                 overturn_offset = panel_size.x - overturn_width_visible;
                 // adjust acceleration zone
                 accelzone_width -= overturn_width_visible;
                 // calculate zone in which strafe acceleration could also happen without changing wishdir
                 odd_accelzone_width = accelzone_width;
                 odd_accelzone_offset = overturn_offset + overturn_width;
-                // calculate the background of the strafe-o-meter
+                // calculate the neutral zone of the strafe-o-meter
                 bar_offset = odd_accelzone_offset + odd_accelzone_width;
             }
             bar_width = 360/hudangle * panel_size.x - accelzone_width - odd_accelzone_width - overturn_width;
@@ -540,10 +540,10 @@ void HUD_StrafeHUD()
             // draw odd acceleration zone
             HUD_Panel_DrawStrafeHUD(odd_accelzone_offset, odd_accelzone_width, autocvar_hud_panel_strafehud_bar_accel_color, autocvar_hud_panel_strafehud_bar_accel_alpha * panel_fg_alpha, autocvar_hud_panel_strafehud_style);
 
-            // draw overturn area
+            // draw overturn zone
             HUD_Panel_DrawStrafeHUD(overturn_offset, overturn_width, autocvar_hud_panel_strafehud_bar_overturn_color, autocvar_hud_panel_strafehud_bar_overturn_alpha * panel_fg_alpha, autocvar_hud_panel_strafehud_style);
 
-            // draw the strafe bar background
+            // draw neutral zone
             HUD_Panel_DrawStrafeHUD(bar_offset, bar_width, autocvar_hud_panel_strafehud_bar_neutral_color, autocvar_hud_panel_strafehud_bar_neutral_alpha * panel_fg_alpha, autocvar_hud_panel_strafehud_style);
 
             if(direction != 0 && direction_size_vertical.x > 0 && autocvar_hud_panel_strafehud_direction_alpha * panel_fg_alpha > 0)
@@ -571,7 +571,7 @@ void HUD_StrafeHUD()
                 float offset = !odd_angles ? bestangle_offset : odd_bestangle_offset;
                 float switch_offset = !odd_angles ? switch_bestangle_offset : switch_odd_bestangle_offset;
 
-                // both indicators are yellow if no direction can be determined
+                // both indicators are inactive if no direction can be determined
                 switch_color = direction != 0 ? autocvar_hud_panel_strafehud_switch_active_color : autocvar_hud_panel_strafehud_switch_inactive_color;
                 HUD_Panel_DrawStrafeHUD(switch_offset, bestangle_width, autocvar_hud_panel_strafehud_switch_inactive_color, autocvar_hud_panel_strafehud_switch_alpha * panel_fg_alpha, 0);
                 HUD_Panel_DrawStrafeHUD(offset, bestangle_width, switch_color, autocvar_hud_panel_strafehud_switch_alpha * panel_fg_alpha, 0);
index 0b7d0e9653c7137f9c71b36167993e9d455de70b..d77e68246bc6e3b087a2f281f9cd18ba5d226a1c 100644 (file)
@@ -48,7 +48,7 @@ void XonoticHUDStrafeHUDDialog_fill(entity me)
 
         me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_strafehud_mode"));
             e.addValue(e, _("View angle centered"), "0");
-            e.addValue(e, _("Velocity direction centered"), "1");
+            e.addValue(e, _("Velocity angle centered"), "1");
             e.configureXonoticTextSliderValues(e);
     me.TR(me);
         me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("1", "0", "_hud_panel_strafehud_demo", _("Demo mode")));
@@ -132,4 +132,11 @@ void XonoticHUDStrafeHUDDialog_fill(entity me)
         me.TDempty(me, 0.2);
 
         me.TD(me, 2, 1.9, e = makeXonoticColorpickerString("hud_panel_strafehud_direction_color", "hud_panel_strafehud_direction_color"));
+    me.TR(me);
+    me.TR(me);
+        me.TD(me, 1, 1.9, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_switch_alpha"));
+
+        me.TDempty(me, 0.2);
+
+        me.TD(me, 1, 1.9, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_direction_alpha"));
 }
index 40e37c5996c6cec6606859df2857024950e099f9..50e18f9f57edf2dd5a90325e90de3e5ce6a5d1ce 100644 (file)
@@ -6,7 +6,7 @@ CLASS(XonoticHUDStrafeHUDDialog, XonoticRootDialog)
     ATTRIB(XonoticHUDStrafeHUDDialog, title, string, _("StrafeHUD Panel"));
     ATTRIB(XonoticHUDStrafeHUDDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
     ATTRIB(XonoticHUDStrafeHUDDialog, intendedWidth, float, 0.4);
-    ATTRIB(XonoticHUDStrafeHUDDialog, rows, float, 21.5);
+    ATTRIB(XonoticHUDStrafeHUDDialog, rows, float, 22.5);
     ATTRIB(XonoticHUDStrafeHUDDialog, columns, float, 4);
     ATTRIB(XonoticHUDStrafeHUDDialog, name, string, "HUDstrafehud");
     ATTRIB(XonoticHUDStrafeHUDDialog, requiresConnection, float, true);