summaryrefslogtreecommitdiffstats
path: root/scene/gui/popup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r--scene/gui/popup.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 1f04985ec6..0d9a76937c 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -32,12 +32,12 @@
void Popup::_input_event(InputEvent p_event) {
-
+
}
void Popup::_notification(int p_what) {
-
+
if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
if (popped_up && !is_visible()) {
popped_up=false;
@@ -58,11 +58,11 @@ void Popup::_notification(int p_what) {
}
void Popup::_fix_size() {
-
+
#if 0
Point2 pos = get_pos();
- Size2 size = get_size();
+ Size2 size = get_size();
Point2 window_size = window==this ? get_parent_area_size() :window->get_size();
#else
@@ -75,7 +75,7 @@ void Popup::_fix_size() {
pos.x=window_size.width-size.width;
if (pos.x<0)
pos.x=0;
-
+
if (pos.y+size.height > window_size.height)
pos.y=window_size.height-size.height;
if (pos.y<0)
@@ -179,7 +179,7 @@ void Popup::popup_centered_minsize(const Size2& p_minsize) {
}
void Popup::popup_centered(const Size2& p_size) {
-
+
Point2 window_size = get_viewport_rect().size;
emit_signal("about_to_show");
@@ -203,9 +203,9 @@ void Popup::popup_centered(const Size2& p_size) {
}
void Popup::popup_centered_ratio(float p_screen_ratio) {
-
-
-
+
+
+
emit_signal("about_to_show");
Rect2 rect;
@@ -214,7 +214,7 @@ void Popup::popup_centered_ratio(float p_screen_ratio) {
rect.pos = ((window_size-rect.size)/2.0).floor();
set_pos( rect.pos );
set_size( rect.size );
-
+
show_modal(exclusive);
_fix_size();