Merge pull request #2306 from dbsGen/patch-1
Fixed the mouse position for control when it is in a canvas_layer.
This commit is contained in:
commit
3b68f0d051
1 changed files with 2 additions and 0 deletions
|
@ -1156,6 +1156,8 @@ Matrix32 CanvasItem::get_canvas_transform() const {
|
|||
|
||||
if (canvas_layer)
|
||||
return canvas_layer->get_transform();
|
||||
else if (get_parent()->cast_to<CanvasItem>())
|
||||
return get_parent()->cast_to<CanvasItem>()->get_canvas_transform();
|
||||
else
|
||||
return get_viewport()->get_canvas_transform();
|
||||
|
||||
|
|
Loading…
Reference in a new issue