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

@@ -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);