1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-02-06 15:24:55 +08:00

Fixed minor jittering with tooltips

This commit is contained in:
Thor Brigsted 2019-08-11 23:52:33 +02:00
parent 25d208d278
commit 650522223c

View File

@ -418,6 +418,7 @@ namespace XNodeEditor {
if (string.IsNullOrEmpty(tooltip)) return;
GUIContent content = new GUIContent(tooltip);
Vector2 size = NodeEditorResources.styles.tooltip.CalcSize(content);
size.x += 8;
Rect rect = new Rect(Event.current.mousePosition - (size), size);
EditorGUI.LabelField(rect, content, NodeEditorResources.styles.tooltip);
Repaint();