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

Changed GetNodePath to GetNodeMenuName as per master branch

This commit is contained in:
Zulfa Juniadi 2018-07-08 23:19:18 +08:00
parent e896ee23c1
commit 5f3ac8fa6e
2 changed files with 6 additions and 6 deletions

View File

@ -8,12 +8,12 @@ namespace XNodeEditor.Examples {
public class MathGraphEditor : NodeGraphEditor { public class MathGraphEditor : NodeGraphEditor {
/// <summary> /// <summary>
/// Overriding GetNodePath lets you control if and how nodes are categorized. /// Overriding GetNodeMenuName lets you control if and how nodes are categorized.
/// In this example we are sorting out all node types that are not in the XNode.Examples namespace. /// In this example we are sorting out all node types that are not in the XNode.Examples namespace.
/// </summary> /// </summary>
public override string GetNodePath(System.Type type) { public override string GetNodeMenuName(System.Type type) {
if (type.Namespace == "XNode.Examples.MathNodes") { if (type.Namespace == "XNode.Examples.MathNodes") {
return base.GetNodePath(type).Replace("X Node/Examples/Math Nodes/", ""); return base.GetNodeMenuName(type).Replace("X Node/Examples/Math Nodes/", "");
} else return null; } else return null;
} }
} }

View File

@ -9,12 +9,12 @@ namespace XNodeEditor.Examples {
public class StateGraphEditor : NodeGraphEditor { public class StateGraphEditor : NodeGraphEditor {
/// <summary> /// <summary>
/// Overriding GetNodePath lets you control if and how nodes are categorized. /// Overriding GetNodeMenuName lets you control if and how nodes are categorized.
/// In this example we are sorting out all node types that are not in the XNode.Examples namespace. /// In this example we are sorting out all node types that are not in the XNode.Examples namespace.
/// </summary> /// </summary>
public override string GetNodePath(System.Type type) { public override string GetNodeMenuName(System.Type type) {
if (type.Namespace == "XNode.Examples.StateGraph") { if (type.Namespace == "XNode.Examples.StateGraph") {
return base.GetNodePath(type).Replace("X Node/Examples/State Graph/", ""); return base.GetNodeMenuName(type).Replace("X Node/Examples/State Graph/", "");
} else return null; } else return null;
} }
} }