summaryrefslogtreecommitdiff
path: root/tools/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r--tools/editor/editor_node.cpp51
1 files changed, 37 insertions, 14 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 98cc198d94..5d0617d8ab 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1533,6 +1533,7 @@ void EditorNode::push_item(Object *p_object,const String& p_property) {
if (!p_object) {
property_editor->edit(NULL);
+ node_dock->set_node(NULL);
scene_tree_dock->set_selected(NULL);
return;
}
@@ -1678,6 +1679,7 @@ void EditorNode::_edit_current() {
scene_tree_dock->set_selected(NULL);
property_editor->edit( NULL );
+ node_dock->set_node(NULL);
object_menu->set_disabled(true);
_display_top_editors(false);
@@ -1697,6 +1699,7 @@ void EditorNode::_edit_current() {
ERR_FAIL_COND(!current_res);
scene_tree_dock->set_selected(NULL);
property_editor->edit( current_res );
+ node_dock->set_node(NULL);
object_menu->set_disabled(false);
//resources_dock->add_resource(Ref<Resource>(current_res));
@@ -1713,6 +1716,7 @@ void EditorNode::_edit_current() {
property_editor->edit( current_node );
+ node_dock->set_node( current_node );
scene_tree_dock->set_selected(current_node);
object_menu->get_popup()->clear();
@@ -1721,6 +1725,7 @@ void EditorNode::_edit_current() {
} else {
property_editor->edit( current_obj );
+ node_dock->set_node(NULL);
//scene_tree_dock->set_selected(current_node);
//object_menu->get_popup()->clear();
@@ -2760,10 +2765,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (ischecked) {
file_server->stop();
+ run_native->set_deploy_dumb(false);
//debug_button->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
//debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Enable File Server");
} else {
file_server->start();
+ run_native->set_deploy_dumb(true);
//debug_button->set_icon(gui_base->get_icon("FileServerActive","EditorIcons"));
//debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Disable File Server");
}
@@ -2779,13 +2786,13 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked);
} break;
- case RUN_DEPLOY_DUMB_CLIENTS: {
+ /*case RUN_DEPLOY_DUMB_CLIENTS: {
bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS));
debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),!ischecked);
run_native->set_deploy_dumb(!ischecked);
- } break;
+ } break;*/
case RUN_DEPLOY_REMOTE_DEBUG: {
bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG));
@@ -2809,7 +2816,11 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case RUN_RELOAD_SCRIPTS: {
- ScriptEditor::get_singleton()->get_debugger()->reload_scripts();
+
+ bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS));
+ debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS),!ischecked);
+
+ ScriptEditor::get_singleton()->set_live_auto_reload_running_scripts(!ischecked);
} break;
case SETTINGS_UPDATE_ALWAYS: {
@@ -3811,6 +3822,10 @@ ScenesDock *EditorNode::get_scenes_dock() {
return scenes_dock;
}
+SceneTreeDock *EditorNode::get_scene_tree_dock() {
+
+ return scene_tree_dock;
+}
void EditorNode::_instance_request(const String& p_path){
@@ -5200,7 +5215,7 @@ void EditorNode::_bind_methods() {
ADD_SIGNAL( MethodInfo("play_pressed") );
ADD_SIGNAL( MethodInfo("pause_pressed") );
ADD_SIGNAL( MethodInfo("stop_pressed") );
- ADD_SIGNAL( MethodInfo("request_help") );
+ ADD_SIGNAL( MethodInfo("request_help") );
ADD_SIGNAL( MethodInfo("script_add_function_request",PropertyInfo(Variant::OBJECT,"obj"),PropertyInfo(Variant::STRING,"function"),PropertyInfo(Variant::STRING_ARRAY,"args")) );
ADD_SIGNAL( MethodInfo("resource_saved",PropertyInfo(Variant::OBJECT,"obj")) );
@@ -5779,16 +5794,20 @@ EditorNode::EditorNode() {
debug_button->set_tooltip(TTR("Debug options"));
p=debug_button->get_popup();
- p->add_check_item(TTR("Live Editing"),RUN_LIVE_DEBUG);
- p->add_check_item(TTR("File Server"),RUN_FILE_SERVER);
- p->add_separator();
- p->add_check_item(TTR("Deploy Remote Debug"),RUN_DEPLOY_REMOTE_DEBUG);
- p->add_check_item(TTR("Deploy File Server Clients"),RUN_DEPLOY_DUMB_CLIENTS);
+ p->add_check_item(TTR("Deploy with Remote Debug"),RUN_DEPLOY_REMOTE_DEBUG);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("When exporting or deploying, the resulting executable will attempt to connect to the IP of this computer in order to be debugged."));
+ p->add_check_item(TTR("Small Deploy with Network FS"),RUN_FILE_SERVER);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is enabled, export or deploy will produce a minimal executable.\nThe filesystem will be provided from the project by the editor over the network.\nOn Android, deploy will use the USB cable for faster performance. This option speeds up testing for games with a large footprint."));
p->add_separator();
p->add_check_item(TTR("Visible Collision Shapes"),RUN_DEBUG_COLLISONS);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("Collision shapes and raycast nodes (for 2D and 3D) will be visible on the running game if this option is turned on."));
p->add_check_item(TTR("Visible Navigation"),RUN_DEBUG_NAVIGATION);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("Navigation meshes and polygons will be visible on the running game if this option is turned on."));
p->add_separator();
- p->add_item(TTR("Reload Scripts"),RUN_RELOAD_SCRIPTS);
+ p->add_check_item(TTR("Sync Scene Changes"),RUN_LIVE_DEBUG);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is turned on, any changes made to the scene in the editor will be replicated in the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
+ p->add_check_item(TTR("Sync Script Changes"),RUN_RELOAD_SCRIPTS);
+ p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
p->connect("item_pressed",this,"_menu_option");
/*
@@ -5913,7 +5932,7 @@ EditorNode::EditorNode() {
scene_tree_dock = memnew( SceneTreeDock(this,scene_root,editor_selection,editor_data) );
scene_tree_dock->set_name(TTR("Scene"));
//top_pallete->add_child(scene_tree_dock);
- dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock);
+ dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(scene_tree_dock);
#if 0
resources_dock = memnew( ResourcesDock(this) );
resources_dock->set_name("Resources");
@@ -5921,7 +5940,7 @@ EditorNode::EditorNode() {
dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(resources_dock);
//top_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL);
#endif
- dock_slot[DOCK_SLOT_RIGHT_BL]->hide();
+ dock_slot[DOCK_SLOT_LEFT_BR]->hide();
/*Control *editor_spacer = memnew( Control );
editor_spacer->set_custom_minimum_size(Size2(260,200));
editor_spacer->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -5943,7 +5962,7 @@ EditorNode::EditorNode() {
VBoxContainer *prop_editor_base = memnew( VBoxContainer );
prop_editor_base->set_name(TTR("Inspector")); // Properties?
- dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(prop_editor_base);
+ dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(prop_editor_base);
HBoxContainer *prop_editor_hb = memnew( HBoxContainer );
@@ -6055,10 +6074,14 @@ EditorNode::EditorNode() {
property_editor->set_undo_redo(&editor_data.get_undo_redo());
+ node_dock = memnew( NodeDock );
+ //node_dock->set_undoredo(&editor_data.get_undo_redo());
+ dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(node_dock);
+
scenes_dock = memnew( ScenesDock(this) );
scenes_dock->set_name(TTR("FileSystem"));
scenes_dock->set_use_thumbnails(int(EditorSettings::get_singleton()->get("file_dialog/display_mode"))==EditorFileDialog::DISPLAY_THUMBNAILS);
- dock_slot[DOCK_SLOT_LEFT_BR]->add_child(scenes_dock);
+ dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scenes_dock);
//prop_pallete->add_child(scenes_dock);
scenes_dock->connect("open",this,"open_request");
scenes_dock->connect("instance",this,"_instance_request");