Migrate hotkey consumers to HotkeyManager.

This commit is contained in:
Paul Chote
2017-10-28 09:12:54 +01:00
committed by abcdefg30
parent 35a3df3736
commit 2f79173044
21 changed files with 51 additions and 64 deletions

View File

@@ -32,20 +32,6 @@ namespace OpenRA
this.getValue = getValue;
}
public HotkeyReference(string name, KeySettings settings)
{
// Try parsing the value as a reference to a named hotkey
getValue = settings.GetHotkeyReference(name);
if (getValue == null)
{
// Try parsing the value as a normal (static) hotkey
var staticKey = Hotkey.Invalid;
Hotkey.TryParse(name, out staticKey);
getValue = () => staticKey;
}
}
public Hotkey GetValue()
{
return getValue();