mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Zoom System Fixes
- Due to the OnGUI method being called last to draw over everything else in the window, the GUI.Group being created in the new zoom system was also moving around the GUI elements created in the NodeGraphEditor OnGUI method.
This commit is contained in:
parent
53bba68ae0
commit
d6ae3bedce
@ -30,7 +30,7 @@ namespace XNodeEditor {
|
|||||||
DrawNodes();
|
DrawNodes();
|
||||||
DrawSelectionBox();
|
DrawSelectionBox();
|
||||||
DrawTooltip();
|
DrawTooltip();
|
||||||
graphEditor.OnGUI();
|
DrawOnGUI();
|
||||||
|
|
||||||
// Run and reset onLateGUI
|
// Run and reset onLateGUI
|
||||||
if (onLateGUI != null) {
|
if (onLateGUI != null) {
|
||||||
@ -443,5 +443,15 @@ namespace XNodeEditor {
|
|||||||
Repaint();
|
Repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DrawOnGUI() // Ends the GUI Group temporarily to draw any additional elements in the NodeGraphEditor.
|
||||||
|
{
|
||||||
|
GUI.EndGroup();
|
||||||
|
Rect rect = new Rect(new Vector2(-1f, 20f), new Vector2(Screen.width, Screen.height));
|
||||||
|
GUI.BeginGroup(rect);
|
||||||
|
graphEditor.OnGUI();
|
||||||
|
GUI.EndGroup();
|
||||||
|
GUI.BeginGroup(new Rect(0.0f, topPadding - (topPadding * zoom), Screen.width, Screen.height));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user