Merge branch 'control-type-search' of https://github.com/Tryibion/FlaxEngine into Tryibion-control-type-search
This commit is contained in:
@@ -238,7 +238,7 @@ namespace FlaxEditor.SceneGraph.GUI
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Actor !=null)
|
||||
if (Actor != null)
|
||||
{
|
||||
var actorTypeText = trimmedFilter.Replace("a:", "", StringComparison.OrdinalIgnoreCase).Trim();
|
||||
var name = TypeUtils.GetTypeDisplayName(Actor.GetType());
|
||||
@@ -248,6 +248,26 @@ namespace FlaxEditor.SceneGraph.GUI
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check for control type
|
||||
else if (trimmedFilter.Contains("c:", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (trimmedFilter.Equals("c:", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (Actor != null)
|
||||
hasFilter = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Actor != null && Actor is UIControl uic && uic.Control != null)
|
||||
{
|
||||
var controlTypeText = trimmedFilter.Replace("c:", "", StringComparison.OrdinalIgnoreCase).Trim();
|
||||
var name = TypeUtils.GetTypeDisplayName(uic.Control.GetType());
|
||||
var nameNoSpaces = name.Replace(" ", "");
|
||||
if (name.Contains(controlTypeText, StringComparison.OrdinalIgnoreCase) || nameNoSpaces.Contains(controlTypeText, StringComparison.OrdinalIgnoreCase))
|
||||
hasFilter = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Match text
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user