summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-09-14 19:44:08 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-09-14 19:44:08 -0300
commit08688931a13ee49dc435100265748e4194f081e7 (patch)
tree051bb021a280cdf72f231fff7f7626b591bc5a94 /tools
parenta75f5f039e31e20d985937f63cb2c8b90734160c (diff)
Call run callback
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_node.cpp11
-rw-r--r--tools/editor/editor_node.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index e79bdee1b3..3b1e90a907 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1217,6 +1217,7 @@ void EditorNode::_dialog_action(String p_file) {
//_save_scene(p_file);
_save_scene_with_preview(p_file);
+ _call_build();
_run(true);
}
} break;
@@ -2636,6 +2637,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case RUN_PLAY: {
_menu_option_confirm(RUN_STOP,true);
+ _call_build();
_run(false);
} break;
@@ -2671,6 +2673,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case RUN_PLAY_SCENE: {
_menu_option_confirm(RUN_STOP,true);
+ _call_build();
_run(true);
} break;
@@ -2682,6 +2685,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
}
if (run_native->is_deploy_debug_remote_enabled()){
_menu_option_confirm(RUN_STOP,true);
+ _call_build();
emit_signal("play_pressed");
editor_run.run_native_notify();
}
@@ -4042,6 +4046,7 @@ void EditorNode::_quick_opened() {
void EditorNode::_quick_run() {
+ _call_build();
_run(false,quick_run->get_selected());
}
@@ -5255,6 +5260,12 @@ void EditorNode::add_build_callback(EditorBuildCallback p_callback) {
EditorPluginInitializeCallback EditorNode::build_callbacks[EditorNode::MAX_BUILD_CALLBACKS];
+void EditorNode::_call_build() {
+
+ for(int i=0;i<build_callback_count;i++) {
+ build_callbacks[i]();
+ }
+}
void EditorNode::_bind_methods() {
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index 24ba1cd834..2fae5daced 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -590,6 +590,7 @@ private:
static int plugin_init_callback_count;
static EditorPluginInitializeCallback plugin_init_callbacks[MAX_INIT_CALLBACKS];
+ void _call_build();
static int build_callback_count;
static EditorBuildCallback build_callbacks[MAX_BUILD_CALLBACKS];
protected: