Added Hotkeys for support powers

This commit is contained in:
sinf
2015-04-03 13:22:00 +03:00
parent f6051b1e2b
commit 9250c61473
7 changed files with 96 additions and 16 deletions

View File

@@ -212,6 +212,13 @@ namespace OpenRA
public Hotkey ProductionTypeTankKey = new Hotkey(Keycode.I, Modifiers.None);
public Hotkey ProductionTypeMerchantKey = new Hotkey(Keycode.O, Modifiers.None);
public Hotkey SupportPower01Key = new Hotkey(Keycode.UNKNOWN, Modifiers.None);
public Hotkey SupportPower02Key = new Hotkey(Keycode.UNKNOWN, Modifiers.None);
public Hotkey SupportPower03Key = new Hotkey(Keycode.UNKNOWN, Modifiers.None);
public Hotkey SupportPower04Key = new Hotkey(Keycode.UNKNOWN, Modifiers.None);
public Hotkey SupportPower05Key = new Hotkey(Keycode.UNKNOWN, Modifiers.None);
public Hotkey SupportPower06Key = new Hotkey(Keycode.UNKNOWN, Modifiers.None);
public Hotkey GetProductionHotkey(int index)
{
var field = GetType().GetField("Production{0:D2}Key".F(index + 1));
@@ -220,6 +227,15 @@ namespace OpenRA
return (Hotkey)field.GetValue(this);
}
public Hotkey GetSupportPowerHotkey(int index)
{
var field = GetType().GetField("SupportPower{0:D2}Key".F(index + 1));
if (field == null)
return Hotkey.Invalid;
return (Hotkey)field.GetValue(this);
}
}
public class Settings