new hotkey to center your view on the current selection
This commit is contained in:
@@ -47,8 +47,11 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
if (e.KeyName == Game.Settings.Keys.CycleBaseKey)
|
||||
return CycleBases();
|
||||
|
||||
if (e.KeyName == Game.Settings.Keys.GotoLastEventKey)
|
||||
return GotoLastEvent();
|
||||
if (e.KeyName == Game.Settings.Keys.ToLastEventKey)
|
||||
return ToLastEvent();
|
||||
|
||||
if (e.KeyName == Game.Settings.Keys.ToSelectionKey)
|
||||
return ToSelection();
|
||||
|
||||
if (e.KeyName == Game.Settings.Keys.SellKey)
|
||||
return PerformSwitchToSellMode();
|
||||
@@ -168,11 +171,11 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
next = bases.Select(b => b.Actor).First();
|
||||
|
||||
World.Selection.Combine(World, new Actor[] { next }, false, true);
|
||||
Game.viewport.Center(World.Selection.Actors);
|
||||
return true;
|
||||
|
||||
return ToSelection();
|
||||
}
|
||||
|
||||
bool GotoLastEvent()
|
||||
bool ToLastEvent()
|
||||
{
|
||||
if (World.LocalPlayer == null)
|
||||
return true;
|
||||
@@ -188,6 +191,12 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ToSelection()
|
||||
{
|
||||
Game.viewport.Center(World.Selection.Actors);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PerformSwitchToSellMode()
|
||||
{
|
||||
World.ToggleInputMode<SellOrderGenerator>();
|
||||
|
||||
Reference in New Issue
Block a user