diff --git a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs index 7fce13e4ae..2ea0e26761 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs @@ -450,17 +450,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { "CycleStatusBarsKey", "Cycle status bars display" }, { "TogglePixelDoubleKey", "Toggle pixel doubling" }, { "ToggleMuteKey", "Toggle audio mute" }, - { "TogglePlayerStanceColorsKey", "Toggle player stance colors" }, - - { "MapScrollUp", "Map scroll up" }, - { "MapScrollDown", "Map scroll down" }, - { "MapScrollLeft", "Map scroll left" }, - { "MapScrollRight", "Map scroll right" }, - - { "MapPushTop", "Map push to top" }, - { "MapPushBottom", "Map push to bottom" }, - { "MapPushLeftEdge", "Map push to left edge" }, - { "MapPushRightEdge", "Map push to right edge" } + { "TogglePlayerStanceColorsKey", "Toggle player stance colors" } }; var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing); @@ -471,6 +461,29 @@ namespace OpenRA.Mods.Common.Widgets.Logic BindHotkeyPref(kv, ks, globalTemplate, hotkeyList); } + // Viewport + { + var hotkeys = new Dictionary() + { + { "MapScrollUp", "Scroll up" }, + { "MapScrollDown", "Scroll down" }, + { "MapScrollLeft", "Scroll left" }, + { "MapScrollRight", "Scroll right" }, + + { "MapPushTop", "Jump to top edge" }, + { "MapPushBottom", "Jump to bottom edge" }, + { "MapPushLeftEdge", "Jump to left edge" }, + { "MapPushRightEdge", "Jump to right edge" } + }; + + var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing); + header.Get("LABEL").GetText = () => "Viewport Commands"; + hotkeyList.AddChild(header); + + foreach (var kv in hotkeys) + BindHotkeyPref(kv, ks, globalTemplate, hotkeyList); + } + // Observer { var hotkeys = new Dictionary()