Rename NamedHotkey to HotkeyReference.

This commit is contained in:
Paul Chote
2017-11-05 19:38:06 +00:00
committed by abcdefg30
parent 6dd42f7ab1
commit c4237d6a1a
16 changed files with 51 additions and 51 deletions

View File

@@ -273,9 +273,9 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(NamedHotkey))
else if (fieldType == typeof(HotkeyReference))
{
return new NamedHotkey(value, Game.Settings.Keys);
return new HotkeyReference(value, Game.Settings.Keys);
}
else if (fieldType == typeof(WDist))
{

View File

@@ -16,18 +16,18 @@ namespace OpenRA
/// <summary>
/// A reference to either a named hotkey (defined in the game settings) or a statically assigned hotkey
/// </summary>
public class NamedHotkey
public class HotkeyReference
{
static readonly Func<Hotkey> Invalid = () => Hotkey.Invalid;
readonly Func<Hotkey> getValue;
public NamedHotkey()
public HotkeyReference()
{
getValue = Invalid;
}
public NamedHotkey(string name, KeySettings settings)
public HotkeyReference(string name, KeySettings settings)
{
// Try parsing the value as a reference to a named hotkey
getValue = settings.GetHotkeyReference(name);

View File

@@ -225,7 +225,7 @@
<Compile Include="Input\InputHandler.cs" />
<Compile Include="Input\Keycode.cs" />
<Compile Include="Input\Hotkey.cs" />
<Compile Include="Input\NamedHotkey.cs" />
<Compile Include="Input\HotkeyReference.cs" />
<Compile Include="Graphics\PlatformInterfaces.cs" />
<Compile Include="Sound\Sound.cs" />
<Compile Include="Sound\SoundDevice.cs" />