1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

Adjusted Node Port icon

This commit is contained in:
Oli 2023-01-09 22:02:56 +00:00
parent 883e585b65
commit 133d15703a
5 changed files with 22 additions and 6 deletions

View File

@ -41,12 +41,10 @@ namespace XNodeEditor {
/// <summary> Returns context node menu path. Null or empty strings for hidden nodes. </summary>
public virtual string GetNodeMenuName(Type type) {
//Check if type has the CreateNodeMenuAttribute
XNode.Node.CreateNodeMenuAttribute attrib;
if (NodeEditorUtilities.GetAttrib(type, out attrib)) // Return custom path
return attrib.menuName;
else // Return generated path
return NodeEditorUtilities.NodeDefaultPath(type);
string name = NodeEditorUtilities.GetAttrib(type, out attrib) ? attrib.menuName : NodeEditorUtilities.NodeDefaultPath(type);
name = name.Replace("X Node/", "");
return name;
}
/// <summary> The order by which the menu items are displayed. </summary>
@ -184,7 +182,7 @@ namespace XNodeEditor {
/// <summary> The returned color is used to color the background of the door.
/// Usually used for outer edge effect </summary>
public virtual Color GetPortBackgroundColor(XNode.NodePort port) {
return Color.gray;
return Color.white;
}
/// <summary> Returns generated color for a type. This color is editable in preferences </summary>

3
Runtime/Flow/Events.meta Normal file
View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2d9f2360b3c44077a4e627c1e1c632c7
timeCreated: 1673300700

View File

@ -0,0 +1,8 @@
namespace XNode.Flow.Events
{
[NodeTint(1.0F,0.25F,0.25F), NodeWidth(75)]
public class StartNode : OutFlowNode
{
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e65f760a3b214683992e83787395aca5
timeCreated: 1673300714

View File

@ -5,6 +5,7 @@ using UnityEngine;
namespace XNode.Flow
{
[Serializable]
public abstract class FlowNode : Node
{
public override object GetValue(NodePort port)
@ -24,6 +25,7 @@ namespace XNode.Flow
public FlowNode GetFlowNode(string portName) => GetValue(GetPort(portName)) as FlowNode;
}
[Serializable]
public abstract class InFlowNode : FlowNode
{
[Input(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]
@ -36,6 +38,7 @@ namespace XNode.Flow
}
}
[Serializable]
public abstract class OutFlowNode : FlowNode
{
[Output(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]
@ -48,6 +51,7 @@ namespace XNode.Flow
}
}
[Serializable]
public abstract class InOutFlowNode : FlowNode
{
[Input(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]