diff options
author | MarianoGNU <marianognu.easyrpg@gmail.com> | 2015-12-27 19:06:30 -0300 |
---|---|---|
committer | MarianoGNU <marianognu.easyrpg@gmail.com> | 2016-01-10 10:36:43 -0300 |
commit | 3169b66d15e983e012b1da181672fef61f3660a0 (patch) | |
tree | 6a7a26d135521ee570d7558e3b6be1b6f0f2ca1c /scene | |
parent | 3a3ce982b0157c21b4976a347d4c1c254093970f (diff) |
fix: TouchScreenButton should stop propagating action when button is removed from scene
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/screen_button.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp index d7f9b191fe..fac94f19dc 100644 --- a/scene/2d/screen_button.cpp +++ b/scene/2d/screen_button.cpp @@ -102,6 +102,10 @@ void TouchScreenButton::_notification(int p_what) { action_id=-1; } } break; + case NOTIFICATION_EXIT_TREE: { + if (is_pressed()) + Input::get_singleton()->action_release(action); + } break; } } |