Added a change cursor boolean to TextBoxBase and made it so the cursor changes to default when hovering over the cancel button.

This commit is contained in:
Chandler Cox
2023-02-22 17:34:33 -06:00
parent bef4ba1829
commit 34aff4a2b6
2 changed files with 16 additions and 3 deletions

View File

@@ -49,6 +49,12 @@ namespace FlaxEditor.GUI.Input
ClearSearchButton.LocalY += 2;
ClearSearchButton.LocalX -= 2;
ClearSearchButton.Clicked += Clear;
ClearSearchButton.HoverBegin += () =>
{
_changeCursor = false;
Cursor = CursorType.Default;
};
ClearSearchButton.HoverEnd += () => _changeCursor = true;
TextChanged += () => ClearSearchButton.Visible = !string.IsNullOrEmpty(Text);
}