From 3559910ce71cf63cef1c4d4c3bc725834bf0598f Mon Sep 17 00:00:00 2001 From: k9er Date: Mon, 20 Jan 2025 21:58:21 +0000 Subject: [PATCH] Update hudpanel dialogs --- qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc | 16 ++++--- qcsrc/menu/xonotic/dialog_hudpanel_ammo.qh | 2 +- .../xonotic/dialog_hudpanel_centerprint.qc | 36 +++++++++------- .../xonotic/dialog_hudpanel_centerprint.qh | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_chat.qc | 11 ++--- .../xonotic/dialog_hudpanel_engineinfo.qc | 9 +++- .../xonotic/dialog_hudpanel_healtharmor.qc | 29 +++++++------ .../xonotic/dialog_hudpanel_healtharmor.qh | 2 +- .../xonotic/dialog_hudpanel_infomessages.qc | 21 +++++++-- .../menu/xonotic/dialog_hudpanel_itemstime.qc | 10 +++-- .../menu/xonotic/dialog_hudpanel_itemstime.qh | 2 +- .../menu/xonotic/dialog_hudpanel_modicons.qc | 17 +++++++- .../xonotic/dialog_hudpanel_notification.qc | 25 ++++++----- qcsrc/menu/xonotic/dialog_hudpanel_physics.qc | 32 ++++++++++---- qcsrc/menu/xonotic/dialog_hudpanel_physics.qh | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_pickup.qc | 32 +++++++------- .../menu/xonotic/dialog_hudpanel_powerups.qc | 22 +++++----- .../menu/xonotic/dialog_hudpanel_powerups.qh | 2 +- .../xonotic/dialog_hudpanel_pressedkeys.qc | 9 ++-- .../menu/xonotic/dialog_hudpanel_quickmenu.qc | 5 +++ qcsrc/menu/xonotic/dialog_hudpanel_radar.qc | 34 ++++++++++++--- qcsrc/menu/xonotic/dialog_hudpanel_radar.qh | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_score.qc | 5 +-- .../menu/xonotic/dialog_hudpanel_strafehud.qc | 43 ++++++++++--------- .../menu/xonotic/dialog_hudpanel_strafehud.qh | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_timer.qc | 17 +++----- qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc | 30 ++++++------- qcsrc/menu/xonotic/dialog_hudpanel_weapons.qh | 2 +- qcsrc/menu/xonotic/util.qc | 14 +++++- 29 files changed, 266 insertions(+), 169 deletions(-) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc index 611ef4a45..2ba8f077a 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc @@ -15,21 +15,25 @@ void XonoticHUDAmmoDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Ammunition display:"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", _("Show only current ammo type"))); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", _("Show only current ammo type"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent alpha:"))); + setDependent(e, "hud_panel_ammo_onlycurrent", 0, 0); me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_ammo_noncurrent_alpha")); + setDependent(e, "hud_panel_ammo_onlycurrent", 0, 0); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent scale:"))); + setDependent(e, "hud_panel_ammo_onlycurrent", 0, 0); me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_ammo_noncurrent_scale")); + setDependent(e, "hud_panel_ammo_onlycurrent", 0, 0); + me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Align icon:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:"))); me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "0", _("Left"))); me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "1", _("Right"))); + + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_ammo_progressbar", _("Enable status bar"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qh b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qh index 3af373e43..c471e7ade 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDAmmoDialog, XonoticRootDialog) ATTRIB(XonoticHUDAmmoDialog, title, string, _("Ammo Panel")); ATTRIB(XonoticHUDAmmoDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDAmmoDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDAmmoDialog, rows, float, 15.5); + ATTRIB(XonoticHUDAmmoDialog, rows, float, 16); ATTRIB(XonoticHUDAmmoDialog, columns, float, 4); ATTRIB(XonoticHUDAmmoDialog, name, string, "HUDammo"); ATTRIB(XonoticHUDAmmoDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc index 141913386..c6ef74125 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc @@ -3,28 +3,42 @@ #include "checkbox.qh" #include "textlabel.qh" #include "slider.qh" +#include "textslider.qh" #include "radiobutton.qh" void XonoticHUDCenterprintDialog_fill(entity me) { entity e; string panelname = "centerprint"; + float i; dialog_hudpanel_main_checkbox(me, panelname); dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Message duration:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Message duration:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(1, 10, 1, "hud_panel_centerprint_time")); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Fade time:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.05, "hud_panel_centerprint_fade_out")); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Fade time:"))); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_centerprint_fade_out")); + e.addValue(e, ZCTX(_("FADESPEED^Instant")), "0"); + for(i = 1; i <= 19; ++i) + e.addValue(e, strzone(ftos_decimals(i / 20, 2)), strzone(ftos_mindecimals(i / 20))); + e.addValue(e, "1.00", "1"); + e.configureXonoticTextSliderValues(e); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_centerprint_flip", _("Flip messages order"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Font scale:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 2, 0.1, "hud_panel_centerprint_fontscale")); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Bold font scale:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 3, 0.1, "hud_panel_centerprint_fontscale_bold")); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Title font scale:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 4, 0.1, "hud_panel_centerprint_fontscale_title")); + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_centerprint_flip", _("Flip messages order"))); + me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Text alignment:"))); me.TR(me); @@ -32,12 +46,4 @@ void XonoticHUDCenterprintDialog_fill(entity me) me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_centerprint_align", "0", _("Left"))); me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_centerprint_align", "0.5", _("Center"))); me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_centerprint_align", "1", _("Right"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Font scale:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 2, 0.1, "hud_panel_centerprint_fontscale")); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Bold font scale:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 3, 0.2, "hud_panel_centerprint_fontscale_bold")); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh index 465c499d7..1b5c2275a 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDCenterprintDialog, XonoticRootDialog) ATTRIB(XonoticHUDCenterprintDialog, title, string, _("Centerprint Panel")); ATTRIB(XonoticHUDCenterprintDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDCenterprintDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDCenterprintDialog, rows, float, 16.5); + ATTRIB(XonoticHUDCenterprintDialog, rows, float, 18); ATTRIB(XonoticHUDCenterprintDialog, columns, float, 4); ATTRIB(XonoticHUDCenterprintDialog, name, string, "HUDcenterprint"); ATTRIB(XonoticHUDCenterprintDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc index d1612412e..2e38d1908 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc @@ -14,16 +14,11 @@ void XonoticHUDChatDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Chat entries:"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Chat size:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Chat size:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(6, 20, 1, "con_chatsize")); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Chat lifetime:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Chat lifetime:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(5, 60, 5, "con_chattime")); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "con_chatsound", _("Chat beep sound"))); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "con_chatsound", _("Chat beep sound"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc index ef6375687..7043b8676 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc @@ -2,6 +2,7 @@ #include "textlabel.qh" #include "checkbox.qh" +#include "slider.qh" void XonoticHUDEngineInfoDialog_fill(entity me) { @@ -13,8 +14,12 @@ void XonoticHUDEngineInfoDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Engine info:"))); + me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("FPS:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_engineinfo_framecounter_exponentialmovingaverage", _("Use an averaging algorithm for fps"))); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_engineinfo_framecounter_exponentialmovingaverage", _("Use an averaging algorithm"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Decimal places:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 2, 1, "hud_panel_engineinfo_framecounter_decimals")); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc index e67f63ffc..1d1d75962 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc @@ -2,6 +2,7 @@ #include "textlabel.qh" #include "checkbox.qh" +#include "slider.qh" #include "radiobutton.qh" void XonoticHUDHealthArmorDialog_fill(entity me) @@ -15,29 +16,33 @@ void XonoticHUDHealthArmorDialog_fill(entity me) me.TR(me); me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_combined", _("Combine health and armor"))); + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_flip", _("Flip health and armor positions"))); + setDependent(e, "hud_panel_healtharmor_combined", 0, 0); + me.TR(me); me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_progressbar", _("Enable status bar"))); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Status bar alignment:"))); + me.TDempty(me, 0.2); + me.TD(me, 1, 3.8, e = makeXonoticTextLabel(0, _("Status bar alignment:"))); setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "0", _("Left"))); + me.TDempty(me, 0.4); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "0", _("Left"))); setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "1", _("Right"))); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "1", _("Right"))); setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "2", _("Inward"))); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "2", _("Inward"))); setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "3", _("Outward"))); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "3", _("Outward"))); setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1); + me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Icon alignment:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "0", _("Left"))); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "1", _("Right"))); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "2", _("Inward"))); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "3", _("Outward"))); - me.TR(me); - me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_flip", _("Flip health and armor positions"))); + me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "0", _("Left"))); + me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "1", _("Right"))); + me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "2", _("Inward"))); + me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "3", _("Outward"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qh b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qh index 9342e2933..20a4cb321 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDHealthArmorDialog, XonoticRootDialog) ATTRIB(XonoticHUDHealthArmorDialog, title, string, _("Health/Armor Panel")); ATTRIB(XonoticHUDHealthArmorDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDHealthArmorDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 16.5); + ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 18); ATTRIB(XonoticHUDHealthArmorDialog, columns, float, 4); ATTRIB(XonoticHUDHealthArmorDialog, name, string, "HUDhealtharmor"); ATTRIB(XonoticHUDHealthArmorDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc index 6b11a6915..5f6686610 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc @@ -2,19 +2,34 @@ #include "textlabel.qh" #include "checkbox.qh" +#include "slider.qh" +#include "textslider.qh" +#include "radiobutton.qh" void XonoticHUDInfoMessagesDialog_fill(entity me) { entity e; string panelname = "infomessages"; + float i; dialog_hudpanel_main_checkbox(me, panelname); dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Info messages:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Message duration:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(1, 10, 1, "hud_panel_infomessages_group_time")); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_infomessages_flip", _("Flip align"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Fade time:"))); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_infomessages_group_fadetime")); + e.addValue(e, ZCTX(_("FADESPEED^Instant")), "0"); + for(i = 1; i <= 19; ++i) + e.addValue(e, strzone(ftos_decimals(i / 20, 2)), strzone(ftos_mindecimals(i / 20))); + e.addValue(e, "1.00", "1"); + e.configureXonoticTextSliderValues(e); + + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Text alignment:"))); + me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_infomessages_flip", "0", _("Left"))); + me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_infomessages_flip", "1", _("Right"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc index 32264c5bc..0b7de8872 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc @@ -21,16 +21,18 @@ void XonoticHUDItemsTimeDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Text/icon ratio:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(2, 8, 0.5, "hud_panel_itemstime_ratio")); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Icon alignment:"))); me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "0", _("Left"))); me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "1", _("Right"))); + me.TR(me); me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar", _("Enable status bar"))); me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar_reduced", _("Reduced"))); setDependent(e, "hud_panel_itemstime_progressbar", 1, 1); - me.TR(me); - me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Text/icon ratio:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(2, 8, 0.5, "hud_panel_itemstime_ratio")); + me.TR(me); me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_hidespawned", _("Hide spawned items"))); me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qh b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qh index 0cb74ea67..104385129 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDItemsTimeDialog, XonoticRootDialog) ATTRIB(XonoticHUDItemsTimeDialog, title, string, _("Items Time Panel")); ATTRIB(XonoticHUDItemsTimeDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDItemsTimeDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 15.5); + ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 16); ATTRIB(XonoticHUDItemsTimeDialog, columns, float, 4); ATTRIB(XonoticHUDItemsTimeDialog, name, string, "HUDitemstime"); ENDCLASS(XonoticHUDItemsTimeDialog) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc index 5023d7a2d..66b3c38aa 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc @@ -1,13 +1,28 @@ #include "dialog_hudpanel_modicons.qh" #include "checkbox.qh" +#include "textlabel.qh" +#include +#include +#include +#include void XonoticHUDModIconsDialog_fill(entity me) { - //entity e; + entity e; string panelname = "modicons"; dialog_hudpanel_main_checkbox(me, panelname); dialog_hudpanel_main_settings(me, panelname); + + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, ZCTX(sprintf(_("GAMETYPE^%s:"), MapInfo_Type_ToText(MAPINFO_TYPE_CA))))); + me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "hud_panel_modicons_ca_layout", _("Show icons"))); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, ZCTX(sprintf(_("GAMETYPE^%s:"), MapInfo_Type_ToText(MAPINFO_TYPE_DOMINATION))))); + me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "hud_panel_modicons_dom_layout", _("Show icons"))); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, ZCTX(sprintf(_("GAMETYPE^%s:"), MapInfo_Type_ToText(MAPINFO_TYPE_FREEZETAG))))); + me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "hud_panel_modicons_freezetag_layout", _("Show icons"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc index 1dc0a15b7..b9c793ff2 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc @@ -3,30 +3,29 @@ #include "textlabel.qh" #include "checkbox.qh" #include "slider.qh" +#include "textslider.qh" void XonoticHUDNotificationDialog_fill(entity me) { entity e; string panelname = "notify"; + float i; dialog_hudpanel_main_checkbox(me, panelname); dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Notifications:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Entry lifetime:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(3, 15, 1, "hud_panel_notify_time")); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_notify_print", _("Also print notifications to the console"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_notify_flip", _("Flip notify order"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Entry lifetime:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(3, 15, 1, "hud_panel_notify_time")); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Entry fadetime:"))); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_notify_fadetime")); + e.addValue(e, ZCTX(_("FADESPEED^Instant")), "0"); + for(i = 1; i <= 10; ++i) + e.addValue(e, strzone(ftos_decimals(i / 2, 1)), strzone(ftos_mindecimals(i / 2))); + e.configureXonoticTextSliderValues(e); + me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Entry fadetime:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 5, 0.5, "hud_panel_notify_fadetime")); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_notify_flip", _("Flip notify order"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc index db966263f..dcc1a1207 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc @@ -4,6 +4,7 @@ #include "textslider.qh" #include "checkbox.qh" #include "slider.qh" +#include "radiobutton.qh" void XonoticHUDPhysicsDialog_fill(entity me) { @@ -21,16 +22,29 @@ void XonoticHUDPhysicsDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 1.4, e = makeXonoticCheckBox(0, "hud_panel_physics_progressbar", _("Status bar"))); - me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_physics_baralign")); - e.addValue(e, _("Left align") , "0"); - e.addValue(e, _("Right align") , "1"); - e.addValue(e, _("Inward align") , "2"); - e.addValue(e, _("Outward align"), "3"); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_physics_flip", _("Flip speed/acceleration positions"))); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Status bar"))); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_physics_progressbar")); + e.addValue(e, _("None"), "0"); + e.addValue(e, _("Both"), "1"); + e.addValue(e, _("Speed"), "2"); + e.addValue(e, _("Acceleration"), "3"); e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 3.8, e = makeXonoticTextLabel(0, _("Status bar alignment:"))); setDependent(e, "hud_panel_physics_progressbar", 1, 3); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_physics_flip", _("Flip speed/acceleration positions"))); + me.TDempty(me, 0.4); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_physics_baralign", "0", _("Left"))); + setDependent(e, "hud_panel_physics_progressbar", 1, 3); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_physics_baralign", "1", _("Right"))); + setDependent(e, "hud_panel_physics_progressbar", 1, 3); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_physics_baralign", "2", _("Inward"))); + setDependent(e, "hud_panel_physics_progressbar", 1, 3); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_physics_baralign", "3", _("Outward"))); + setDependent(e, "hud_panel_physics_progressbar", 1, 3); //speed me.TR(me); @@ -45,8 +59,8 @@ void XonoticHUDPhysicsDialog_fill(entity me) // me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("qu/s"))); // setDependent(e, "hud_panel_physics_progressbar", 1, 1); me.TR(me); - me.TDempty(me, 1); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_speed_unit_show", _("Show speed unit"))); + me.TDempty(me, 0.2); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_physics_speed_unit_show", _("Show speed unit"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_physics_topspeed", _("Top speed"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qh b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qh index 2a52bef91..b0d036390 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDPhysicsDialog, XonoticRootDialog) ATTRIB(XonoticHUDPhysicsDialog, title, string, _("Physics Panel")); ATTRIB(XonoticHUDPhysicsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDPhysicsDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDPhysicsDialog, rows, float, 15.5); + ATTRIB(XonoticHUDPhysicsDialog, rows, float, 18); ATTRIB(XonoticHUDPhysicsDialog, columns, float, 4); ATTRIB(XonoticHUDPhysicsDialog, name, string, "HUDphysics"); ATTRIB(XonoticHUDPhysicsDialog, sliderTopspeedTime, entity); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_pickup.qc b/qcsrc/menu/xonotic/dialog_hudpanel_pickup.qc index 95cb5fe3e..6ae08282a 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_pickup.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_pickup.qc @@ -4,36 +4,36 @@ #include "textlabel.qh" #include "slider.qh" #include "textslider.qh" +#include "radiobutton.qh" void XonoticHUDPickupDialog_fill(entity me) { entity e; string panelname = "pickup"; + float i; dialog_hudpanel_main_checkbox(me, panelname); dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Pickup messages:"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Message duration:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Message duration:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(1, 5, 1, "hud_panel_pickup_time")); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Fade time:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.05, "hud_panel_pickup_fade_out")); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Show timer:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_panel_pickup_showtimer")); - e.addValue(e, _("Never"), "0"); - e.addValue(e, _("Always"), "1"); - e.addValue(e, _("Spectating"), "2"); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Fade time:"))); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_pickup_fade_out")); + e.addValue(e, ZCTX(_("FADESPEED^Instant")), "0"); + for(i = 1; i <= 19; ++i) + e.addValue(e, strzone(ftos_decimals(i / 20, 2)), strzone(ftos_mindecimals(i / 20))); + e.addValue(e, "1.00", "1"); e.configureXonoticTextSliderValues(e); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Icon size scale:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Icon size scale:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(1, 3, 0.1, "hud_panel_pickup_iconsize")); + + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Show timer:"))); + me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(2, "hud_panel_pickup_showtimer", "0", _("Never"))); + me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(2, "hud_panel_pickup_showtimer", "2", _("Spectating"))); + me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(2, "hud_panel_pickup_showtimer", "1", _("Always"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc index 7e0ffae1a..c00480a37 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc @@ -16,24 +16,26 @@ void XonoticHUDPowerupsDialog_fill(entity me) me.TR(me); me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_powerups_progressbar", _("Enable status bar"))); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Status bar alignment:"))); + me.TDempty(me, 0.2); + me.TD(me, 1, 3.8, e = makeXonoticTextLabel(0, _("Status bar alignment:"))); setDependent(e, "hud_panel_powerups_progressbar", 1, 1); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "0", _("Left"))); + me.TDempty(me, 0.4); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "0", _("Left"))); setDependent(e, "hud_panel_powerups_progressbar", 1, 1); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "1", _("Right"))); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "1", _("Right"))); setDependent(e, "hud_panel_powerups_progressbar", 1, 1); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "2", _("Inward"))); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "2", _("Inward"))); setDependent(e, "hud_panel_powerups_progressbar", 1, 1); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "3", _("Outward"))); + me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "3", _("Outward"))); setDependent(e, "hud_panel_powerups_progressbar", 1, 1); + me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Icon alignment:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "0", _("Left"))); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "1", _("Right"))); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "2", _("Inward"))); - me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "3", _("Outward"))); + me.TD(me, 1, 3.8/4, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "0", _("Left"))); + me.TD(me, 1, 3.8/4, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "1", _("Right"))); + me.TD(me, 1, 3.8/4, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "2", _("Inward"))); + me.TD(me, 1, 3.8/4, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "3", _("Outward"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qh b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qh index c82f98278..ab07df980 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDPowerupsDialog, XonoticRootDialog) ATTRIB(XonoticHUDPowerupsDialog, title, string, _("Powerups Panel")); ATTRIB(XonoticHUDPowerupsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDPowerupsDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDPowerupsDialog, rows, float, 15.5); + ATTRIB(XonoticHUDPowerupsDialog, rows, float, 16); ATTRIB(XonoticHUDPowerupsDialog, columns, float, 4); ATTRIB(XonoticHUDPowerupsDialog, name, string, "HUDpowerups"); ATTRIB(XonoticHUDPowerupsDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc index 62b29e8c9..b8d19d6ab 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc @@ -1,5 +1,6 @@ #include "dialog_hudpanel_pressedkeys.qh" +#include "checkbox.qh" #include "textslider.qh" #include "slider.qh" #include "textlabel.qh" @@ -19,7 +20,9 @@ void XonoticHUDPressedKeysDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Forced aspect:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(0.2, 4, 0.1, "hud_panel_pressedkeys_aspect")); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Forced aspect:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0.2, 4, 0.1, "hud_panel_pressedkeys_aspect")); + + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_pressedkeys_attack", _("Show attack keys"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc b/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc index 128951c0c..78ac7ed9b 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc @@ -21,4 +21,9 @@ void XonoticHUDQuickMenuDialog_fill(entity me) me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_quickmenu_align", "0", _("Left"))); me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_quickmenu_align", "0.5", _("Center"))); me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_quickmenu_align", "1", _("Right"))); + + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_quickmenu_translatecommands", _("Translate commands"))); + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_quickmenu_server_is_default", _("Use the server's quickmenu"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc index 3e8db6686..53b7dc376 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc @@ -20,15 +20,35 @@ void XonoticHUDRadarDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Radar:"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Alpha:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_radar_foreground_alpha")); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Rotation:"))); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_radar_rotation")); + e.addValue(e, _("Forward"), "0"); + e.addValue(e, _("West"), "1"); + e.addValue(e, _("South"), "2"); + e.addValue(e, _("East"), "3"); + e.addValue(e, _("North"), "4"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Scale:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(1024, 8192, 512, "hud_panel_radar_scale")); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Zoom mode:"))); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_radar_zoommode")); + e.addValue(e, _("Zoomed in"), "0"); + e.addValue(e, _("Zoomed out"), "1"); + e.addValue(e, _("Always zoomed"), "2"); + e.addValue(e, _("Never zoomed"), "3"); + e.configureXonoticTextSliderValues(e); + + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Maximized radar:"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Rotation:"))); - me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_radar_rotation")); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_radar_maximized_rotation")); e.addValue(e, _("Forward"), "0"); e.addValue(e, _("West"), "1"); e.addValue(e, _("South"), "2"); @@ -38,11 +58,11 @@ void XonoticHUDRadarDialog_fill(entity me) me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Scale:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(1024, 8192, 512, "hud_panel_radar_scale")); + me.TD(me, 1, 2.6, e = makeXonoticSlider(1024, 8192, 512, "hud_panel_radar_maximized_scale")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Zoom mode:"))); - me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_radar_zoommode")); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_radar_maximized_zoommode")); e.addValue(e, _("Zoomed in"), "0"); e.addValue(e, _("Zoomed out"), "1"); e.addValue(e, _("Always zoomed"), "2"); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qh b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qh index d02f5cd59..69e1bdc66 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDRadarDialog, XonoticRootDialog) ATTRIB(XonoticHUDRadarDialog, title, string, _("Radar Panel")); ATTRIB(XonoticHUDRadarDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDRadarDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDRadarDialog, rows, float, 15.5); + ATTRIB(XonoticHUDRadarDialog, rows, float, 18); ATTRIB(XonoticHUDRadarDialog, columns, float, 4); ATTRIB(XonoticHUDRadarDialog, name, string, "HUDradar"); ATTRIB(XonoticHUDRadarDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_score.qc b/qcsrc/menu/xonotic/dialog_hudpanel_score.qc index afb97e5fd..b74d95286 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_score.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_score.qc @@ -14,10 +14,7 @@ void XonoticHUDScoreDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Score:"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Rankings:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Rankings:"))); me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(1, "hud_panel_score_rankings", "0", _("Off"))); me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(1, "hud_panel_score_rankings", "1", _("And me"))); me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(1, "hud_panel_score_rankings", "2", _("Pure"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc b/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc index 3d5a2cf71..84a7e2050 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qc @@ -6,6 +6,7 @@ #include "slider.qh" #include "textlabel.qh" #include "textslider.qh" +#include "radiobutton.qh" void StrafeHUD_ColorReset(entity btn, entity me) { @@ -23,6 +24,7 @@ void XonoticHUDStrafeHUDDialog_fill(entity me) { entity e; string panelname = "strafehud"; + int i; me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_strafehud")); @@ -36,30 +38,23 @@ void XonoticHUDStrafeHUDDialog_fill(entity me) 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.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_strafehud_mode", "0", _("View angle centered"))); + me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_strafehud_mode", "1", _("Velocity angle centered"))); 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.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(3, "hud_panel_strafehud_style", "0", _("No styling"))); + me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(3, "hud_panel_strafehud_style", "1", _("Status bar"))); + me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(3, "hud_panel_strafehud_style", "2", _("Gradient"))); 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 = makeXonoticCheckBox(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.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_strafehud_range")); + e.addValue(e, _("Dynamic"), "0"); + for(i = 10; i <= 360; i += 10) + { + string i_str = strzone(itos(i)); + e.addValue(e, i_str, i_str); + } + e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1.9, e = makeXonoticTextLabel(0, _("Strafe bar:"))); @@ -128,4 +123,12 @@ void XonoticHUDStrafeHUDDialog_fill(entity me) 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 = makeXonoticCheckBox(0, "hud_panel_strafehud_bestangle", _("Enable"))); + me.TR(me); + me.TD(me, 1, 1.9, e = makeXonoticCheckBox(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; } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qh b/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qh index 50e18f9f5..36c572f44 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_strafehud.qh @@ -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, 22.5); + ATTRIB(XonoticHUDStrafeHUDDialog, rows, float, 23); ATTRIB(XonoticHUDStrafeHUDDialog, columns, float, 4); ATTRIB(XonoticHUDStrafeHUDDialog, name, string, "HUDstrafehud"); ATTRIB(XonoticHUDStrafeHUDDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc index bea708279..c56c07c4d 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc @@ -1,8 +1,8 @@ #include "dialog_hudpanel_timer.qh" -#include "textslider.qh" #include "checkbox.qh" #include "textlabel.qh" +#include "radiobutton.qh" void XonoticHUDTimerDialog_fill(entity me) { @@ -14,16 +14,13 @@ void XonoticHUDTimerDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Timer:"))); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_timer_increment", _("Show elapsed time"))); + me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_timer_increment", _("Show elapsed time"))); + me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Secondary timer:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Secondary timer:"))); - me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_timer_secondary")); - e.addValue(e, _("Disable"), "0"); - e.addValue(e, _("Enable"), "1"); - e.addValue(e, _("Swapped"), "2"); - e.configureXonoticTextSliderValues(e); + me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(2, "hud_panel_timer_secondary", "0", _("Disable"))); + me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(2, "hud_panel_timer_secondary", "1", _("Enable"))); + me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(2, "hud_panel_timer_secondary", "2", _("Swapped"))); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc index 116b8ae2f..be4a82dbe 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc @@ -18,16 +18,14 @@ void XonoticHUDWeaponsDialog_fill(entity me) dialog_hudpanel_main_settings(me, panelname); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Fade out after:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Fade out after:"))); me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_timeout")))); e.addValue(e, _("Never"), "0"); for(i = 1; i <= 10; ++i) e.addValue(e, strzone(sprintf(_("%ds"), i)), strzone(ftos(i))); e.configureXonoticTextSliderValues(e); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Fade effect:"))); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Fade effect:"))); setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0"); me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_timeout_effect")))); e.addValue(e, ZCTX(_("EF^None")), "0"); @@ -36,35 +34,37 @@ void XonoticHUDWeaponsDialog_fill(entity me) e.addValue(e, ZCTX(_("EF^Both")), "3"); e.configureXonoticTextSliderValues(e); setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0"); + me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Weapon icons:"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_weapons_onlyowned", _("Show only owned weapons"))); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_weapons_onlyowned", _("Show only owned weapons"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent alpha:"))); + setDependent(e, "hud_panel_weapons_onlyowned", 0, 0); me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_weapons_noncurrent_alpha")); + setDependent(e, "hud_panel_weapons_onlyowned", 0, 0); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent scale:"))); + setDependent(e, "hud_panel_weapons_onlyowned", 0, 0); me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_weapons_noncurrent_scale")); + setDependent(e, "hud_panel_weapons_onlyowned", 0, 0); + me.TR(me); - me.TDempty(me, 0.2); me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Show weapon ID as:"))); - me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "0", ZCTX(_("SHOWAS^None")))); - me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "1", _("Number"))); - me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "2", _("Bind"))); + me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "0", ZCTX(_("SHOWAS^None")))); + me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "1", _("Number"))); + me.TD(me, 1, 2.6/3, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "2", _("Bind"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Weapon ID scale:"))); setDependent(e, "hud_panel_weapons_label", 1, 2); me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.05, "hud_panel_weapons_label_scale")); setDependent(e, "hud_panel_weapons_label", 1, 2); + me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_weapons_accuracy", _("Show Accuracy"))); - me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_weapons_ammo", _("Show Ammo"))); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_weapons_ammo", _("Show Ammo"))); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_weapons_accuracy", _("Show Accuracy"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Ammo bar alpha:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qh b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qh index 4f877d4d3..5baa4adcc 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDWeaponsDialog, XonoticRootDialog) ATTRIB(XonoticHUDWeaponsDialog, title, string, _("Weapons Panel")); ATTRIB(XonoticHUDWeaponsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDWeaponsDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDWeaponsDialog, rows, float, 21.5); + ATTRIB(XonoticHUDWeaponsDialog, rows, float, 22); ATTRIB(XonoticHUDWeaponsDialog, columns, float, 4); ATTRIB(XonoticHUDWeaponsDialog, name, string, "HUDweapons"); ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 937497e6d..1595426bb 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -755,8 +755,8 @@ void dialog_hudpanel_main_settings(entity me, string panelname) me.TD(me, 2, 2.6, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color")); setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), ""); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 1.0, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Use default"))); + me.TDempty(me, 0.4); + me.TD(me, 1, 1.0, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Default"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:"))); @@ -794,6 +794,16 @@ void dialog_hudpanel_main_settings(entity me, string panelname) for(i = 0; i <= 10; ++i) e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5))); e.configureXonoticTextSliderValues(e); + + string hide_ondeath = strcat("hud_panel_", panelname, "_hide_ondeath"); + if(cvar_type(hide_ondeath) & CVAR_TYPEFLAG_EXISTS) + { + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, strzone(hide_ondeath), _("Hide on death"))); + } + + me.gotoRC(me, me.currentRow + 0.5, 0); me.setFirstColumn(me, me.currentColumn); } bool isServerSingleplayer() -- 2.39.5