浏览代码

Merge pull request #3300 from MarianoGnu/bug_fixing

fix: TouchScreenButton should stop propagating action when button is …
Rémi Verschelde 9 年之前
父节点
当前提交
90e5fba1c1
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      scene/2d/screen_button.cpp

+ 4 - 0
scene/2d/screen_button.cpp

@@ -102,6 +102,10 @@ void TouchScreenButton::_notification(int p_what) {
 				action_id=-1;
 				action_id=-1;
 			}
 			}
 		} break;
 		} break;
+		case NOTIFICATION_EXIT_TREE: {
+			if (is_pressed())
+				Input::get_singleton()->action_release(action);
+		} break;
 	}
 	}
 }
 }