diff --git a/Source/Editor/Windows/Search/SearchItem.cs b/Source/Editor/Windows/Search/SearchItem.cs
index 11bc79991..5336c2855 100644
--- a/Source/Editor/Windows/Search/SearchItem.cs
+++ b/Source/Editor/Windows/Search/SearchItem.cs
@@ -74,6 +74,20 @@ namespace FlaxEditor.Windows.Search
typeLabel.TextColor = Style.Current.ForegroundGrey;
}
+ ///
+ public override bool OnMouseDown(Float2 location, MouseButton button)
+ {
+ // Select and focus the item on right click to prevent the search from being cleared
+ if (button == MouseButton.Right)
+ {
+ _finder.SelectedItem = this;
+ _finder.Hand = true;
+ Focus();
+ return true;
+ }
+ return base.OnMouseUp(location, button);
+ }
+
///
public override bool OnMouseUp(Float2 location, MouseButton button)
{
@@ -86,6 +100,15 @@ namespace FlaxEditor.Windows.Search
return base.OnMouseUp(location, button);
}
+ ///
+ public override void Draw()
+ {
+ if (IsMouseOver)
+ Render2D.FillRectangle(new Rectangle(Float2.Zero, Size), Style.Current.BackgroundHighlighted);
+
+ base.Draw();
+ }
+
///
public override void OnMouseEnter(Float2 location)
{
@@ -93,12 +116,7 @@ namespace FlaxEditor.Windows.Search
var root = RootWindow;
if (root != null)
- {
root.Cursor = CursorType.Hand;
- }
-
- _finder.SelectedItem = this;
- _finder.Hand = true;
}
///
@@ -176,9 +194,7 @@ namespace FlaxEditor.Windows.Search
{
string importLocation = System.IO.Path.GetDirectoryName(importPath);
if (!string.IsNullOrEmpty(importLocation) && System.IO.Directory.Exists(importLocation))
- {
cm.AddButton("Show import location", () => FileSystem.ShowFileExplorer(importLocation));
- }
}
}
cm.AddSeparator();