Merge remote-tracking branch 'origin/master' into gi

This commit is contained in:
Wojciech Figat
2022-04-21 12:57:08 +02:00
78 changed files with 604 additions and 311 deletions

View File

@@ -689,6 +689,30 @@ namespace FlaxEditor.Content.GUI
return base.OnKeyDown(key);
}
/// <inheritdoc />
public override bool OnCharInput(char c)
{
if (base.OnCharInput(c))
return true;
if (char.IsLetterOrDigit(c) && _items.Count != 0)
{
// Jump to the item starting with this character
c = char.ToLowerInvariant(c);
for (int i = 0; i < _items.Count; i++)
{
var name = _items[i].ShortName;
if (!string.IsNullOrEmpty(name) && char.ToLowerInvariant(name[0]) == c)
{
Select(_items[i]);
break;
}
}
}
return false;
}
/// <inheritdoc />
protected override void PerformLayoutBeforeChildren()
{