new hotkey to center your view on the current selection

This commit is contained in:
Matthias Mailänder
2013-03-02 11:53:45 +01:00
parent 336076c248
commit c0a702a386
3 changed files with 21 additions and 7 deletions

View File

@@ -137,9 +137,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic
specialHotkeyList.AddChild(viewportToBase);
var lastEventKey = ScrollItemWidget.Setup(specialHotkeyTemplate, () => false, () => {});
SetupKeyBinding(lastEventKey, "Move Viewport to Last Event:", () => keyConfig.GotoLastEventKey, k => keyConfig.GotoLastEventKey = k);
SetupKeyBinding(lastEventKey, "Move Viewport to Last Event:", () => keyConfig.ToLastEventKey, k => keyConfig.ToLastEventKey = k);
specialHotkeyList.AddChild(lastEventKey);
var viewportToSelectionKey = ScrollItemWidget.Setup(specialHotkeyTemplate, () => false, () => {});
SetupKeyBinding(viewportToSelectionKey, "Move Viewport to Selection:", () => keyConfig.ToSelectionKey, k => keyConfig.ToSelectionKey = k);
specialHotkeyList.AddChild(viewportToSelectionKey);
var sellKey = ScrollItemWidget.Setup(specialHotkeyTemplate, () => false, () => {});
SetupKeyBinding(sellKey, "Switch to Sell-Cursor:", () => keyConfig.SellKey, k => keyConfig.SellKey = k);
specialHotkeyList.AddChild(sellKey);