diff --git a/CHANGELOG b/CHANGELOG index 5ddc3ec2a6..f60f441d25 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ NEW: Re-added move flashes. Added a setting to always display unit status bars (can also be toggled by hotkey). Added a setting for team health bar colors. + Added a new hotkey to select all units on screen (default: CTRL + A). Asset Browser: Fixed crashes when trying to load invalid filenames or sprites with just 1 frame. Added support for all sprite types. diff --git a/OpenRA.Game/GameRules/Settings.cs b/OpenRA.Game/GameRules/Settings.cs index 373d42b6f9..1f7f20528c 100644 --- a/OpenRA.Game/GameRules/Settings.cs +++ b/OpenRA.Game/GameRules/Settings.cs @@ -149,6 +149,7 @@ namespace OpenRA.GameRules public Hotkey ToLastEventKey = new Hotkey(Keycode.SPACE, Modifiers.None); public Hotkey ToSelectionKey = new Hotkey(Keycode.HOME, Modifiers.None); public Hotkey ToggleStatusBarsKey = new Hotkey(Keycode.INSERT, Modifiers.None); + public Hotkey SelectAllUnitsKey = new Hotkey(Keycode.A, Modifiers.Ctrl); public Hotkey PauseKey = new Hotkey(Keycode.F9, Modifiers.None); public Hotkey SellKey = new Hotkey(Keycode.F10, Modifiers.None); diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs index b2dec7acef..893177e572 100644 --- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs @@ -202,6 +202,12 @@ namespace OpenRA.Widgets } else if (Hotkey.FromKeyInput(e) == Game.Settings.Keys.PauseKey && World.LocalPlayer != null) // Disable pausing for spectators World.SetPauseState(!World.Paused); + else if (Hotkey.FromKeyInput(e) == Game.Settings.Keys.SelectAllUnitsKey) + { + var ownUnitsOnScreen = SelectActorsInBox(World, worldRenderer.Viewport.TopLeft, worldRenderer.Viewport.BottomRight, + a => a.Owner == World.RenderPlayer); + World.Selection.Combine(World, ownUnitsOnScreen, false, false); + } } return false; diff --git a/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs index de42055b9a..c8a4ebb9d2 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs @@ -243,6 +243,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic { "CycleBaseKey", "Jump to base" }, { "ToLastEventKey", "Jump to last radar event" }, { "ToSelectionKey", "Jump to selection" }, + { "SelectAllUnitsKey", "Select all units on screen" }, { "SellKey", "Sell mode" }, { "PowerDownKey", "Power-down mode" }, { "RepairKey", "Repair mode" },