From 72ae89c5aa8da9110ec8f89e5558d5d04935f3b5 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 4 May 2014 22:50:23 -0300 Subject: 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. --- scene/gui/popup.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'scene/gui/popup.cpp') 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(); } -- cgit v1.2.3