summaryrefslogtreecommitdiff
path: root/scene/gui/menu_button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/menu_button.cpp')
-rw-r--r--scene/gui/menu_button.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 16277ed0d0..cf468f2257 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -50,10 +50,10 @@ void MenuButton::pressed() {
emit_signal("about_to_show");
Size2 size = get_size();
- Point2 gp = get_global_pos();
- popup->set_global_pos(gp + Size2(0, size.height));
+ Point2 gp = get_global_position();
+ popup->set_global_position(gp + Size2(0, size.height));
popup->set_size(Size2(size.width, 0));
- popup->set_parent_rect(Rect2(Point2(gp - popup->get_global_pos()), get_size()));
+ popup->set_parent_rect(Rect2(Point2(gp - popup->get_global_position()), get_size()));
popup->popup();
popup->call_deferred("grab_click_focus");
popup->set_invalidate_click_until_motion();