seta hud_panel_scoreboard_team_size_position 0 "where to show the team size (0 = do not show, 1 = left of scoreboard, 2 = right of scoreboard), will move team scores to the other side if necessary"
seta _hud_panel_strafehud_demo "0" "HUD changes angle during configure"
+seta _hud_panel_strafehud_center "0" "puts the angle indicator in the center during HUD configure"
seta hud_panel_strafehud_bar_alpha ".2" "opacity of the strafe meter"
seta hud_panel_strafehud_bar_color "1 1 1" "color of the strafe meter"
seta hud_panel_strafehud_indicator_color "0 1 0" "color of the strafe angle indicator"
}
else // simulate turning for HUD setup
{
- if(autocvar__hud_panel_strafehud_demo && ((time - strafehud_demo_time) >= .025))
+ if(autocvar__hud_panel_strafehud_center)
{
- strafehud_demo_time = time;
- strafehud_demo_angle += 1 * strafehud_demo_direction;
- if(fabs(strafehud_demo_angle) >= 55)
+ strafehud_angle = strafehud_demo_angle = 0;
+ strafehud_demo_time = 0;
+ strafehud_wishangle = 0;
+ }
+ else
+ {
+ if(autocvar__hud_panel_strafehud_demo && ((time - strafehud_demo_time) >= .025))
{
- strafehud_demo_direction = -strafehud_demo_direction;
+ strafehud_demo_time = time;
+ strafehud_demo_angle += strafehud_demo_direction;
+ if(fabs(strafehud_demo_angle) >= 55)
+ {
+ strafehud_demo_direction = -strafehud_demo_direction;
+ }
}
+ strafehud_angle = strafehud_demo_angle;
+ strafehud_wishangle = 45 * (strafehud_demo_angle > 0 ? 1 : -1);
}
- strafehud_angle = strafehud_demo_angle;
- strafehud_wishangle = 45 * (strafehud_demo_angle > 0 ? 1 : -1);
}
if (autocvar_v_flipped)
me.TR(me);
me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("1", "0", "_hud_panel_strafehud_demo", _("Demo mode")));
- me.TDempty(me, 0.4);
+ setDependentStringNotEqual(e, "_hud_panel_strafehud_center", "1");
+ me.TDempty(me, 0.4);
me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, _("Range:")));
me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 360, 5, "hud_panel_strafehud_angle"));
+ me.TR(me);
+ me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("1", "0", "_hud_panel_strafehud_center", _("Center angle")));
+
+ me.TDempty(me, 0.9);
+ me.TD(me, 1, 1.9, e = makeXonoticButton(_("Reset colors"), '0 0 0'));
+ e.onClick = StrafeHUD_ColorReset;
+ e.onClickEntity = me;
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Strafe bar:")));
me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Active:")));
me.TDempty(me, 0.1);
me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Inactive:")));
-
- me.TDempty(me, 0.1);
- me.TD(me, 2, 1.9, e = makeXonoticColorpickerString("hud_panel_strafehud_direction_color", "hud_panel_strafehud_direction_color"));
me.TR(me);
me.TDempty(me, 0.1);
me.TD(me, 2, 0.9, e = makeXonoticColorpickerString("hud_panel_strafehud_indicator_color", "hud_panel_strafehud_indicator_color"));
me.TDempty(me, 0.1);
me.TD(me, 2, 0.9, e = makeXonoticColorpickerString("hud_panel_strafehud_indicator_switch_color", "hud_panel_strafehud_indicator_switch_color"));
- me.TR(me);
- me.TDempty(me, 2.1);
- me.TD(me, 1, 1.9, e = makeXonoticButton(_("Reset colors"), '0 0 0'));
- e.onClick = StrafeHUD_ColorReset;
- e.onClickEntity = me;
+
+ me.TDempty(me, 0.1);
+ me.TD(me, 2, 1.9, e = makeXonoticColorpickerString("hud_panel_strafehud_direction_color", "hud_panel_strafehud_direction_color"));
}