1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-02-04 06:14:54 +08:00

#144 Added option to disable tooltips

This commit is contained in:
Michael Wigley 2019-06-08 14:01:45 -05:00 committed by Thor Brigsted
parent 53f85a5d22
commit 8b0eb6bb60
2 changed files with 3 additions and 1 deletions

View File

@ -429,7 +429,7 @@ namespace XNodeEditor {
}
private void DrawTooltip() {
if (hoveredPort != null) {
if (hoveredPort != null && NodeEditorPreferences.GetSettings().portTooltips) {
Type type = hoveredPort.ValueType;
GUIContent content = new GUIContent();
content.text = type.PrettyName();

View File

@ -33,6 +33,7 @@ namespace XNodeEditor {
public bool gridSnap = true;
public bool autoSave = true;
public bool zoomToMouse = true;
public bool portTooltips = true;
[SerializeField] private string typeColorsData = "";
[NonSerialized] public Dictionary<string, Color> typeColors = new Dictionary<string, Color>();
public NoodleType noodleType = NoodleType.Curve;
@ -147,6 +148,7 @@ namespace XNodeEditor {
EditorGUILayout.LabelField("Node", EditorStyles.boldLabel);
settings.highlightColor = EditorGUILayout.ColorField("Selection", settings.highlightColor);
settings.noodleType = (NoodleType) EditorGUILayout.EnumPopup("Noodle type", (Enum) settings.noodleType);
settings.portTooltips = EditorGUILayout.Toggle("Port Tooltips", settings.portTooltips);
if (GUI.changed) {
SavePrefs(key, settings);
NodeEditorWindow.RepaintAll();