summaryrefslogtreecommitdiff
path: root/scene/gui/popup.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-06-05 15:52:05 +0200
committerGitHub <noreply@github.com>2017-06-05 15:52:05 +0200
commitf8d7670e82007103573b88f48fe7b7c4addbd66d (patch)
treef4802061ca26ae9220ec9a5e9d51d80e1a465faa /scene/gui/popup.cpp
parent075c7d8133e4fde353ab54a255638b0c9a3740a5 (diff)
parenta3c90b029308eb46b7fd83a0cf7b502ecbd79d55 (diff)
Merge pull request #9038 from AlexHolly/rect2-rename-pos
renamed all Rect2.pos to Rect2.position
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r--scene/gui/popup.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 655d8ed6f6..8979e0f111 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -170,8 +170,8 @@ void Popup::popup_centered(const Size2 &p_size) {
Rect2 rect;
rect.size = p_size == Size2() ? get_size() : p_size;
- rect.pos = ((window_size - rect.size) / 2.0).floor();
- set_position(rect.pos);
+ rect.position = ((window_size - rect.size) / 2.0).floor();
+ set_position(rect.position);
set_size(rect.size);
show_modal(exclusive);
@@ -193,8 +193,8 @@ void Popup::popup_centered_ratio(float p_screen_ratio) {
Rect2 rect;
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_position(rect.pos);
+ rect.position = ((window_size - rect.size) / 2.0).floor();
+ set_position(rect.position);
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_position(bounds.pos);
+ set_position(bounds.position);
set_size(bounds.size);
}
_fix_size();