From 0549713f25fdbfc6f138ae390abc7c9bb616da53 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sun, 28 May 2023 08:21:34 +0200 Subject: [PATCH] strafehud: replace spaces with tabs in strafehud menu code --- qcsrc/client/hud/panel/strafehud.qh | 2 +- .../menu/xonotic/dialog_hudpanel_strafehud.qc | 230 +++++++++--------- 2 files changed, 116 insertions(+), 116 deletions(-) diff --git a/qcsrc/client/hud/panel/strafehud.qh b/qcsrc/client/hud/panel/strafehud.qh index 4f59ce3c4..834c5a5e7 100644 --- a/qcsrc/client/hud/panel/strafehud.qh +++ b/qcsrc/client/hud/panel/strafehud.qh @@ -3,7 +3,7 @@ int autocvar_hud_panel_strafehud = 3; bool autocvar__hud_panel_strafehud_demo = false; -bool autocvar_hud_panel_strafehud_dynamichud = true; +bool autocvar_hud_panel_strafehud_dynamichud = true; int autocvar_hud_panel_strafehud_mode = 0; float autocvar_hud_panel_strafehud_range = 90; int autocvar_hud_panel_strafehud_style = 2; diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc b/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc index 8e209abb6..9108c5167 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc @@ -9,123 +9,123 @@ void StrafeHUD_ColorReset(entity btn, entity me) { - cvar_set("hud_panel_strafehud_bar_accel_color", cvar_defstring("hud_panel_strafehud_bar_accel_color")); - cvar_set("hud_panel_strafehud_bar_neutral_color", cvar_defstring("hud_panel_strafehud_bar_neutral_color")); - cvar_set("hud_panel_strafehud_bar_overturn_color", cvar_defstring("hud_panel_strafehud_bar_overturn_color")); - cvar_set("hud_panel_strafehud_angle_accel_color", cvar_defstring("hud_panel_strafehud_angle_accel_color")); - cvar_set("hud_panel_strafehud_angle_neutral_color", cvar_defstring("hud_panel_strafehud_angle_neutral_color")); - cvar_set("hud_panel_strafehud_angle_overturn_color", cvar_defstring("hud_panel_strafehud_angle_overturn_color")); - cvar_set("hud_panel_strafehud_switch_color", cvar_defstring("hud_panel_strafehud_switch_color")); - cvar_set("hud_panel_strafehud_bestangle_color", cvar_defstring("hud_panel_strafehud_bestangle_color")); + cvar_set("hud_panel_strafehud_bar_accel_color", cvar_defstring("hud_panel_strafehud_bar_accel_color")); + cvar_set("hud_panel_strafehud_bar_neutral_color", cvar_defstring("hud_panel_strafehud_bar_neutral_color")); + cvar_set("hud_panel_strafehud_bar_overturn_color", cvar_defstring("hud_panel_strafehud_bar_overturn_color")); + cvar_set("hud_panel_strafehud_angle_accel_color", cvar_defstring("hud_panel_strafehud_angle_accel_color")); + cvar_set("hud_panel_strafehud_angle_neutral_color", cvar_defstring("hud_panel_strafehud_angle_neutral_color")); + cvar_set("hud_panel_strafehud_angle_overturn_color", cvar_defstring("hud_panel_strafehud_angle_overturn_color")); + cvar_set("hud_panel_strafehud_switch_color", cvar_defstring("hud_panel_strafehud_switch_color")); + cvar_set("hud_panel_strafehud_bestangle_color", cvar_defstring("hud_panel_strafehud_bestangle_color")); } void XonoticHUDStrafeHUDDialog_fill(entity me) { - entity e; - string panelname = "strafehud"; - - me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_strafehud")); - e.addValue(e, _("Disable"), "0"); - e.addValue(e, _("Enable"), "1"); - e.addValue(e, _("Enable even observing"), "2"); - e.addValue(e, _("Enable only in Race/CTS"), "3"); - e.configureXonoticTextSliderValues(e); - - dialog_hudpanel_main_settings(me, panelname); - - me.TR(me); - me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("StrafeHUD mode:"))); - - me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_strafehud_mode")); - e.addValue(e, _("View angle centered"), "0"); - e.addValue(e, _("Velocity angle centered"), "1"); - e.configureXonoticTextSliderValues(e); - me.TR(me); - me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("StrafeHUD style:"))); - - me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_strafehud_style")); - e.addValue(e, _("no styling"), "0"); - e.addValue(e, _("progress bar"), "1"); - e.addValue(e, _("gradient"), "2"); - e.configureXonoticTextSliderValues(e); - me.TR(me); - me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Range:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 360, 5, "hud_panel_strafehud_range")); - me.TR(me); - me.TD(me, 1, 1.9, e = makeXonoticCheckBoxString("1", "0", "_hud_panel_strafehud_demo", _("Demo mode"))); - - me.TDempty(me, 0.2); - - 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, 1.9, e = makeXonoticTextLabel(0, _("Strafe bar:"))); - - me.TDempty(me, 0.2); - - me.TD(me, 1, 1.9, e = makeXonoticTextLabel(0, _("Angle indicator:"))); - me.TR(me); - me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Neutral:"))); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Good:"))); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Overturn:"))); - - me.TDempty(me, 0.2); - - me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Neutral:"))); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Good:"))); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Overturn:"))); - me.TR(me); - me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_bar_neutral_color", "hud_panel_strafehud_bar_neutral_color")); - me.TDempty(me, 0.1); - me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_bar_accel_color", "hud_panel_strafehud_bar_accel_color")); - me.TDempty(me, 0.1); - me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_bar_overturn_color", "hud_panel_strafehud_bar_overturn_color")); - - me.TDempty(me, 0.2); - - me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_angle_neutral_color", "hud_panel_strafehud_angle_neutral_color")); - me.TDempty(me, 0.1); - me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_angle_accel_color", "hud_panel_strafehud_angle_accel_color")); - me.TDempty(me, 0.1); - me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_angle_overturn_color", "hud_panel_strafehud_angle_overturn_color")); - me.TR(me); - me.TR(me); - me.TD(me, 1, 0.56666666, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_bar_neutral_alpha")); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.56666666, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_bar_accel_alpha")); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.56666666, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_bar_overturn_alpha")); - - me.TDempty(me, 0.2); - - me.TD(me, 1, 1.9, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_angle_alpha")); - me.TR(me); - me.TD(me, 1, 1.9, e = makeXonoticTextLabel(0, _("Switch indicator:"))); - - me.TDempty(me, 0.2); - - me.TD(me, 1, 1.9, e = makeXonoticTextLabel(0, _("Best angle indicator:"))); - me.TR(me); - me.TD(me, 2, 1.9, e = makeXonoticColorpickerString("hud_panel_strafehud_switch_color", "hud_panel_strafehud_switch_color")); - - me.TDempty(me, 0.2); - - me.TD(me, 2, 1.9, e = makeXonoticColorpickerString("hud_panel_strafehud_bestangle_color", "hud_panel_strafehud_bestangle_color")); - me.TR(me); - me.TR(me); - me.TD(me, 1, 0.9, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_switch_alpha")); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.9, e = makeXonoticCheckBoxString("1", "0", "hud_panel_strafehud_switch", _("Enable"))); - - me.TDempty(me, 0.2); - - me.TD(me, 1, 0.9, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_bestangle_alpha")); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.9, e = makeXonoticCheckBoxString("1", "0", "hud_panel_strafehud_bestangle", _("Enable"))); + entity e; + string panelname = "strafehud"; + + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_strafehud")); + e.addValue(e, _("Disable"), "0"); + e.addValue(e, _("Enable"), "1"); + e.addValue(e, _("Enable even observing"), "2"); + e.addValue(e, _("Enable only in Race/CTS"), "3"); + e.configureXonoticTextSliderValues(e); + + dialog_hudpanel_main_settings(me, panelname); + + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("StrafeHUD mode:"))); + + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_strafehud_mode")); + e.addValue(e, _("View angle centered"), "0"); + e.addValue(e, _("Velocity angle centered"), "1"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("StrafeHUD style:"))); + + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_strafehud_style")); + e.addValue(e, _("no styling"), "0"); + e.addValue(e, _("progress bar"), "1"); + e.addValue(e, _("gradient"), "2"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Range:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 360, 5, "hud_panel_strafehud_range")); + me.TR(me); + me.TD(me, 1, 1.9, e = makeXonoticCheckBoxString("1", "0", "_hud_panel_strafehud_demo", _("Demo mode"))); + + me.TDempty(me, 0.2); + + 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, 1.9, e = makeXonoticTextLabel(0, _("Strafe bar:"))); + + me.TDempty(me, 0.2); + + me.TD(me, 1, 1.9, e = makeXonoticTextLabel(0, _("Angle indicator:"))); + me.TR(me); + me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Neutral:"))); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Good:"))); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Overturn:"))); + + me.TDempty(me, 0.2); + + me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Neutral:"))); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Good:"))); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.56666666, e = makeXonoticTextLabel(0, _("Overturn:"))); + me.TR(me); + me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_bar_neutral_color", "hud_panel_strafehud_bar_neutral_color")); + me.TDempty(me, 0.1); + me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_bar_accel_color", "hud_panel_strafehud_bar_accel_color")); + me.TDempty(me, 0.1); + me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_bar_overturn_color", "hud_panel_strafehud_bar_overturn_color")); + + me.TDempty(me, 0.2); + + me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_angle_neutral_color", "hud_panel_strafehud_angle_neutral_color")); + me.TDempty(me, 0.1); + me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_angle_accel_color", "hud_panel_strafehud_angle_accel_color")); + me.TDempty(me, 0.1); + me.TD(me, 2, 0.56666666, e = makeXonoticColorpickerString("hud_panel_strafehud_angle_overturn_color", "hud_panel_strafehud_angle_overturn_color")); + me.TR(me); + me.TR(me); + me.TD(me, 1, 0.56666666, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_bar_neutral_alpha")); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.56666666, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_bar_accel_alpha")); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.56666666, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_bar_overturn_alpha")); + + me.TDempty(me, 0.2); + + me.TD(me, 1, 1.9, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_angle_alpha")); + me.TR(me); + me.TD(me, 1, 1.9, e = makeXonoticTextLabel(0, _("Switch indicator:"))); + + me.TDempty(me, 0.2); + + me.TD(me, 1, 1.9, e = makeXonoticTextLabel(0, _("Best angle indicator:"))); + me.TR(me); + me.TD(me, 2, 1.9, e = makeXonoticColorpickerString("hud_panel_strafehud_switch_color", "hud_panel_strafehud_switch_color")); + + me.TDempty(me, 0.2); + + me.TD(me, 2, 1.9, e = makeXonoticColorpickerString("hud_panel_strafehud_bestangle_color", "hud_panel_strafehud_bestangle_color")); + me.TR(me); + me.TR(me); + me.TD(me, 1, 0.9, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_switch_alpha")); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.9, e = makeXonoticCheckBoxString("1", "0", "hud_panel_strafehud_switch", _("Enable"))); + + me.TDempty(me, 0.2); + + me.TD(me, 1, 0.9, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_strafehud_bestangle_alpha")); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.9, e = makeXonoticCheckBoxString("1", "0", "hud_panel_strafehud_bestangle", _("Enable"))); } -- 2.39.2