1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00
# Conflicts:
#	Scripts/Editor/NodeEditorGUI.cs
This commit is contained in:
mayuntian 2020-08-11 11:12:15 +08:00
commit d1324f3148

View File

@ -536,8 +536,8 @@ namespace XNodeEditor {
if (e.type != EventType.Layout && currentActivity == NodeActivity.DragGrid) Selection.objects = preSelection.ToArray();
EndZoomed(position, zoom, topPadding);
//If a change in is detected in the selected node, call OnValidate method.
//This is done through reflection because OnValidate is only relevant in editor,
//If a change in is detected in the selected node, call OnValidate method.
//This is done through reflection because OnValidate is only relevant in editor,
//and thus, the code should not be included in build.
if (onValidate != null && EditorGUI.EndChangeCheck()) onValidate.Invoke(Selection.activeObject, null);
}
@ -559,10 +559,12 @@ namespace XNodeEditor {
if (!NodeEditorPreferences.GetSettings().portTooltips || graphEditor is null)
return;
string tooltip = null;
if (hoveredPort != null && IsHoveringPort)
if (hoveredPort != null) {
tooltip = graphEditor.GetPortTooltip(hoveredPort);
else if (hoveredNode != null && IsHoveringNode && IsHoveringTitle(hoveredNode))
}
else if (hoveredNode != null && IsHoveringNode && IsHoveringTitle(hoveredNode)) {
tooltip = graphEditor.GetNodeTooltip(hoveredNode);
}
if (string.IsNullOrEmpty(tooltip)) return;
GUIContent content = new GUIContent(tooltip);
Vector2 size = NodeEditorResources.styles.tooltip.CalcSize(content);