Use different chatbox placeholder when dependent keys unbound (#22747)

This commit is contained in:
LordCarve
2023-12-22 20:39:29 +01:00
committed by GitHub
parent 524dbf9a78
commit 7d69055291
3 changed files with 20 additions and 1 deletions

View File

@@ -13,6 +13,11 @@ public static class BoundKeyHelper
return TryGetShortKeyName(keyFunction, out var name) ? Loc.GetString(name) : " ";
}
public static bool IsBound(BoundKeyFunction keyFunction)
{
return TryGetShortKeyName(keyFunction, out _);
}
private static string? DefaultShortKeyName(BoundKeyFunction keyFunction)
{
var name = FormattedMessage.EscapeText(IoCManager.Resolve<IInputManager>().GetKeyFunctionButtonString(keyFunction));