Improvements to hand labeler UI (#31833)

Give line edit focus when window is opened
No longer require pressing enter to set the text
Give feedback when user hits the maximum label length

Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
This commit is contained in:
eoineoineoin
2024-09-04 15:20:00 +01:00
committed by GitHub
parent fce7abb88e
commit 7fd92abeeb
2 changed files with 15 additions and 1 deletions

View File

@@ -26,6 +26,11 @@ namespace Content.Client.Labels.UI
_window = this.CreateWindow<HandLabelerWindow>();
if (_entManager.TryGetComponent(Owner, out HandLabelerComponent? labeler))
{
_window.SetMaxLabelLength(labeler!.MaxLabelChars);
}
_window.OnLabelChanged += OnLabelChanged;
Reload();
}