From 0dbedd18fc62f700e92a4cf581e505d849bc47ad Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 5 Nov 2014 21:20:42 -0300 Subject: SceneMainLoop -> SceneTree -=-=-=-=-=-=-=-=-=-=-=-=-=- *YOUR SOURCE MIGHT NOT WORK* For mor information on fix: https://github.com/okamstudio/godot/wiki/devel_scene_tree Other stuff: -Shower of bullets demo -Fixes all around --- scene/2d/screen_button.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'scene/2d/screen_button.cpp') diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp index b606634819..2ac3c06031 100644 --- a/scene/2d/screen_button.cpp +++ b/scene/2d/screen_button.cpp @@ -69,9 +69,9 @@ void TouchScreenButton::_notification(int p_what) { case NOTIFICATION_DRAW: { - if (!is_inside_scene()) + if (!is_inside_tree()) return; - if (!get_scene()->is_editor_hint() && !OS::get_singleton()->has_touchscreen_ui_hint() && visibility==VISIBILITY_TOUCHSCREEN_ONLY) + if (!get_tree()->is_editor_hint() && !OS::get_singleton()->has_touchscreen_ui_hint() && visibility==VISIBILITY_TOUCHSCREEN_ONLY) return; if (finger_pressed!=-1) { @@ -87,13 +87,13 @@ void TouchScreenButton::_notification(int p_what) { } } break; - case NOTIFICATION_ENTER_SCENE: { + case NOTIFICATION_ENTER_TREE: { - if (!get_scene()->is_editor_hint() && !OS::get_singleton()->has_touchscreen_ui_hint() && visibility==VISIBILITY_TOUCHSCREEN_ONLY) + if (!get_tree()->is_editor_hint() && !OS::get_singleton()->has_touchscreen_ui_hint() && visibility==VISIBILITY_TOUCHSCREEN_ONLY) return; update(); - if (!get_scene()->is_editor_hint()) + if (!get_tree()->is_editor_hint()) set_process_input(true); if (action.operator String()!="" && InputMap::get_singleton()->has_action(action)) { @@ -129,7 +129,7 @@ String TouchScreenButton::get_action() const { void TouchScreenButton::_input(const InputEvent& p_event) { - if (!get_scene()) + if (!get_tree()) return; if (p_event.device != 0) @@ -149,7 +149,7 @@ void TouchScreenButton::_input(const InputEvent& p_event) { ie.ID=0; ie.action.action=action_id; ie.action.pressed=false; - get_scene()->input_event(ie); + get_tree()->input_event(ie); } finger_pressed=-1; @@ -193,7 +193,7 @@ void TouchScreenButton::_input(const InputEvent& p_event) { ie.ID=0; ie.action.action=action_id; ie.action.pressed=true; - get_scene()->input_event(ie); + get_tree()->input_event(ie); } update(); @@ -213,7 +213,7 @@ void TouchScreenButton::_input(const InputEvent& p_event) { ie.ID=0; ie.action.action=action_id; ie.action.pressed=false; - get_scene()->input_event(ie); + get_tree()->input_event(ie); } finger_pressed=-1; @@ -268,7 +268,7 @@ void TouchScreenButton::_input(const InputEvent& p_event) { ie.ID=0; ie.action.action=action_id; ie.action.pressed=true; - get_scene()->input_event(ie); + get_tree()->input_event(ie); } update(); @@ -289,7 +289,7 @@ void TouchScreenButton::_input(const InputEvent& p_event) { ie.ID=0; ie.action.action=action_id; ie.action.pressed=false; - get_scene()->input_event(ie); + get_tree()->input_event(ie); } finger_pressed=-1; update(); -- cgit v1.2.3