Fix bogus handling of special keyboard characters everywhere else. Textfields now only accept valid characters, support right-delete.
This commit is contained in:
@@ -110,7 +110,14 @@ namespace OpenRA
|
||||
public static bool HasModifier(this Modifiers k, Modifiers mod)
|
||||
{
|
||||
return (k & mod) == mod;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsValidInput(this KeyInput key)
|
||||
{
|
||||
return char.IsLetter(key.UnicodeChar) || char.IsDigit(key.UnicodeChar) ||
|
||||
char.IsSymbol(key.UnicodeChar) || char.IsSeparator(key.UnicodeChar) ||
|
||||
char.IsPunctuation(key.UnicodeChar);
|
||||
}
|
||||
|
||||
public static V GetOrAdd<K, V>(this Dictionary<K, V> d, K k)
|
||||
where V : new()
|
||||
|
||||
Reference in New Issue
Block a user