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:
parent
883e585b65
commit
133d15703a
@ -41,12 +41,10 @@ namespace XNodeEditor {
|
|||||||
|
|
||||||
/// <summary> Returns context node menu path. Null or empty strings for hidden nodes. </summary>
|
/// <summary> Returns context node menu path. Null or empty strings for hidden nodes. </summary>
|
||||||
public virtual string GetNodeMenuName(Type type) {
|
public virtual string GetNodeMenuName(Type type) {
|
||||||
//Check if type has the CreateNodeMenuAttribute
|
|
||||||
XNode.Node.CreateNodeMenuAttribute attrib;
|
XNode.Node.CreateNodeMenuAttribute attrib;
|
||||||
if (NodeEditorUtilities.GetAttrib(type, out attrib)) // Return custom path
|
string name = NodeEditorUtilities.GetAttrib(type, out attrib) ? attrib.menuName : NodeEditorUtilities.NodeDefaultPath(type);
|
||||||
return attrib.menuName;
|
name = name.Replace("X Node/", "");
|
||||||
else // Return generated path
|
return name;
|
||||||
return NodeEditorUtilities.NodeDefaultPath(type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> The order by which the menu items are displayed. </summary>
|
/// <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.
|
/// <summary> The returned color is used to color the background of the door.
|
||||||
/// Usually used for outer edge effect </summary>
|
/// Usually used for outer edge effect </summary>
|
||||||
public virtual Color GetPortBackgroundColor(XNode.NodePort port) {
|
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>
|
/// <summary> Returns generated color for a type. This color is editable in preferences </summary>
|
||||||
|
|||||||
3
Runtime/Flow/Events.meta
Normal file
3
Runtime/Flow/Events.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2d9f2360b3c44077a4e627c1e1c632c7
|
||||||
|
timeCreated: 1673300700
|
||||||
8
Runtime/Flow/Events/StartNode.cs
Normal file
8
Runtime/Flow/Events/StartNode.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace XNode.Flow.Events
|
||||||
|
{
|
||||||
|
[NodeTint(1.0F,0.25F,0.25F), NodeWidth(75)]
|
||||||
|
public class StartNode : OutFlowNode
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
3
Runtime/Flow/Events/StartNode.cs.meta
Normal file
3
Runtime/Flow/Events/StartNode.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e65f760a3b214683992e83787395aca5
|
||||||
|
timeCreated: 1673300714
|
||||||
@ -5,6 +5,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace XNode.Flow
|
namespace XNode.Flow
|
||||||
{
|
{
|
||||||
|
[Serializable]
|
||||||
public abstract class FlowNode : Node
|
public abstract class FlowNode : Node
|
||||||
{
|
{
|
||||||
public override object GetValue(NodePort port)
|
public override object GetValue(NodePort port)
|
||||||
@ -24,6 +25,7 @@ namespace XNode.Flow
|
|||||||
public FlowNode GetFlowNode(string portName) => GetValue(GetPort(portName)) as FlowNode;
|
public FlowNode GetFlowNode(string portName) => GetValue(GetPort(portName)) as FlowNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
public abstract class InFlowNode : FlowNode
|
public abstract class InFlowNode : FlowNode
|
||||||
{
|
{
|
||||||
[Input(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]
|
[Input(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]
|
||||||
@ -36,6 +38,7 @@ namespace XNode.Flow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
public abstract class OutFlowNode : FlowNode
|
public abstract class OutFlowNode : FlowNode
|
||||||
{
|
{
|
||||||
[Output(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]
|
[Output(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]
|
||||||
@ -48,6 +51,7 @@ namespace XNode.Flow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
public abstract class InOutFlowNode : FlowNode
|
public abstract class InOutFlowNode : FlowNode
|
||||||
{
|
{
|
||||||
[Input(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]
|
[Input(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user