- Minor refactoring and cleanup
This commit is contained in:
@@ -842,13 +842,7 @@ namespace FlaxEditor.Surface.ContextMenu
|
|||||||
for(int i = 0; i < memberInfo.ParametersCount; i++)
|
for(int i = 0; i < memberInfo.ParametersCount; i++)
|
||||||
{
|
{
|
||||||
var param = memberInfo.GetParameters()[i];
|
var param = memberInfo.GetParameters()[i];
|
||||||
if (param.IsOut)
|
AddInputOutputElement(archetype, param.Type, param.IsOut, $">{param.Name} ({param.Type.Name})");
|
||||||
{
|
|
||||||
AddInputOutputElement(archetype, param.Type, true, $">{param.Name} ({param.Type.Name})");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
AddInputOutputElement(archetype, param.Type, false, $">{param.Name} ({param.Type.Name})");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -856,7 +850,6 @@ namespace FlaxEditor.Surface.ContextMenu
|
|||||||
_descriptionSignatureLabel.Text = string.IsNullOrEmpty(archetype.Signature) ? archetype.Title : archetype.Signature;
|
_descriptionSignatureLabel.Text = string.IsNullOrEmpty(archetype.Signature) ? archetype.Title : archetype.Signature;
|
||||||
declaringType = archetype.DefaultType;
|
declaringType = archetype.DefaultType;
|
||||||
|
|
||||||
// Special handling for Pack nodes
|
|
||||||
if (archetype.GetInputOutputDescription != null)
|
if (archetype.GetInputOutputDescription != null)
|
||||||
{
|
{
|
||||||
archetype.GetInputOutputDescription.Invoke(archetype, out (string, ScriptType)[] inputs, out (string, ScriptType)[] outputs);
|
archetype.GetInputOutputDescription.Invoke(archetype, out (string, ScriptType)[] inputs, out (string, ScriptType)[] outputs);
|
||||||
@@ -866,7 +859,7 @@ namespace FlaxEditor.Surface.ContextMenu
|
|||||||
for (int i = 0; i < inputs.Length; i++)
|
for (int i = 0; i < inputs.Length; i++)
|
||||||
{
|
{
|
||||||
AddInputOutputElement(archetype, inputs[i].Item2, false, $"{inputs[i].Item1} ({inputs[i].Item2.Name})");
|
AddInputOutputElement(archetype, inputs[i].Item2, false, $"{inputs[i].Item1} ({inputs[i].Item2.Name})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outputs != null)
|
if (outputs != null)
|
||||||
@@ -874,7 +867,7 @@ namespace FlaxEditor.Surface.ContextMenu
|
|||||||
for (int i = 0; i < outputs.Length; i++)
|
for (int i = 0; i < outputs.Length; i++)
|
||||||
{
|
{
|
||||||
AddInputOutputElement(archetype, outputs[i].Item2, true, $"{outputs[i].Item1} ({outputs[i].Item2.Name})");
|
AddInputOutputElement(archetype, outputs[i].Item2, true, $"{outputs[i].Item1} ({outputs[i].Item2.Name})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -951,7 +944,7 @@ namespace FlaxEditor.Surface.ContextMenu
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hides the description panel and resets the context menu to its original size
|
/// Hides the description panel and resets the context menu to its original size
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void HideDescriptionPanel()
|
private void HideDescriptionPanel()
|
||||||
{
|
{
|
||||||
_descriptionInputPanel.RemoveChildren();
|
_descriptionInputPanel.RemoveChildren();
|
||||||
_descriptionOutputPanel.RemoveChildren();
|
_descriptionOutputPanel.RemoveChildren();
|
||||||
|
|||||||
Reference in New Issue
Block a user