mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
!W 新增了一个获取当前节点鼠标在Group中的坐标
This commit is contained in:
parent
3134dc12d8
commit
354f7d10d8
@ -89,6 +89,13 @@ namespace XNodeEditor {
|
||||
else return 208;
|
||||
}
|
||||
|
||||
public Vector2 GetCurrentMousePosition()
|
||||
{
|
||||
var pos = this.target.position + Event.current.mousePosition;
|
||||
pos.x = pos.x - target.position.x;
|
||||
return pos;
|
||||
}
|
||||
|
||||
/// <summary> Returns color for target node </summary>
|
||||
public virtual Color GetTint() {
|
||||
// Try get color from [NodeTint] attribute
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user