2
0
Эх сурвалжийг харах

fix: TouchScreenButton should stop propagating action when button is removed from scene

MarianoGNU 9 жил өмнө
parent
commit
3169b66d15

+ 4 - 0
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;
 	}
 }