diff options
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/http_request.cpp | 3 | ||||
-rw-r--r-- | scene/main/node.cpp | 12 | ||||
-rw-r--r-- | scene/main/node.h | 1 | ||||
-rw-r--r-- | scene/main/scene_main_loop.cpp | 10 | ||||
-rw-r--r-- | scene/main/scene_main_loop.h | 1 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 1 |
6 files changed, 26 insertions, 2 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 328ad8fb26..2320616629 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -480,8 +480,9 @@ void HTTPRequest::_bind_methods() { BIND_CONSTANT( RESULT_NO_RESPONSE ); BIND_CONSTANT( RESULT_BODY_SIZE_LIMIT_EXCEEDED ); BIND_CONSTANT( RESULT_REQUEST_FAILED ); - BIND_CONSTANT( RESULT_REDIRECT_LIMIT_REACHED ); + BIND_CONSTANT( RESULT_DOWNLOAD_FILE_CANT_OPEN ); BIND_CONSTANT( RESULT_DOWNLOAD_FILE_WRITE_ERROR ); + BIND_CONSTANT( RESULT_REDIRECT_LIMIT_REACHED ); } diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f261693841..29925b62f5 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1244,7 +1244,19 @@ void Node::get_groups(List<GroupInfo> *p_groups) const { } +bool Node::has_persistent_groups() const { + const StringName *K=NULL; + + while ((K=data.grouped.next(K))) { + + if (data.grouped[*K].persistent) + return true; + } + + return false; + +} void Node::_print_tree(const Node *p_node) { print_line(String(p_node->get_path_to(this))); diff --git a/scene/main/node.h b/scene/main/node.h index a4683e602f..cf62e7cdea 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -223,6 +223,7 @@ public: }; void get_groups(List<GroupInfo> *p_groups) const; + bool has_persistent_groups() const; void move_child(Node *p_child,int p_pos); void raise(); diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index 24fe1e1bb3..d7f22c3228 100644 --- a/scene/main/scene_main_loop.cpp +++ b/scene/main/scene_main_loop.cpp @@ -1593,6 +1593,14 @@ void SceneTree::_live_edit_reparent_node_func(const NodePath& p_at,const NodePat #endif + + +void SceneTree::drop_files(const Vector<String>& p_files,int p_from_screen) { + + emit_signal("files_dropped",p_files,p_from_screen); + MainLoop::drop_files(p_files,p_from_screen); +} + void SceneTree::_bind_methods() { @@ -1666,6 +1674,8 @@ void SceneTree::_bind_methods() { ADD_SIGNAL( MethodInfo("idle_frame")); ADD_SIGNAL( MethodInfo("fixed_frame")); + ADD_SIGNAL( MethodInfo("files_dropped",PropertyInfo(Variant::STRING_ARRAY,"files"),PropertyInfo(Variant::INT,"screen")) ); + BIND_CONSTANT( GROUP_CALL_DEFAULT ); BIND_CONSTANT( GROUP_CALL_REVERSE ); BIND_CONSTANT( GROUP_CALL_REALTIME ); diff --git a/scene/main/scene_main_loop.h b/scene/main/scene_main_loop.h index b6a015c9ed..5fc9e0c1ae 100644 --- a/scene/main/scene_main_loop.h +++ b/scene/main/scene_main_loop.h @@ -344,6 +344,7 @@ public: static SceneTree* get_singleton() { return singleton; } + void drop_files(const Vector<String>& p_files,int p_from_screen=0); SceneTree(); ~SceneTree(); diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 5ce53194a1..313be88526 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1358,7 +1358,6 @@ void Viewport::_vp_unhandled_input(const InputEvent& p_ev) { if (disable_input) return; - #ifdef TOOLS_ENABLED if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) { return; |