Minor cleanup

This commit is contained in:
Wojtek Figat
2023-10-04 23:21:40 +02:00
parent 469c599a5e
commit 1838c7bba7
12 changed files with 21 additions and 40 deletions

View File

@@ -207,26 +207,6 @@ namespace FlaxEditor.Surface.Archetypes
AddElement(box);
}
}
protected static bool IsInputCompatible(NodeArchetype nodeArch, ScriptType outputType, ConnectionsHint hint)
{
// Event based nodes always have a pulse input, so it's always compatible with void
if (outputType.IsVoid)
return true;
var eventName = (string)nodeArch.DefaultValues[1];
var eventType = TypeUtils.GetType((string)nodeArch.DefaultValues[0]);
var member = eventType.GetMember(eventName, MemberTypes.Event, BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance);
if (member && SurfaceUtils.IsValidVisualScriptEvent(member))
{
if (!member.IsStatic)
{
if (VisjectSurface.FullCastCheck(eventType, outputType, hint))
return true;
}
}
return false;
}
}
private sealed class PackStructureNode : StructureNode

View File

@@ -84,6 +84,7 @@ namespace FlaxEditor.Surface.ContextMenu
/// Updates the filter.
/// </summary>
/// <param name="filterText">The filter text.</param>
/// <param name="selectedBox">The optionally selected box to show hints for it.</param>
public void UpdateFilter(string filterText, Box selectedBox)
{
Profiler.BeginEvent("VisjectCMGroup.UpdateFilter");
@@ -116,7 +117,7 @@ namespace FlaxEditor.Surface.ContextMenu
Profiler.EndEvent();
}
public void EvaluateVisibilityWithBox(Box selectedBox)
internal void EvaluateVisibilityWithBox(Box selectedBox)
{
if (selectedBox == null)
{

View File

@@ -8,7 +8,6 @@ using FlaxEditor.Surface.Elements;
using FlaxEditor.Utilities;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Utilities;
namespace FlaxEditor.Surface.ContextMenu
{
@@ -165,6 +164,8 @@ namespace FlaxEditor.Surface.ContextMenu
/// Updates the filter.
/// </summary>
/// <param name="filterText">The filter text.</param>
/// <param name="selectedBox">The optionally selected box to show hints for it.</param>
/// <param name="groupHeaderMatches">True if item's group header got a filter match and item should stay visible.</param>
public void UpdateFilter(string filterText, Box selectedBox, bool groupHeaderMatches = false)
{
if (selectedBox != null)