Changed all search boxes to new class.

This commit is contained in:
Chandler Cox
2022-12-15 21:18:49 -06:00
parent 1c85b30e9f
commit e725533ba7
6 changed files with 10 additions and 11 deletions

View File

@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Input;
using FlaxEditor.Utilities;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -204,11 +205,10 @@ namespace FlaxEditor.GUI
Size = new Float2(width, height);
// Search box
_searchBox = new TextBox(false, 1, 1)
_searchBox = new SearchBox(false, 1, 1)
{
Parent = this,
Width = Width - 3,
WatermarkText = "Search...",
};
_searchBox.TextChanged += OnSearchFilterChanged;

View File

@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Input;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -128,10 +129,9 @@ namespace FlaxEditor.Surface.ContextMenu
Size = new Float2(320, 220);
// Search box
_searchBox = new TextBox(false, 1, 1)
_searchBox = new SearchBox(false, 1, 1)
{
Width = Width - 3,
WatermarkText = "Search...",
Parent = this
};
_searchBox.TextChanged += OnSearchFilterChanged;

View File

@@ -14,6 +14,7 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Input;
using FlaxEditor.GUI.Tree;
using FlaxEditor.SceneGraph;
using FlaxEditor.Scripting;
@@ -956,10 +957,9 @@ namespace FlaxEditor.Utilities
{
Size = new Float2(320, 220),
};
searchBox = new TextBox(false, 1, 1)
searchBox = new SearchBox(false, 1, 1)
{
Width = menu.Width - 3,
WatermarkText = "Search...",
Parent = menu,
};
var panel1 = new Panel(ScrollBars.Vertical)

View File

@@ -6,6 +6,7 @@ using FlaxEditor.Content;
using FlaxEditor.CustomEditors;
using FlaxEditor.Gizmo;
using FlaxEditor.GUI;
using FlaxEditor.GUI.Input;
using FlaxEditor.SceneGraph;
using FlaxEditor.Viewport;
using FlaxEngine;
@@ -124,10 +125,9 @@ namespace FlaxEditor.Windows.Assets
IsScrollable = false,
Offsets = new Margin(0, 0, 0, 18 + 6),
};
_searchBox = new TextBox
_searchBox = new SearchBox()
{
AnchorPreset = AnchorPresets.HorizontalStretchMiddle,
WatermarkText = "Search...",
Parent = headerPanel,
Bounds = new Rectangle(4, 4, headerPanel.Width - 8, 18),
};

View File

@@ -151,7 +151,6 @@ namespace FlaxEditor.Windows
_itemsSearchBox = new SearchBox
{
AnchorPreset = AnchorPresets.HorizontalStretchMiddle,
WatermarkText = "Search...",
Parent = contentItemsSearchPanel,
Bounds = new Rectangle(viewDropdownWidth + 8, 4, contentItemsSearchPanel.Width - 12 - viewDropdownWidth, 18),
};

View File

@@ -10,6 +10,7 @@ using FlaxEditor;
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Docking;
using FlaxEditor.GUI.Input;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Scripting;
using FlaxEditor.Surface;
@@ -224,10 +225,9 @@ namespace FlaxEngine.Windows.Search
Parent = topPanel,
};
optionsButton.ButtonClicked += OnOptionsDropdownClicked;
_searchBox = new TextBox
_searchBox = new SearchBox
{
AnchorPreset = AnchorPresets.HorizontalStretchMiddle,
WatermarkText = "Search...",
Parent = topPanel,
Bounds = new Rectangle(optionsButton.Right + 2.0f, 2, topPanel.Width - 4.0f - optionsButton.Width, 18.0f),
};