1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

!W 新增了一个获取当前节点鼠标在Group中的坐标

This commit is contained in:
Icarus 2019-09-24 13:49:26 +08:00
parent 3134dc12d8
commit 354f7d10d8

View File

@ -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