From 4436f07fbff157136abac7658b7790e5ef0ac7ca Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 27 Dec 2025 20:08:15 +0000 Subject: [PATCH] Move settings to Gameplay tab. --- .../Logic/Settings/DisplaySettingsLogic.cs | 52 ------------ .../Logic/Settings/GamePlaySettingsLogic.cs | 83 +++++++++++++++++-- mods/cnc/chrome/settings-display.yaml | 67 --------------- mods/cnc/chrome/settings-gameplay.yaml | 75 ++++++++++++++++- mods/cnc/chrome/settings.yaml | 4 +- mods/cnc/fluent/chrome.ftl | 10 +-- mods/common/chrome/settings-display.yaml | 63 -------------- mods/common/chrome/settings-gameplay.yaml | 75 ++++++++++++++++- mods/common/chrome/settings.yaml | 4 +- mods/common/fluent/chrome.ftl | 10 +-- 10 files changed, 232 insertions(+), 211 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Settings/DisplaySettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Settings/DisplaySettingsLogic.cs index 70d606e861..80c6a71024 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Settings/DisplaySettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Settings/DisplaySettingsLogic.cs @@ -15,7 +15,6 @@ using System.Collections.ObjectModel; using System.Globalization; using System.Linq; using OpenRA.Graphics; -using OpenRA.Mods.Common.Traits; using OpenRA.Primitives; using OpenRA.Widgets; @@ -73,7 +72,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly WorldViewportSizes viewportSizes; readonly GameSettings gameSettings; readonly GraphicSettings graphicSettings; - readonly PlayerSettings playerSettings; static GraphicSettings originalGraphicSettings; readonly string showOnDamage; @@ -94,7 +92,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic viewportSizes = modData.GetOrCreate(); gameSettings = modData.GetSettings(); graphicSettings = modData.GetSettings(); - playerSettings = modData.GetSettings(); originalGraphicSettings ??= graphicSettings.Clone(); legacyFullscreen = FluentProvider.GetMessage(LegacyFullscreen); @@ -150,8 +147,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (panel.GetOrNull("PAUSE_SHELLMAP_CHECKBOX") != null) SettingsUtils.BindCheckboxPref(panel, "PAUSE_SHELLMAP_CHECKBOX", gameSettings, "PauseShellmap"); - SettingsUtils.BindCheckboxPref(panel, "HIDE_REPLAY_CHAT_CHECKBOX", gameSettings, "HideReplayChat"); - var windowModeDropdown = panel.Get("MODE_DROPDOWN"); windowModeDropdown.OnMouseDown = _ => ShowWindowModeDropdown(windowModeDropdown, graphicSettings, scrollPanel); windowModeDropdown.GetText = () => graphicSettings.Mode == WindowMode.Windowed @@ -239,48 +234,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic panel.Get("FRAME_LIMIT_SLIDER").IsDisabled = () => !frameLimitCheckbox.IsChecked() || frameLimitGamespeedCheckbox.IsChecked(); - var escPressed = false; - var nameTextfield = panel.Get("PLAYERNAME"); - nameTextfield.IsDisabled = () => world.Type != WorldType.Shellmap; - nameTextfield.Text = Settings.SanitizedPlayerName(playerSettings.Name); - nameTextfield.OnLoseFocus = () => - { - if (escPressed) - { - escPressed = false; - return; - } - - nameTextfield.Text = nameTextfield.Text.Trim(); - if (nameTextfield.Text.Length == 0) - nameTextfield.Text = Settings.SanitizedPlayerName(playerSettings.Name); - else - { - nameTextfield.Text = Settings.SanitizedPlayerName(nameTextfield.Text); - playerSettings.Name = nameTextfield.Text; - } - }; - - nameTextfield.OnEnterKey = _ => { nameTextfield.YieldKeyboardFocus(); return true; }; - nameTextfield.OnEscKey = _ => - { - nameTextfield.Text = Settings.SanitizedPlayerName(playerSettings.Name); - escPressed = true; - nameTextfield.YieldKeyboardFocus(); - return true; - }; - - var colorManager = modData.DefaultRules.Actors[SystemActors.World].TraitInfo(); - - var colorDropdown = panel.Get("PLAYERCOLOR"); - colorDropdown.IsDisabled = () => world.Type != WorldType.Shellmap; - colorDropdown.OnMouseDown = _ => colorManager.ShowColorDropDown(colorDropdown, playerSettings.Color, null, worldRenderer, color => - { - playerSettings.Color = color; - playerSettings.Save(); - }); - colorDropdown.Get("COLORBLOCK").GetColor = () => playerSettings.Color; - SettingsUtils.AdjustSettingsScrollPanelLayout(scrollPanel); return () => @@ -288,7 +241,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic int.TryParse(windowWidth.Text, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out var x); int.TryParse(windowHeight.Text, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out var y); graphicSettings.WindowedSize = new int2(x, y); - nameTextfield.YieldKeyboardFocus(); return graphicSettings.Mode != originalGraphicSettings.Mode || graphicSettings.VideoDisplay != originalGraphicSettings.VideoDisplay || @@ -302,7 +254,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var defaultGameSettings = new GameSettings(); var defaultGraphicSettings = new GraphicSettings(); - var defaultPlayerSettings = new PlayerSettings(); return () => { graphicSettings.CapFramerate = defaultGraphicSettings.CapFramerate; @@ -324,9 +275,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic Viewport.LastMousePos = (Viewport.LastMousePos.ToFloat2() * oldScale / graphicSettings.UIScale).ToInt2(); } - playerSettings.Color = defaultPlayerSettings.Color; - playerSettings.Name = defaultPlayerSettings.Name; - gameSettings.TextNotificationPoolFilters = defaultGameSettings.TextNotificationPoolFilters; }; } diff --git a/OpenRA.Mods.Common/Widgets/Logic/Settings/GamePlaySettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Settings/GamePlaySettingsLogic.cs index 48323b5033..a3be3134fb 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Settings/GamePlaySettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Settings/GamePlaySettingsLogic.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; +using OpenRA.Graphics; using OpenRA.Mods.Common.Traits; using OpenRA.Widgets; @@ -33,25 +34,77 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly int[] autoSaveFileNumbers = [3, 5, 10, 20, 50, 100]; readonly AutoSaveSettings autoSaveSettings; + readonly GameSettings gameSettings; + readonly PlayerSettings playerSettings; + readonly WorldRenderer worldRenderer; + readonly ModData modData; + + TextFieldWidget nameTextfield; [ObjectCreator.UseCtor] - public GameplaySettingsLogic(ModData modData, SettingsLogic settingsLogic, string panelID, string label) + public GameplaySettingsLogic(ModData modData, SettingsLogic settingsLogic, string panelID, string label, WorldRenderer worldRenderer) { + this.modData = modData; + this.worldRenderer = worldRenderer; + autoSaveSettings = modData.GetSettings(); + gameSettings = modData.GetSettings(); + playerSettings = modData.GetSettings(); settingsLogic.RegisterSettingsPanel(panelID, label, InitPanel, ResetPanel); } Func InitPanel(Widget panel) { var scrollPanel = panel.Get("SETTINGS_SCROLLPANEL"); - SettingsUtils.AdjustSettingsScrollPanelLayout(scrollPanel); + var world = worldRenderer.World; + + var escPressed = false; + nameTextfield = panel.Get("PLAYERNAME"); + nameTextfield.IsDisabled = () => world.Type != WorldType.Shellmap; + nameTextfield.Text = Settings.SanitizedPlayerName(playerSettings.Name); + nameTextfield.OnLoseFocus = () => + { + if (escPressed) + { + escPressed = false; + return; + } + + nameTextfield.Text = nameTextfield.Text.Trim(); + if (nameTextfield.Text.Length == 0) + nameTextfield.Text = Settings.SanitizedPlayerName(playerSettings.Name); + else + { + nameTextfield.Text = Settings.SanitizedPlayerName(nameTextfield.Text); + playerSettings.Name = nameTextfield.Text; + } + }; + + nameTextfield.OnEnterKey = _ => { nameTextfield.YieldKeyboardFocus(); return true; }; + nameTextfield.OnEscKey = _ => + { + nameTextfield.Text = Settings.SanitizedPlayerName(playerSettings.Name); + escPressed = true; + nameTextfield.YieldKeyboardFocus(); + return true; + }; + + var colorManager = modData.DefaultRules.Actors[SystemActors.World].TraitInfo(); + + var colorDropdown = panel.Get("PLAYERCOLOR"); + colorDropdown.IsDisabled = () => world.Type != WorldType.Shellmap; + colorDropdown.OnMouseDown = _ => colorManager.ShowColorDropDown(colorDropdown, playerSettings.Color, null, worldRenderer, color => + { + playerSettings.Color = color; + playerSettings.Save(); + }); + colorDropdown.Get("COLORBLOCK").GetColor = () => playerSettings.Color; + + SettingsUtils.BindCheckboxPref(panel, "HIDE_REPLAY_CHAT_CHECKBOX", gameSettings, "HideReplayChat"); - // Setup dropdown for auto-save interval var autoSaveIntervalDropDown = panel.Get("AUTO_SAVE_INTERVAL_DROP_DOWN"); - autoSaveIntervalDropDown.OnClick = () => ShowAutoSaveIntervalDropdown(autoSaveIntervalDropDown, autoSaveSeconds); - autoSaveIntervalDropDown.GetText = () => GetMessageForAutoSaveInterval(autoSaveSettings.AutoSaveInterval); // Setup dropdown for auto-save number. @@ -61,12 +114,28 @@ namespace OpenRA.Mods.Common.Widgets.Logic autoSaveNoDropDown.GetText = () => FluentProvider.GetMessage(AutoSaveMaxFileNumber, "saves", autoSaveSettings.AutoSaveMaxFileCount); autoSaveNoDropDown.IsDisabled = () => autoSaveSettings.AutoSaveInterval <= 0; - return () => false; + SettingsUtils.AdjustSettingsScrollPanelLayout(scrollPanel); + + return () => + { + nameTextfield.YieldKeyboardFocus(); + return false; + }; } Action ResetPanel(Widget panel) { - return () => { }; + var defaultAutoSaveSettings = new AutoSaveSettings(); + var defaultGameSettings = new GameSettings(); + var defaultPlayerSettings = new PlayerSettings(); + return () => + { + nameTextfield.Text = playerSettings.Name = defaultPlayerSettings.Name; + playerSettings.Color = defaultPlayerSettings.Color; + autoSaveSettings.AutoSaveInterval = defaultAutoSaveSettings.AutoSaveInterval; + autoSaveSettings.AutoSaveMaxFileCount = defaultAutoSaveSettings.AutoSaveMaxFileCount; + gameSettings.HideReplayChat = defaultGameSettings.HideReplayChat; + }; } void ShowAutoSaveIntervalDropdown(DropDownButtonWidget dropdown, IEnumerable options) diff --git a/mods/cnc/chrome/settings-display.yaml b/mods/cnc/chrome/settings-display.yaml index c802e1b6f8..c9e417d089 100644 --- a/mods/cnc/chrome/settings-display.yaml +++ b/mods/cnc/chrome/settings-display.yaml @@ -10,60 +10,6 @@ Container@DISPLAY_PANEL: TopBottomSpacing: 5 ItemSpacing: 10 Children: - Background@PROFILE_SECTION_HEADER: - X: 5 - Width: PARENT_WIDTH - 24 - 10 - Height: 13 - Background: separator - ClickThrough: True - Children: - Label@LABEL: - Width: PARENT_WIDTH - Height: PARENT_HEIGHT - Font: TinyBold - Align: Center - Text: label-profile-section-header - Container@ROW: - Width: PARENT_WIDTH - 24 - Height: 50 - Children: - Container@PLAYER_CONTAINER: - X: 10 - Width: PARENT_WIDTH / 2 - 20 - Children: - LabelForInput@PLAYER: - Width: PARENT_WIDTH - Height: 20 - Text: label-player-container - For: PLAYERNAME - TextField@PLAYERNAME: - Y: 25 - Width: PARENT_WIDTH - Height: 25 - MaxLength: 16 - Text: Name - Container@PLAYERCOLOR_CONTAINER: - X: PARENT_WIDTH / 2 + 10 - Width: PARENT_WIDTH / 2 - 20 - Children: - LabelForInput@COLOR: - Width: PARENT_WIDTH - Height: 20 - Text: label-playercolor-container-color - For: PLAYERCOLOR - DropDownButton@PLAYERCOLOR: - Y: 25 - Width: 75 - Height: 25 - IgnoreChildMouseOver: true - PanelAlign: Right - Children: - ColorBlock@COLORBLOCK: - X: 5 - Y: 6 - Width: PARENT_WIDTH - 35 - Height: PARENT_HEIGHT - 12 - Container@SPACER: Background@DISPLAY_SECTION_HEADER: X: 5 Width: PARENT_WIDTH - 24 - 10 @@ -188,19 +134,6 @@ Container@DISPLAY_PANEL: Text: checkbox-transients-container.label TooltipText: checkbox-transients-container.tooltip TooltipContainer: SETTINGS_TOOLTIP_CONTAINER - Container@ROW: - Width: PARENT_WIDTH - 24 - Height: 20 - Children: - Container@HIDE_REPLAY_CHAT_CHECKBOX_CONTAINER: - X: 10 - Width: PARENT_WIDTH / 2 - 10 - Children: - Checkbox@HIDE_REPLAY_CHAT_CHECKBOX: - Width: PARENT_WIDTH - Height: 20 - Font: Regular - Text: checkbox-hide-replay-chat-container Container@SPACER: Background@VIDEO_SECTION_HEADER: X: 5 diff --git a/mods/cnc/chrome/settings-gameplay.yaml b/mods/cnc/chrome/settings-gameplay.yaml index 78a48b7256..ab2584afb6 100644 --- a/mods/cnc/chrome/settings-gameplay.yaml +++ b/mods/cnc/chrome/settings-gameplay.yaml @@ -10,7 +10,7 @@ Container@GAMEPLAY_PANEL: TopBottomSpacing: 5 ItemSpacing: 10 Children: - Background@INPUT_SECTION_HEADER: + Background@PROFILE_SECTION_HEADER: X: 5 Width: PARENT_WIDTH - 24 - 10 Height: 13 @@ -22,7 +22,61 @@ Container@GAMEPLAY_PANEL: Height: PARENT_HEIGHT Font: TinyBold Align: Center - Text: label-game-play-section-header + Text: label-profile-section-header + Container@ROW: + Width: PARENT_WIDTH - 24 + Height: 50 + Children: + Container@PLAYER_CONTAINER: + X: 10 + Width: PARENT_WIDTH / 2 - 20 + Children: + LabelForInput@PLAYER: + Width: PARENT_WIDTH + Height: 20 + Text: label-player-container + For: PLAYERNAME + TextField@PLAYERNAME: + Y: 25 + Width: PARENT_WIDTH + Height: 25 + MaxLength: 16 + Text: Name + Container@PLAYERCOLOR_CONTAINER: + X: PARENT_WIDTH / 2 + 10 + Width: PARENT_WIDTH / 2 - 20 + Children: + LabelForInput@COLOR: + Width: PARENT_WIDTH + Height: 20 + Text: label-playercolor-container-color + For: PLAYERCOLOR + DropDownButton@PLAYERCOLOR: + Y: 25 + Width: 75 + Height: 25 + IgnoreChildMouseOver: true + PanelAlign: Right + Children: + ColorBlock@COLORBLOCK: + X: 5 + Y: 6 + Width: PARENT_WIDTH - 35 + Height: PARENT_HEIGHT - 12 + Container@SPACER: + Background@GAMEPLAY_SECTION_HEADER: + X: 5 + Width: PARENT_WIDTH - 24 - 10 + Height: 13 + Background: separator + ClickThrough: True + Children: + Label@LABEL: + Width: PARENT_WIDTH + Height: PARENT_HEIGHT + Font: TinyBold + Align: Center + Text: label-gameplay-section-header Container@ROW: Width: PARENT_WIDTH - 24 Height: 50 @@ -35,7 +89,7 @@ Container@GAMEPLAY_PANEL: Width: PARENT_WIDTH Height: 20 Font: Regular - Text: auto-save-interval-label + Text: label-auto-save-interval For: AUTO_SAVE_INTERVAL_DROP_DOWN DropDownButton@AUTO_SAVE_INTERVAL_DROP_DOWN: Y: 25 @@ -50,10 +104,23 @@ Container@GAMEPLAY_PANEL: Width: PARENT_WIDTH Height: 20 Font: Regular - Text: auto-save-max-file-number-label + Text: label-auto-save-max-file-number For: AUTO_SAVE_FILE_NUMBER_DROP_DOWN DropDownButton@AUTO_SAVE_FILE_NUMBER_DROP_DOWN: Y: 25 Width: PARENT_WIDTH Height: 25 Font: Regular + Container@ROW: + Width: PARENT_WIDTH - 24 + Height: 20 + Children: + Container@HIDE_REPLAY_CHAT_CHECKBOX_CONTAINER: + X: 10 + Width: PARENT_WIDTH / 2 - 10 + Children: + Checkbox@HIDE_REPLAY_CHAT_CHECKBOX: + Width: PARENT_WIDTH + Height: 20 + Font: Regular + Text: checkbox-hide-replay-chat-container diff --git a/mods/cnc/chrome/settings.yaml b/mods/cnc/chrome/settings.yaml index 0f15249e8e..9bcd6f5112 100644 --- a/mods/cnc/chrome/settings.yaml +++ b/mods/cnc/chrome/settings.yaml @@ -2,12 +2,12 @@ Container@SETTINGS_PANEL: Logic: SettingsLogic ButtonStride: 0, 45 Panels: + GAMEPLAY_PANEL: Gameplay + INPUT_PANEL: Input DISPLAY_PANEL: Display AUDIO_PANEL: Audio - INPUT_PANEL: Input HOTKEYS_PANEL: Hotkeys ADVANCED_PANEL: Advanced - GAMEPLAY_PANEL: Gameplay X: (WINDOW_WIDTH - WIDTH) / 2 Y: (WINDOW_HEIGHT - HEIGHT) / 2 Width: 640 diff --git a/mods/cnc/fluent/chrome.ftl b/mods/cnc/fluent/chrome.ftl index 560cc86f78..613a9573a8 100644 --- a/mods/cnc/fluent/chrome.ftl +++ b/mods/cnc/fluent/chrome.ftl @@ -466,7 +466,7 @@ label-bg-prompt-text-a = We would like to collect some details that will help us label-bg-prompt-text-b = With your permission, the following anonymous system data will be sent: checkbox-bg-sysinfo = Send System Information -## mainmenu-prompts.yaml, settings-display.yaml +## mainmenu-prompts.yaml, settings-display.yaml, settings-gameplay.yaml label-profile-section-header = Profile label-player-container = Player Name: label-playercolor-container-color = Preferred Color: @@ -684,9 +684,10 @@ label-video-volume-container = Video Volume: label-restart-required-container-audio-desc = Device changes will be applied after the game is restarted ## settings-gameplay.yaml -label-game-play-section-header = Auto-save -auto-save-interval-label = Auto-save frequency: -auto-save-max-file-number-label = Auto-save limit: +label-gameplay-section-header = Gameplay +label-auto-save-interval = Auto-save frequency: +label-auto-save-max-file-number = Auto-save limit: +checkbox-hide-replay-chat-container = Hide Chat in Replays ## settings-display.yaml label-target-lines-dropdown-container = Target Lines: @@ -704,7 +705,6 @@ checkbox-transients-container = .label = Show Game Event Notifications .tooltip = Show transient text notifications for game events -checkbox-hide-replay-chat-container = Hide Chat in Replays label-video-section-header = Video label-video-mode-dropdown-container = Video Mode: dropdownbutton-video-mode-dropdown-container = Windowed diff --git a/mods/common/chrome/settings-display.yaml b/mods/common/chrome/settings-display.yaml index 8c37d95ff8..30dff89918 100644 --- a/mods/common/chrome/settings-display.yaml +++ b/mods/common/chrome/settings-display.yaml @@ -10,60 +10,6 @@ Container@DISPLAY_PANEL: TopBottomSpacing: 5 ItemSpacing: 10 Children: - Background@PROFILE_SECTION_HEADER: - X: 5 - Width: PARENT_WIDTH - 24 - 10 - Height: 13 - Background: separator - ClickThrough: True - Children: - Label@LABEL: - Width: PARENT_WIDTH - Height: PARENT_HEIGHT - Font: TinyBold - Align: Center - Text: label-profile-section-header - Container@ROW: - Width: PARENT_WIDTH - 24 - Height: 50 - Children: - Container@PLAYER_CONTAINER: - X: 10 - Width: PARENT_WIDTH / 2 - 20 - Children: - LabelForInput@PLAYER: - Width: PARENT_WIDTH - Height: 20 - Text: label-player-container - For: PLAYERNAME - TextField@PLAYERNAME: - Y: 25 - Width: PARENT_WIDTH - Height: 25 - MaxLength: 16 - Text: Name - Container@PLAYERCOLOR_CONTAINER: - X: PARENT_WIDTH / 2 + 10 - Width: PARENT_WIDTH / 2 - 20 - Children: - LabelForInput@COLOR: - Width: PARENT_WIDTH - Height: 20 - Text: label-playercolor-container-color - For: PLAYERCOLOR - DropDownButton@PLAYERCOLOR: - Y: 25 - Width: 75 - Height: 25 - IgnoreChildMouseOver: true - PanelAlign: Right - Children: - ColorBlock@COLORBLOCK: - X: 5 - Y: 6 - Width: PARENT_WIDTH - 35 - Height: PARENT_HEIGHT - 12 - Container@SPACER: Background@DISPLAY_SECTION_HEADER: X: 5 Width: PARENT_WIDTH - 24 - 10 @@ -201,15 +147,6 @@ Container@DISPLAY_PANEL: Height: 20 Font: Regular Text: checkbox-pause-shellmap-container - Container@HIDE_REPLAY_CHAT_CHECKBOX_CONTAINER: - X: PARENT_WIDTH / 2 + 10 - Width: PARENT_WIDTH / 2 - 10 - Children: - Checkbox@HIDE_REPLAY_CHAT_CHECKBOX: - Width: PARENT_WIDTH - Height: 20 - Font: Regular - Text: checkbox-hide-replay-chat-container Container@SPACER: Background@VIDEO_SECTION_HEADER: X: 5 diff --git a/mods/common/chrome/settings-gameplay.yaml b/mods/common/chrome/settings-gameplay.yaml index 54776de8bb..ad8b382de3 100644 --- a/mods/common/chrome/settings-gameplay.yaml +++ b/mods/common/chrome/settings-gameplay.yaml @@ -10,7 +10,7 @@ Container@GAMEPLAY_PANEL: TopBottomSpacing: 5 ItemSpacing: 10 Children: - Background@INPUT_SECTION_HEADER: + Background@PROFILE_SECTION_HEADER: X: 5 Width: PARENT_WIDTH - 24 - 10 Height: 13 @@ -22,7 +22,61 @@ Container@GAMEPLAY_PANEL: Height: PARENT_HEIGHT Font: TinyBold Align: Center - Text: label-game-play-section-header + Text: label-profile-section-header + Container@ROW: + Width: PARENT_WIDTH - 24 + Height: 50 + Children: + Container@PLAYER_CONTAINER: + X: 10 + Width: PARENT_WIDTH / 2 - 20 + Children: + LabelForInput@PLAYER: + Width: PARENT_WIDTH + Height: 20 + Text: label-player-container + For: PLAYERNAME + TextField@PLAYERNAME: + Y: 25 + Width: PARENT_WIDTH + Height: 25 + MaxLength: 16 + Text: Name + Container@PLAYERCOLOR_CONTAINER: + X: PARENT_WIDTH / 2 + 10 + Width: PARENT_WIDTH / 2 - 20 + Children: + LabelForInput@COLOR: + Width: PARENT_WIDTH + Height: 20 + Text: label-playercolor-container-color + For: PLAYERCOLOR + DropDownButton@PLAYERCOLOR: + Y: 25 + Width: 75 + Height: 25 + IgnoreChildMouseOver: true + PanelAlign: Right + Children: + ColorBlock@COLORBLOCK: + X: 5 + Y: 6 + Width: PARENT_WIDTH - 35 + Height: PARENT_HEIGHT - 12 + Container@SPACER: + Background@GAMEPLAY_SECTION_HEADER: + X: 5 + Width: PARENT_WIDTH - 24 - 10 + Height: 13 + Background: separator + ClickThrough: True + Children: + Label@LABEL: + Width: PARENT_WIDTH + Height: PARENT_HEIGHT + Font: TinyBold + Align: Center + Text: label-gameplay-section-header Container@ROW: Width: PARENT_WIDTH - 24 Height: 50 @@ -35,7 +89,7 @@ Container@GAMEPLAY_PANEL: Width: PARENT_WIDTH Height: 20 Font: Regular - Text: auto-save-interval-label + Text: label-auto-save-interval DropDownButton@AUTO_SAVE_INTERVAL_DROP_DOWN: Y: 25 Width: PARENT_WIDTH @@ -49,9 +103,22 @@ Container@GAMEPLAY_PANEL: Width: PARENT_WIDTH Height: 20 Font: Regular - Text: auto-save-nr-label + Text: label-auto-save-max-file-number DropDownButton@AUTO_SAVE_FILE_NUMBER_DROP_DOWN: Y: 25 Width: PARENT_WIDTH Height: 25 Font: Regular + Container@ROW: + Width: PARENT_WIDTH - 24 + Height: 50 + Children: + Container@HIDE_REPLAY_CHAT_CHECKBOX_CONTAINER: + X: 10 + Width: PARENT_WIDTH / 2 - 10 + Children: + Checkbox@HIDE_REPLAY_CHAT_CHECKBOX: + Width: PARENT_WIDTH + Height: 20 + Font: Regular + Text: checkbox-hide-replay-chat-container diff --git a/mods/common/chrome/settings.yaml b/mods/common/chrome/settings.yaml index 4c2959795e..985cfab842 100644 --- a/mods/common/chrome/settings.yaml +++ b/mods/common/chrome/settings.yaml @@ -2,12 +2,12 @@ Background@SETTINGS_PANEL: Logic: SettingsLogic ButtonStride: 0, 35 Panels: + GAMEPLAY_PANEL: Gameplay + INPUT_PANEL: Input DISPLAY_PANEL: Display AUDIO_PANEL: Audio - INPUT_PANEL: Input HOTKEYS_PANEL: Hotkeys ADVANCED_PANEL: Advanced - GAMEPLAY_PANEL: Gameplay X: (WINDOW_WIDTH - WIDTH) / 2 Y: (WINDOW_HEIGHT - HEIGHT) / 2 Width: 900 diff --git a/mods/common/fluent/chrome.ftl b/mods/common/fluent/chrome.ftl index cfd8f871a0..82590eb3f5 100644 --- a/mods/common/fluent/chrome.ftl +++ b/mods/common/fluent/chrome.ftl @@ -286,7 +286,7 @@ label-mainmenu-system-info-prompt-text-a = We would like to collect some system label-mainmenu-system-info-prompt-text-b = With your permission, the following anonymous data will be sent each game launch: checkbox-mainmenu-system-info-prompt-sysinfo = Send System Information -## mainmenu-prompts.yaml, settings-display.yaml +## mainmenu-prompts.yaml, settings-display.yaml, settings-gameplay.yaml label-profile-section-header = Profile label-player-container = Player Name: label-playercolor-container-color = Preferred Color: @@ -494,9 +494,10 @@ label-video-volume-container = Video Volume: label-restart-required-container-audio-desc = Device changes will be applied after the game is restarted ## settings-gameplay.yaml -label-game-play-section-header = Auto-save -auto-save-interval-label = Auto-save frequency: -auto-save-nr-label = Auto-save limit: +label-gameplay-section-header = Gameplay +label-auto-save-interval = Auto-save frequency: +label-auto-save-max-file-number = Auto-save limit: +checkbox-hide-replay-chat-container = Hide Chat in Replays ## settings-display.yaml label-target-lines-dropdown-container = Target Lines: @@ -515,7 +516,6 @@ checkbox-transients-container = .tooltip = Show transient text notifications for game events checkbox-pause-shellmap-container = Pause Menu Background -checkbox-hide-replay-chat-container = Hide Chat in Replays label-video-section-header = Video label-video-mode-dropdown-container = Video Mode: dropdownbutton-video-mode-dropdown-container = Windowed