Various improvements for Editor

This commit is contained in:
Wojtek Figat
2022-05-06 17:14:25 +02:00
parent 3766488114
commit 90906baae2
7 changed files with 49 additions and 36 deletions

View File

@@ -48,11 +48,6 @@ namespace FlaxEditor.Modules
private List<QuickAction> _quickActions;
private ContentFinder _finder;
/// <summary>
/// The content finding context menu.
/// </summary>
internal ContentFinder Finder => _finder ?? (_finder = new ContentFinder());
/// <summary>
/// Initializes a new instance of the <see cref="ContentFindingModule"/> class.
/// </summary>
@@ -81,12 +76,12 @@ namespace FlaxEditor.Modules
}
/// <summary>
/// Shows the finder.
/// Shows the content finder popup.
/// </summary>
/// <param name="control">The target control to show finder over it.</param>
public void ShowFinder(Control control)
{
var finder = Finder;
var finder = _finder ?? (_finder = new ContentFinder());
var position = (control.Size - new Vector2(finder.Width, 300.0f)) * 0.5f;
finder.Show(control, position);
}