summaryrefslogtreecommitdiff
path: root/scene/gui/popup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r--scene/gui/popup.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 523633166c..7d0b91a366 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -58,12 +58,12 @@ void Popup::_notification(int p_what) {
void Popup::_fix_size() {
#if 0
- Point2 pos = get_pos();
+ Point2 pos = get_position();
Size2 size = get_size();
Point2 window_size = window==this ? get_parent_area_size() :window->get_size();
#else
- Point2 pos = get_global_pos();
+ Point2 pos = get_global_position();
Size2 size = get_size();
Point2 window_size = get_viewport_rect().size;
@@ -79,10 +79,10 @@ void Popup::_fix_size() {
pos.y = 0;
#if 0
if (pos!=get_pos())
- set_pos(pos);
+ set_position(pos);
#else
- if (pos != get_pos())
- set_global_pos(pos);
+ if (pos != get_position())
+ set_global_position(pos);
#endif
}
@@ -171,7 +171,7 @@ void Popup::popup_centered(const Size2 &p_size) {
rect.size = p_size == Size2() ? get_size() : p_size;
rect.pos = ((window_size - rect.size) / 2.0).floor();
- set_pos(rect.pos);
+ set_position(rect.pos);
set_size(rect.size);
show_modal(exclusive);
@@ -194,7 +194,7 @@ void Popup::popup_centered_ratio(float p_screen_ratio) {
Point2 window_size = get_viewport_rect().size;
rect.size = (window_size * p_screen_ratio).floor();
rect.pos = ((window_size - rect.size) / 2.0).floor();
- set_pos(rect.pos);
+ set_position(rect.pos);
set_size(rect.size);
show_modal(exclusive);
@@ -216,7 +216,7 @@ void Popup::popup(const Rect2 &bounds) {
// Fit the popup into the optionally provided bounds.
if (!bounds.has_no_area()) {
- set_pos(bounds.pos);
+ set_position(bounds.pos);
set_size(bounds.size);
}
_fix_size();