diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-05-04 22:50:23 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-05-04 22:50:23 -0300 |
commit | 72ae89c5aa8da9110ec8f89e5558d5d04935f3b5 (patch) | |
tree | 453b2c8b8cc0edc588cee2dd3e440b30ff729ae2 /scene/gui | |
parent | 3c17e0c91548299b60a6d3998eadb303418512cc (diff) |
Lots of 3D improvements:
-Object Manipulator Gizmo keeps proper scale in all windows and projections, (configurable on settings too).
-Manipulator gizmos for other objects (camera, shapes, etc) massively improved and bug-fixed.
-Manipulator gizmos are different for edited object and other objects.
-Properly highlight manipulator gizmo handles when hovered.
-Fixed bugs in fragment program when using more than 1 light together.
-Reload png/jpg files automatically in editor if edited externally.
-Added 4-stages Parallel Split Shadow Mapping, to improve shadow quality in large scenarios
-Added PCF13 to improve smoothness of shadow borders
-General optimization of directional light shadow mapping for Orthogonal,PSM and PSSM.
-Fixed normal mapping when importing DAE files, works nicely now.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/popup.cpp | 16 | ||||
-rw-r--r-- | scene/gui/popup.h | 4 |
2 files changed, 18 insertions, 2 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 0a5b72d2ed..65ad02723c 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -38,7 +38,13 @@ 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; + notification(NOTIFICATION_POPUP_HIDE); + emit_signal("popup_hide"); + } + } } void Popup::_fix_size() { @@ -101,6 +107,7 @@ void Popup::popup_centered_minsize(const Size2& p_minsize) { popup_centered( total_minsize ); + popped_up=true; } @@ -127,6 +134,7 @@ void Popup::popup_centered(const Size2& p_size) { _post_popup(); notification(NOTIFICATION_POST_POPUP); + popped_up=true; } void Popup::popup_centered_ratio(float p_screen_ratio) { @@ -153,6 +161,7 @@ void Popup::popup_centered_ratio(float p_screen_ratio) { _post_popup(); notification(NOTIFICATION_POST_POPUP); + popped_up=true; } @@ -171,6 +180,7 @@ void Popup::popup() { _post_popup(); notification(NOTIFICATION_POST_POPUP); + popped_up=true; } void Popup::set_exclusive(bool p_exclusive) { @@ -193,8 +203,11 @@ void Popup::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_exclusive","enable"),&Popup::set_exclusive); ObjectTypeDB::bind_method(_MD("is_exclusive"),&Popup::is_exclusive); ADD_SIGNAL( MethodInfo("about_to_show") ); + ADD_SIGNAL( MethodInfo("popup_hide") ); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "popup/exclusive"), _SCS("set_exclusive"),_SCS("is_exclusive") ); BIND_CONSTANT(NOTIFICATION_POST_POPUP); + BIND_CONSTANT(NOTIFICATION_POPUP_HIDE); + } @@ -202,6 +215,7 @@ Popup::Popup() { set_as_toplevel(true); exclusive=false; + popped_up=false; hide(); } diff --git a/scene/gui/popup.h b/scene/gui/popup.h index 3744ff283f..072b66c2c7 100644 --- a/scene/gui/popup.h +++ b/scene/gui/popup.h @@ -39,6 +39,7 @@ class Popup : public Control { OBJ_TYPE( Popup, Control ); bool exclusive; + bool popped_up; protected: @@ -51,7 +52,8 @@ protected: public: enum { - NOTIFICATION_POST_POPUP=80 + NOTIFICATION_POST_POPUP=80, + NOTIFICATION_POPUP_HIDE=81 }; void set_exclusive(bool p_exclusive); |