From: terencehill Date: Sat, 3 Mar 2018 12:31:02 +0000 (+0100) Subject: HUD panrel dialogs: shorten strings in items that enable/disable panels (a few of... X-Git-Tag: xonotic-v0.8.5~2260 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b4034a8d42ecc767f5105a4669e709989e9e494c;p=xonotic%2Fxonotic-data.pk3dir.git HUD panrel dialogs: shorten strings in items that enable/disable panels (a few of them were barely readable because too much compressed) --- diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc index 2e67e7acf..611ef4a45 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc @@ -10,7 +10,9 @@ void XonoticHUDAmmoDialog_fill(entity me) entity e; string panelname = "ammo"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Ammunition display:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qh b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qh index 9113a0279..3af373e43 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); + ATTRIB(XonoticHUDAmmoDialog, rows, float, 15.5); 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 332f6753f..938f69a8c 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc @@ -10,7 +10,9 @@ void XonoticHUDCenterprintDialog_fill(entity me) entity e; string panelname = "centerprint"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TDempty(me, 0.2); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh index 9fc6846eb..2b952580e 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, 15); + ATTRIB(XonoticHUDCenterprintDialog, rows, float, 15.5); 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 1ffa41f68..d1612412e 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc @@ -9,7 +9,9 @@ void XonoticHUDChatDialog_fill(entity me) entity e; string panelname = "chat"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Chat entries:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qh b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qh index 570c2d616..da2f329bb 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDChatDialog, XonoticRootDialog) ATTRIB(XonoticHUDChatDialog, title, string, _("Chat Panel")); ATTRIB(XonoticHUDChatDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDChatDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDChatDialog, rows, float, 15); + ATTRIB(XonoticHUDChatDialog, rows, float, 15.5); ATTRIB(XonoticHUDChatDialog, columns, float, 4); ATTRIB(XonoticHUDChatDialog, name, string, "HUDchat"); ATTRIB(XonoticHUDChatDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc index b46d3aa02..ef6375687 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc @@ -8,7 +8,9 @@ void XonoticHUDEngineInfoDialog_fill(entity me) entity e; string panelname = "engineinfo"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Engine info:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qh b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qh index b74146502..706767146 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDEngineInfoDialog, XonoticRootDialog) ATTRIB(XonoticHUDEngineInfoDialog, title, string, _("Engine Info Panel")); ATTRIB(XonoticHUDEngineInfoDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDEngineInfoDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15); + ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15.5); ATTRIB(XonoticHUDEngineInfoDialog, columns, float, 4); ATTRIB(XonoticHUDEngineInfoDialog, name, string, "HUDengineinfo"); ATTRIB(XonoticHUDEngineInfoDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc index ac305b832..e67f63ffc 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc @@ -9,7 +9,9 @@ void XonoticHUDHealthArmorDialog_fill(entity me) entity e; string panelname = "healtharmor"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_combined", _("Combine health and armor"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qh b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qh index b37f41b76..9342e2933 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); + ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 16.5); 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 d758ad206..6b11a6915 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc @@ -8,7 +8,9 @@ void XonoticHUDInfoMessagesDialog_fill(entity me) entity e; string panelname = "infomessages"; - DIALOG_HUDPANEL_COMMON(); + 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:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qh b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qh index 5d9032ffb..a6370d33e 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDInfoMessagesDialog, XonoticRootDialog) ATTRIB(XonoticHUDInfoMessagesDialog, title, string, _("Info Messages Panel")); ATTRIB(XonoticHUDInfoMessagesDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDInfoMessagesDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDInfoMessagesDialog, rows, float, 15); + ATTRIB(XonoticHUDInfoMessagesDialog, rows, float, 15.5); ATTRIB(XonoticHUDInfoMessagesDialog, columns, float, 4); ATTRIB(XonoticHUDInfoMessagesDialog, name, string, "HUDinfomessages"); ATTRIB(XonoticHUDInfoMessagesDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc index aeb8c8c77..32264c5bc 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc @@ -13,12 +13,12 @@ void XonoticHUDItemsTimeDialog_fill(entity me) me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_itemstime")); - e.addValue(e, ZCTX(_("PNL^Disabled")), "0"); - e.addValue(e, ZCTX(_("PNL^Enabled spectating")), "1"); - e.addValue(e, ZCTX(_("PNL^Enabled even playing in warmup")), "2"); + e.addValue(e, _("Disable"), "0"); + e.addValue(e, _("Enable spectating"), "1"); + e.addValue(e, _("Enable even playing in warmup"), "2"); e.configureXonoticTextSliderValues(e); - DIALOG_HUDPANEL_COMMON_NOTOGGLE(); + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qh b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qh index 507dedb7c..0cb74ea67 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); + ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 15.5); 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 53cad1a93..afc47af30 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc @@ -7,5 +7,7 @@ void XonoticHUDModIconsDialog_fill(entity me) entity e; string panelname = "modicons"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qh b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qh index 3a3b72f6c..a59d09af4 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDModIconsDialog, XonoticRootDialog) ATTRIB(XonoticHUDModIconsDialog, title, string, _("Mod Icons Panel")); ATTRIB(XonoticHUDModIconsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDModIconsDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDModIconsDialog, rows, float, 15); + ATTRIB(XonoticHUDModIconsDialog, rows, float, 15.5); ATTRIB(XonoticHUDModIconsDialog, columns, float, 4); ATTRIB(XonoticHUDModIconsDialog, name, string, "HUDmodicons"); ATTRIB(XonoticHUDModIconsDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc index 490051846..1dc0a15b7 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc @@ -9,7 +9,9 @@ void XonoticHUDNotificationDialog_fill(entity me) entity e; string panelname = "notify"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Notifications:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qh b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qh index f816e4ffe..be51051f6 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDNotificationDialog, XonoticRootDialog) ATTRIB(XonoticHUDNotificationDialog, title, string, _("Notification Panel")); ATTRIB(XonoticHUDNotificationDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDNotificationDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDNotificationDialog, rows, float, 15); + ATTRIB(XonoticHUDNotificationDialog, rows, float, 15.5); ATTRIB(XonoticHUDNotificationDialog, columns, float, 4); ATTRIB(XonoticHUDNotificationDialog, name, string, "HUDnotify"); ATTRIB(XonoticHUDNotificationDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc index eabc93dab..3a1e0bee1 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc @@ -12,13 +12,13 @@ void XonoticHUDPhysicsDialog_fill(entity me) me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_physics")); - e.addValue(e, _("Panel disabled"), "0"); - e.addValue(e, _("Panel enabled"), "1"); - e.addValue(e, _("Panel enabled even observing"), "2"); - e.addValue(e, _("Panel enabled only in Race/CTS"), "3"); + 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_COMMON_NOTOGGLE(); + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 1.4, e = makeXonoticCheckBox(0, "hud_panel_physics_progressbar", _("Status bar"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qh b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qh index f6f19135d..2a52bef91 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); + ATTRIB(XonoticHUDPhysicsDialog, rows, float, 15.5); ATTRIB(XonoticHUDPhysicsDialog, columns, float, 4); ATTRIB(XonoticHUDPhysicsDialog, name, string, "HUDphysics"); ATTRIB(XonoticHUDPhysicsDialog, sliderTopspeedTime, entity); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc index 1b490d102..7e0ffae1a 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc @@ -9,7 +9,9 @@ void XonoticHUDPowerupsDialog_fill(entity me) entity e; string panelname = "powerups"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_powerups_progressbar", _("Enable status bar"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qh b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qh index 7f67fa600..c82f98278 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, 14); + ATTRIB(XonoticHUDPowerupsDialog, rows, float, 15.5); 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 4e24ff998..30d957210 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc @@ -11,12 +11,12 @@ void XonoticHUDPressedKeysDialog_fill(entity me) me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_pressedkeys")); - e.addValue(e, _("Panel disabled"), "0"); - e.addValue(e, _("Panel enabled when spectating"), "1"); - e.addValue(e, _("Panel always enabled"), "2"); + e.addValue(e, ("Disable"), "0"); + e.addValue(e, ("Enable when spectating"), "1"); + e.addValue(e, ("Always enable"), "2"); e.configureXonoticTextSliderValues(e); - DIALOG_HUDPANEL_COMMON_NOTOGGLE(); + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TDempty(me, 0.2); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qh b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qh index cc82959e6..46452c696 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDPressedKeysDialog, XonoticRootDialog) ATTRIB(XonoticHUDPressedKeysDialog, title, string, _("Pressed Keys Panel")); ATTRIB(XonoticHUDPressedKeysDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDPressedKeysDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15); + ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15.5); ATTRIB(XonoticHUDPressedKeysDialog, columns, float, 4); ATTRIB(XonoticHUDPressedKeysDialog, name, string, "HUDpressedkeys"); ATTRIB(XonoticHUDPressedKeysDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc b/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc index 4012bc61a..128951c0c 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc @@ -9,7 +9,10 @@ void XonoticHUDQuickMenuDialog_fill(entity me) entity e; string panelname = "quickmenu"; - DIALOG_HUDPANEL_COMMON_NOTOGGLE(); + // this panel has no main cvar + //dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Text alignment:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qh b/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qh index 16f93c13d..ac6693a64 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDQuickMenuDialog, XonoticRootDialog) ATTRIB(XonoticHUDQuickMenuDialog, title, string, _("Quick Menu Panel")); ATTRIB(XonoticHUDQuickMenuDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDQuickMenuDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDQuickMenuDialog, rows, float, 15); + ATTRIB(XonoticHUDQuickMenuDialog, rows, float, 15.5); ATTRIB(XonoticHUDQuickMenuDialog, columns, float, 4); ATTRIB(XonoticHUDQuickMenuDialog, name, string, "HUDquickmenu"); ENDCLASS(XonoticHUDQuickMenuDialog) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc b/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc index 2673e5460..d4bbe51f5 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc @@ -7,5 +7,7 @@ void XonoticHUDRaceTimerDialog_fill(entity me) entity e; string panelname = "racetimer"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qh b/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qh index 7c814e382..81a8f0053 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDRaceTimerDialog, XonoticRootDialog) ATTRIB(XonoticHUDRaceTimerDialog, title, string, _("Race Timer Panel")); ATTRIB(XonoticHUDRaceTimerDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDRaceTimerDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDRaceTimerDialog, rows, float, 15); + ATTRIB(XonoticHUDRaceTimerDialog, rows, float, 15.5); ATTRIB(XonoticHUDRaceTimerDialog, columns, float, 4); ATTRIB(XonoticHUDRaceTimerDialog, name, string, "HUDracetimer"); ATTRIB(XonoticHUDRaceTimerDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc index de9ed6898..3e8db6686 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc @@ -12,12 +12,12 @@ void XonoticHUDRadarDialog_fill(entity me) me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_radar")); - e.addValue(e, _("Panel disabled"), "0"); - e.addValue(e, _("Panel enabled in teamgames"), "1"); - e.addValue(e, _("Panel always enabled"), "2"); + e.addValue(e, _("Disable"), "0"); + e.addValue(e, _("Enable in team games"), "1"); + e.addValue(e, _("Always enable"), "2"); e.configureXonoticTextSliderValues(e); - DIALOG_HUDPANEL_COMMON_NOTOGGLE(); + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Radar:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qh b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qh index 04617b677..d02f5cd59 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); + ATTRIB(XonoticHUDRadarDialog, rows, float, 15.5); 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 f04ca30da..afb97e5fd 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_score.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_score.qc @@ -9,7 +9,9 @@ void XonoticHUDScoreDialog_fill(entity me) entity e; string panelname = "score"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Score:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_score.qh b/qcsrc/menu/xonotic/dialog_hudpanel_score.qh index d97787404..20fa6cf96 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_score.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_score.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDScoreDialog, XonoticRootDialog) ATTRIB(XonoticHUDScoreDialog, title, string, _("Score Panel")); ATTRIB(XonoticHUDScoreDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDScoreDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDScoreDialog, rows, float, 15); + ATTRIB(XonoticHUDScoreDialog, rows, float, 15.5); ATTRIB(XonoticHUDScoreDialog, columns, float, 4); ATTRIB(XonoticHUDScoreDialog, name, string, "HUDscore"); ATTRIB(XonoticHUDScoreDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc index dd9a7b878..84c6d862d 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc @@ -8,7 +8,9 @@ void XonoticHUDTimerDialog_fill(entity me) entity e; string panelname = "timer"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Timer:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qh b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qh index 61955495e..dac91cc2a 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDTimerDialog, XonoticRootDialog) ATTRIB(XonoticHUDTimerDialog, title, string, _("Timer Panel")); ATTRIB(XonoticHUDTimerDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDTimerDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDTimerDialog, rows, float, 15); + ATTRIB(XonoticHUDTimerDialog, rows, float, 15.5); ATTRIB(XonoticHUDTimerDialog, columns, float, 4); ATTRIB(XonoticHUDTimerDialog, name, string, "HUDtimer"); ATTRIB(XonoticHUDTimerDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc b/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc index e8afa7ca7..39c9a69f7 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc @@ -9,7 +9,9 @@ void XonoticHUDVoteDialog_fill(entity me) entity e; string panelname = "vote"; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Alpha after voting:"))); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_vote.qh b/qcsrc/menu/xonotic/dialog_hudpanel_vote.qh index 061c69e56..b07b189e5 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_vote.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_vote.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDVoteDialog, XonoticRootDialog) ATTRIB(XonoticHUDVoteDialog, title, string, _("Vote Panel")); ATTRIB(XonoticHUDVoteDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDVoteDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDVoteDialog, rows, float, 15); + ATTRIB(XonoticHUDVoteDialog, rows, float, 15.5); ATTRIB(XonoticHUDVoteDialog, columns, float, 4); ATTRIB(XonoticHUDVoteDialog, name, string, "HUDvote"); ATTRIB(XonoticHUDVoteDialog, requiresConnection, float, true); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc index 61339b6b9..116b8ae2f 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc @@ -13,7 +13,9 @@ void XonoticHUDWeaponsDialog_fill(entity me) string panelname = "weapons"; float i; - DIALOG_HUDPANEL_COMMON(); + dialog_hudpanel_main_checkbox(me, panelname); + + dialog_hudpanel_main_settings(me, panelname); me.TR(me); me.TDempty(me, 0.2); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qh b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qh index fad14749e..4f877d4d3 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); + ATTRIB(XonoticHUDWeaponsDialog, rows, float, 21.5); 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 7b381b544..450c034fd 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -758,12 +758,21 @@ entity makeXonoticCheckBoxString(string, string, string, string); entity makeXonoticCheckBox(float, string, string); .bool sendCvars; -void dialog_hudpanel_common_notoggle(entity me, string panelname) +void dialog_hudpanel_main_checkbox(entity me, string panelname) { - float i; entity e; me.TR(me); + me.TDempty(me, 1.5); + me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable"))); +} + +void dialog_hudpanel_main_settings(entity me, string panelname) +{ + float i; + entity e; + + me.gotoRC(me, me.currentRow + 1.5, 0); me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:"))); me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg")))); e.addValue(e, _("Default"), ""); diff --git a/qcsrc/menu/xonotic/util.qh b/qcsrc/menu/xonotic/util.qh index 96fef2ad4..f5bd636d8 100644 --- a/qcsrc/menu/xonotic/util.qh +++ b/qcsrc/menu/xonotic/util.qh @@ -36,13 +36,8 @@ string GameType_GetIcon(int cnt); int GameType_GetCount(); int GameType_GetTotalCount(); -void dialog_hudpanel_common_notoggle(entity me, string panelname); -#define DIALOG_HUDPANEL_COMMON_NOTOGGLE() \ - dialog_hudpanel_common_notoggle(me, panelname) -#define DIALOG_HUDPANEL_COMMON() \ - me.TR(me); \ - me.TD(me, 1, 4, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable panel"))); \ - DIALOG_HUDPANEL_COMMON_NOTOGGLE() +void dialog_hudpanel_main_checkbox(entity me, string panelname); +void dialog_hudpanel_main_settings(entity me, string panelname); float getFadedAlpha(float currentAlpha, float startAlpha, float targetAlpha);