Created new SearchBox class with button to clear the search.

This commit is contained in:
Chandler Cox
2022-12-15 20:45:51 -06:00
parent 5a50656249
commit 1b919b9fae
5 changed files with 58 additions and 9 deletions

View File

@@ -7,6 +7,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Input;
using FlaxEditor.Options;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -157,9 +158,8 @@ namespace FlaxEditor.Windows
Parent = this,
};
_viewDropdown.Clicked += OnViewButtonClicked;
_searchBox = new TextBox(false, _viewDropdown.Right + 2, 2, Width - _viewDropdown.Right - 2 - _scrollSize)
_searchBox = new SearchBox(false, _viewDropdown.Right + 2, 2, Width - _viewDropdown.Right - 2 - _scrollSize)
{
WatermarkText = "Search...",
Parent = this,
};
_searchBox.TextChanged += Refresh;