Add support for readonly hotkeys and expose chat input hotkeys

This commit is contained in:
Ivaylo Draganov
2021-07-22 18:49:19 +03:00
committed by Paul Chote
parent 1969ae361c
commit 5f42c7c8df
13 changed files with 60 additions and 13 deletions

View File

@@ -21,6 +21,7 @@ namespace OpenRA
public readonly string Description = "";
public readonly HashSet<string> Types = new HashSet<string>();
public readonly HashSet<string> Contexts = new HashSet<string>();
public readonly bool Readonly = false;
public bool HasDuplicates { get; internal set; }
public HotkeyDefinition(string name, MiniYaml node)
@@ -49,6 +50,10 @@ namespace OpenRA
if (platformOverride != null)
Default = FieldLoader.GetValue<Hotkey>("value", platformOverride.Value.Value);
}
var readonlyNode = node.Nodes.FirstOrDefault(n => n.Key == "Readonly");
if (readonlyNode != null)
Readonly = FieldLoader.GetValue<bool>("Readonly", readonlyNode.Value.Value);
}
}
}