diff --git a/OpenRA.Mods.Common/Widgets/ProductionTabsWidget.cs b/OpenRA.Mods.Common/Widgets/ProductionTabsWidget.cs index 78b79dba72..8cdda60074 100644 --- a/OpenRA.Mods.Common/Widgets/ProductionTabsWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProductionTabsWidget.cs @@ -68,7 +68,11 @@ namespace OpenRA.Mods.Common.Widgets public readonly int TabWidth = 30; public readonly int ArrowWidth = 20; - public Dictionary Groups; + + public readonly NamedHotkey PreviousProductionTabKey = new NamedHotkey(); + public readonly NamedHotkey NextProductionTabKey = new NamedHotkey(); + + public readonly Dictionary Groups; int contentWidth = 0; float listOffset = 0; @@ -284,18 +288,18 @@ namespace OpenRA.Mods.Common.Widgets return false; var hotkey = Hotkey.FromKeyInput(e); - - if (hotkey == Game.Settings.Keys.NextProductionTabKey) - { - Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null); - return SelectNextTab(false); - } - else if (hotkey == Game.Settings.Keys.PreviousProductionTabKey) + if (hotkey == PreviousProductionTabKey.GetValue()) { Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null); return SelectNextTab(true); } + if (hotkey == NextProductionTabKey.GetValue()) + { + Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ClickSound", null); + return SelectNextTab(false); + } + return false; } } diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index 78969c40fa..61879c2293 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -719,6 +719,8 @@ Container@PLAYER_WIDGETS: PaletteWidget: PRODUCTION_PALETTE TypesContainer: PRODUCTION_TYPES BackgroundContainer: PRODUCTION_BACKGROUND + PreviousProductionTabKey: PreviousProductionTab + NextProductionTabKey: NextProductionTab X: WINDOW_RIGHT - 204 Y: 268 Width: 194