summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorAnton Yabchinskiy <arn@bestmx.ru>2014-12-09 17:51:14 +0300
committerAnton Yabchinskiy <arn@bestmx.ru>2014-12-09 17:51:14 +0300
commitff755f93eb86e3f7f6801918457ca77a3001671b (patch)
tree58d6def002b427db665a504f08d25eae335bd9d9 /scene/main
parentd45be7d9f43046365fcfbf97420f9eca636c51e7 (diff)
parentbe4e40e90a5a322f6a7cec4893854ef5b15db600 (diff)
Merge branch 'master' of http://github.com/okamstudio/godot
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/node.cpp6
-rw-r--r--scene/main/node.h1
-rw-r--r--scene/main/scene_main_loop.cpp3
-rw-r--r--scene/main/timer.cpp3
4 files changed, 12 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 292e4d1a7b..45a30d7bca 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -271,6 +271,7 @@ void Node::move_child(Node *p_child,int p_pos) {
data.children[i]->data.pos=i;
}
// notification second
+ move_child_notify(p_child);
for (int i=0;i<data.children.size();i++) {
data.children[i]->notification( NOTIFICATION_MOVED_IN_PARENT );
@@ -310,6 +311,11 @@ void Node::remove_child_notify(Node *p_child) {
// to be used when not wanted
}
+void Node::move_child_notify(Node *p_child) {
+
+ // to be used when not wanted
+}
+
void Node::set_fixed_process(bool p_process) {
if (data.fixed_process==p_process)
diff --git a/scene/main/node.h b/scene/main/node.h
index 9229e2f9bb..371a5325ca 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -142,6 +142,7 @@ protected:
virtual void add_child_notify(Node *p_child);
virtual void remove_child_notify(Node *p_child);
+ virtual void move_child_notify(Node *p_child);
void remove_and_delete_child(Node *p_child);
void _propagate_replace_owner(Node *p_owner,Node* p_by_owner);
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp
index 47089638bb..ed3e419359 100644
--- a/scene/main/scene_main_loop.cpp
+++ b/scene/main/scene_main_loop.cpp
@@ -333,6 +333,9 @@ void SceneTree::input_text( const String& p_text ) {
void SceneTree::input_event( const InputEvent& p_event ) {
+ if (is_editor_hint() && (p_event.type==InputEvent::JOYSTICK_MOTION || p_event.type==InputEvent::JOYSTICK_BUTTON))
+ return; //avoid joy input on editor
+
root_lock++;
//last_id=p_event.ID;
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 2ae918f3f3..f718a09577 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -40,7 +40,8 @@ void Timer::_notification(int p_what) {
#ifdef TOOLS_ENABLED
if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root() && (get_tree()->get_edited_scene_root()==this || get_tree()->get_edited_scene_root()->is_a_parent_of(this)))
break;
-#endif start();
+#endif
+ start();
}
} break;
case NOTIFICATION_PROCESS: {