summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp32
1 files changed, 30 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 98f5fcbeec..5e3ece7b0b 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -122,6 +122,7 @@
#include "editor/plugins/theme_editor_plugin.h"
#include "editor/plugins/tile_map_editor_plugin.h"
#include "editor/plugins/tile_set_editor_plugin.h"
+#include "editor/plugins/version_control_editor_plugin.h"
#include "editor/plugins/visual_shader_editor_plugin.h"
#include "editor/pvrtc_compress.h"
#include "editor/register_exporters.h"
@@ -184,6 +185,20 @@ void EditorNode::_update_scene_tabs() {
}
}
+void EditorNode::_version_control_menu_option(int p_idx) {
+
+ switch (vcs_actions_menu->get_item_id(p_idx)) {
+ case RUN_VCS_SETTINGS: {
+
+ VersionControlEditorPlugin::get_singleton()->popup_vcs_set_up_dialog(gui_base);
+ } break;
+ case RUN_VCS_SHUT_DOWN: {
+
+ VersionControlEditorPlugin::get_singleton()->shut_down();
+ } break;
+ }
+}
+
void EditorNode::_update_title() {
String appname = ProjectSettings::get_singleton()->get("application/config/name");
@@ -1835,6 +1850,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
String main_scene;
String run_filename;
String args;
+ bool skip_breakpoints;
if (p_current || (editor_data.get_edited_scene_root() && p_custom == editor_data.get_edited_scene_root()->get_filename())) {
@@ -1900,8 +1916,9 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
editor_data.get_editor_breakpoints(&breakpoints);
args = ProjectSettings::get_singleton()->get("editor/main_run_args");
+ skip_breakpoints = ScriptEditor::get_singleton()->get_debugger()->is_skip_breakpoints();
- Error error = editor_run.run(run_filename, args, breakpoints);
+ Error error = editor_run.run(run_filename, args, breakpoints, skip_breakpoints);
if (error != OK) {
@@ -3523,6 +3540,7 @@ void EditorNode::register_editor_types() {
ClassDB::register_class<EditorResourcePreviewGenerator>();
ClassDB::register_virtual_class<EditorFileSystem>();
ClassDB::register_class<EditorFileSystemDirectory>();
+ ClassDB::register_class<EditorVCSInterface>();
ClassDB::register_virtual_class<ScriptEditor>();
ClassDB::register_virtual_class<EditorInterface>();
ClassDB::register_class<EditorExportPlugin>();
@@ -5312,6 +5330,7 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_dropped_files", &EditorNode::_dropped_files);
ClassDB::bind_method(D_METHOD("_global_menu_action"), &EditorNode::_global_menu_action, DEFVAL(Variant()));
ClassDB::bind_method("_toggle_distraction_free_mode", &EditorNode::_toggle_distraction_free_mode);
+ ClassDB::bind_method("_version_control_menu_option", &EditorNode::_version_control_menu_option);
ClassDB::bind_method("edit_item_resource", &EditorNode::edit_item_resource);
ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
@@ -5998,6 +6017,15 @@ EditorNode::EditorNode() {
p->add_shortcut(ED_SHORTCUT("editor/project_settings", TTR("Project Settings...")), RUN_SETTINGS);
p->connect("id_pressed", this, "_menu_option");
+ vcs_actions_menu = VersionControlEditorPlugin::get_singleton()->get_version_control_actions_panel();
+ vcs_actions_menu->set_name("Version Control");
+ vcs_actions_menu->connect("index_pressed", this, "_version_control_menu_option");
+ p->add_separator();
+ p->add_child(vcs_actions_menu);
+ p->add_submenu_item(TTR("Version Control"), "Version Control");
+ vcs_actions_menu->add_item(TTR("Set Up Version Control"), RUN_VCS_SETTINGS);
+ vcs_actions_menu->add_item(TTR("Shut Down Version Control"), RUN_VCS_SHUT_DOWN);
+
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/export", TTR("Export...")), FILE_EXPORT_PROJECT);
p->add_item(TTR("Install Android Build Template..."), FILE_INSTALL_ANDROID_SOURCE);
@@ -6007,7 +6035,6 @@ EditorNode::EditorNode() {
plugin_config_dialog->connect("plugin_ready", this, "_on_plugin_ready");
gui_base->add_child(plugin_config_dialog);
- p->add_separator();
tool_menu = memnew(PopupMenu);
tool_menu->set_name("Tools");
tool_menu->connect("index_pressed", this, "_tool_menu_option");
@@ -6472,6 +6499,7 @@ EditorNode::EditorNode() {
//more visually meaningful to have this later
raise_bottom_panel_item(AnimationPlayerEditor::singleton);
+ add_editor_plugin(VersionControlEditorPlugin::get_singleton());
add_editor_plugin(memnew(ShaderEditorPlugin(this)));
add_editor_plugin(memnew(VisualShaderEditorPlugin(this)));