Add editor windows to quick actions via Content Finder tool
This commit is contained in:
@@ -192,7 +192,7 @@ namespace FlaxEditor.Modules
|
||||
/// Removes a quick action by name.
|
||||
/// </summary>
|
||||
/// <param name="name">The action's name.</param>
|
||||
/// <returns>True when it succeed, false if there is no Quick Action with this name.</returns>
|
||||
/// <returns>True when it succeeds, false if there is no Quick Action with this name.</returns>
|
||||
public bool RemoveQuickAction(string name)
|
||||
{
|
||||
if (_quickActions == null)
|
||||
@@ -288,6 +288,16 @@ namespace FlaxEditor.Modules
|
||||
Profiler.EndEvent();
|
||||
}
|
||||
|
||||
// Editor window
|
||||
foreach (var window in Editor.Windows.Windows)
|
||||
{
|
||||
if (window is Windows.Assets.AssetEditorWindow)
|
||||
continue;
|
||||
var windowName = window.Title + " (window)";
|
||||
if (nameRegex.Match(windowName).Success)
|
||||
matches.Add(new SearchResult { Name = windowName, Type = "Window", Item = window });
|
||||
}
|
||||
|
||||
Profiler.EndEvent();
|
||||
return matches;
|
||||
}
|
||||
@@ -407,6 +417,9 @@ namespace FlaxEditor.Modules
|
||||
Editor.Instance.Windows.EditWin.Viewport.FocusSelection();
|
||||
}
|
||||
break;
|
||||
case Windows.EditorWindow window:
|
||||
window.FocusOrShow();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user