added a new hotkey to select all units on screen

closes #4182
This commit is contained in:
Matthias Mailänder
2013-12-06 09:07:51 +01:00
parent f7eb6a29d5
commit 08166c0a64
4 changed files with 9 additions and 0 deletions

View File

@@ -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.

View File

@@ -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);

View File

@@ -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;

View File

@@ -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" },