mirror of
https://github.com/godotengine/godot.git
synced 2025-01-25 20:12:34 -05:00
Fixed the mouse position for control when it is in a canvas_layer.
This commit is contained in:
parent
07c99e11f5
commit
88bf7f35e1
1 changed files with 2 additions and 0 deletions
|
@ -1146,6 +1146,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…
Add table
Reference in a new issue