mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Allow graphs to repain on update
This commit is contained in:
parent
83acd16d4b
commit
3a8ceca30b
@ -56,6 +56,13 @@ namespace XNodeEditor {
|
||||
}
|
||||
}
|
||||
|
||||
public void Update() {
|
||||
// Repaint the graph if it is required during update.
|
||||
if (graph.RepaintOnUpdate) {
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<XNode.Node, Vector2> nodeSizes { get { return _nodeSizes; } }
|
||||
private Dictionary<XNode.Node, Vector2> _nodeSizes = new Dictionary<XNode.Node, Vector2>();
|
||||
public XNode.NodeGraph graph;
|
||||
|
||||
@ -78,5 +78,10 @@ namespace XNode {
|
||||
// Remove all nodes prior to graph destruction
|
||||
Clear();
|
||||
}
|
||||
|
||||
/// <summary>Whether the graph requires a repaint during updates.</summary>
|
||||
public virtual bool RepaintOnUpdate {
|
||||
get { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user