summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp1
-rw-r--r--editor/editor_export.cpp36
-rw-r--r--editor/editor_node.cpp51
-rw-r--r--editor/editor_run.cpp42
-rw-r--r--editor/editor_settings.cpp8
-rw-r--r--editor/editor_themes.cpp8
-rw-r--r--editor/project_manager.cpp6
-rw-r--r--editor/run_settings_dialog.cpp2
8 files changed, 52 insertions, 102 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index c33340ce69..a809f4b15e 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1088,6 +1088,7 @@ void CodeTextEditor::update_editor_settings() {
text_editor->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_breakpoint_gutter"));
text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret"));
text_editor->set_smooth_scroll_enabled(EditorSettings::get_singleton()->get("text_editor/open_scripts/smooth_scrolling"));
+ text_editor->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/open_scripts/v_scroll_speed"));
}
void CodeTextEditor::set_error(const String &p_error) {
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index fe1dfa281c..d8d3554612 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -229,17 +229,17 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
if (p_flags & DEBUG_FLAG_DUMB_CLIENT) {
int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
- r_flags.push_back("-rfs");
+ r_flags.push_back("--remote-fs");
r_flags.push_back(host + ":" + itos(port));
if (passwd != "") {
- r_flags.push_back("-rfs_pass");
+ r_flags.push_back("--remote-fs-password");
r_flags.push_back(passwd);
}
}
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) {
- r_flags.push_back("-rdebug");
+ r_flags.push_back("--remote-debug");
r_flags.push_back(host + ":" + String::num(remote_port));
@@ -248,7 +248,7 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
if (breakpoints.size()) {
- r_flags.push_back("-bp");
+ r_flags.push_back("--breakpoints");
String bpoints;
for (const List<String>::Element *E = breakpoints.front(); E; E = E->next()) {
@@ -263,12 +263,12 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) {
- r_flags.push_back("-debugcol");
+ r_flags.push_back("--debug-collisions");
}
if (p_flags & DEBUG_FLAG_VIEW_NAVIGATION) {
- r_flags.push_back("-debugnav");
+ r_flags.push_back("--debug-navigation");
}
}
@@ -714,17 +714,17 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
if (p_flags & DEBUG_FLAG_DUMB_CLIENT) {
int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
- r_flags.push_back("-rfs");
+ r_flags.push_back("--remote-fs");
r_flags.push_back(host + ":" + itos(port));
if (passwd != "") {
- r_flags.push_back("-rfs_pass");
+ r_flags.push_back("--remote-fs-password");
r_flags.push_back(passwd);
}
}
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) {
- r_flags.push_back("-rdebug");
+ r_flags.push_back("--remote-debug");
r_flags.push_back(host + ":" + String::num(remote_port));
@@ -733,7 +733,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
if (breakpoints.size()) {
- r_flags.push_back("-bp");
+ r_flags.push_back("--breakpoints");
String bpoints;
for (const List<String>::Element *E = breakpoints.front(); E; E = E->next()) {
@@ -748,12 +748,12 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) {
- r_flags.push_back("-debugcol");
+ r_flags.push_back("--debug-collisions");
}
if (p_flags & DEBUG_FLAG_VIEW_NAVIGATION) {
- r_flags.push_back("-debugnav");
+ r_flags.push_back("--debug-navigation");
}
}
EditorExportPlatform::EditorExportPlatform() {
@@ -2231,17 +2231,17 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
if (p_flags&EXPORT_DUMB_CLIENT) {
int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
- r_flags.push_back("-rfs");
+ r_flags.push_back("--remote-fs");
r_flags.push_back(host+":"+itos(port));
if (passwd!="") {
- r_flags.push_back("-rfs_pass");
+ r_flags.push_back("--remote-fs-password");
r_flags.push_back(passwd);
}
}
if (p_flags&EXPORT_REMOTE_DEBUG) {
- r_flags.push_back("-rdebug");
+ r_flags.push_back("--remote-debug");
r_flags.push_back(host+":"+String::num(remote_port));
@@ -2251,7 +2251,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
if (breakpoints.size()) {
- r_flags.push_back("-bp");
+ r_flags.push_back("--breakpoints");
String bpoints;
for(const List<String>::Element *E=breakpoints.front();E;E=E->next()) {
@@ -2267,12 +2267,12 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
if (p_flags&EXPORT_VIEW_COLLISONS) {
- r_flags.push_back("-debugcol");
+ r_flags.push_back("--debug-collisions");
}
if (p_flags&EXPORT_VIEW_NAVIGATION) {
- r_flags.push_back("-debugnav");
+ r_flags.push_back("--debug-navigation");
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b8d9d23f49..86964b3ca0 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1851,47 +1851,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
_playing_edited = p_current;
}
-void EditorNode::_cleanup_scene() {
-
-#if 0
- Node *scene = editor_data.get_edited_scene_root();
- editor_selection->clear();
- editor_data.clear_editor_states();
- editor_history.clear();
- _hide_top_editors();
- animation_editor->cleanup();
- property_editor->edit(NULL);
- resources_dock->cleanup();
- scene_import_metadata.unref();
- //set_edited_scene(NULL);
- if (scene) {
- if (scene->get_filename()!="") {
- previous_scenes.push_back(scene->get_filename());
- }
-
- memdelete(scene);
- }
- editor_data.get_undo_redo().clear_history();
- saved_version=editor_data.get_undo_redo().get_version();
- run_settings_dialog->set_run_mode(0);
- run_settings_dialog->set_custom_arguments("-l $scene");
-
- List<Ref<Resource> > cached;
- ResourceCache::get_cached_resources(&cached);
-
- for(List<Ref<Resource> >::Element *E=cached.front();E;E=E->next()) {
-
- String path = E->get()->get_path();
- if (path.is_resource_file()) {
- ERR_PRINT(("Stray resource not cleaned:"+path).utf8().get_data());
- }
-
- }
-
- _update_title();
-#endif
-}
-
void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
//print_line("option "+itos(p_option)+" confirm "+itos(p_confirmed));
@@ -1915,8 +1874,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
_scene_tab_changed(idx);
editor_data.clear_editor_states();
- //_cleanup_scene();
-
} break;
case FILE_NEW_INHERITED_SCENE:
case FILE_OPEN_SCENE: {
@@ -2737,8 +2694,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
import_reload_fn = scene->get_filename();
_save_scene(import_reload_fn);
- _cleanup_scene();
-
}
@@ -2824,9 +2779,9 @@ void EditorNode::_discard_changes(const String &p_str) {
String exec = OS::get_singleton()->get_executable_path();
List<String> args;
- args.push_back("-path");
+ args.push_back("--path");
args.push_back(exec.get_base_dir());
- args.push_back("-pm");
+ args.push_back("--project-manager");
OS::ProcessID pid = 0;
Error err = OS::get_singleton()->execute(exec, args, false, &pid);
@@ -3328,8 +3283,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
_scene_tab_changed(idx);
}
- //_cleanup_scene(); // i'm sorry but this MUST happen to avoid modified resources to not be reloaded.
-
dependency_errors.clear();
Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true);
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index e1ef20255b..9a0731eb55 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -45,28 +45,27 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
if (resource_path != "") {
- args.push_back("-path");
+ args.push_back("--path");
args.push_back(resource_path.replace(" ", "%20"));
}
if (true) {
- args.push_back("-rdebug");
+ args.push_back("--remote-debug");
args.push_back(remote_host + ":" + String::num(remote_port));
}
- args.push_back("-epid");
- args.push_back(String::num(OS::get_singleton()->get_process_id()));
+ args.push_back("--allow_focus_steal_pid");
+ args.push_back(itos(OS::get_singleton()->get_process_id()));
if (debug_collisions) {
- args.push_back("-debugcol");
+ args.push_back("--debug-collisions");
}
if (debug_navigation) {
- args.push_back("-debugnav");
+ args.push_back("--debug-navigation");
}
int screen = EditorSettings::get_singleton()->get("run/window_placement/screen");
-
if (screen == 0) {
screen = OS::get_singleton()->get_current_screen();
} else {
@@ -78,7 +77,6 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
screen_rect.size = OS::get_singleton()->get_screen_size(screen);
Size2 desired_size;
-
desired_size.x = ProjectSettings::get_singleton()->get("display/window/size/width");
desired_size.y = ProjectSettings::get_singleton()->get("display/window/size/height");
@@ -95,39 +93,39 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
switch (window_placement) {
case 0: { // top left
- args.push_back("-p");
- args.push_back(itos(screen_rect.position.x) + "x" + itos(screen_rect.position.y));
+ args.push_back("--position");
+ args.push_back(itos(screen_rect.position.x) + "," + itos(screen_rect.position.y));
} break;
case 1: { // centered
Vector2 pos = screen_rect.position + ((screen_rect.size - desired_size) / 2).floor();
- args.push_back("-p");
- args.push_back(itos(pos.x) + "x" + itos(pos.y));
+ args.push_back("--position");
+ args.push_back(itos(pos.x) + "," + itos(pos.y));
} break;
case 2: { // custom pos
Vector2 pos = EditorSettings::get_singleton()->get("run/window_placement/rect_custom_position");
pos += screen_rect.position;
- args.push_back("-p");
- args.push_back(itos(pos.x) + "x" + itos(pos.y));
+ args.push_back("--position");
+ args.push_back(itos(pos.x) + "," + itos(pos.y));
} break;
case 3: { // force maximized
Vector2 pos = screen_rect.position;
- args.push_back("-p");
- args.push_back(itos(pos.x) + "x" + itos(pos.y));
- args.push_back("-mx");
+ args.push_back("--position");
+ args.push_back(itos(pos.x) + "," + itos(pos.y));
+ args.push_back("--maximized");
} break;
case 4: { // force fullscreen
Vector2 pos = screen_rect.position;
- args.push_back("-p");
- args.push_back(itos(pos.x) + "x" + itos(pos.y));
- args.push_back("-f");
+ args.push_back("--position");
+ args.push_back(itos(pos.x) + "," + itos(pos.y));
+ args.push_back("--fullscreen");
} break;
}
if (p_breakpoints.size()) {
- args.push_back("-bp");
+ args.push_back("--breakpoints");
String bpoints;
for (const List<String>::Element *E = p_breakpoints.front(); E; E = E->next()) {
@@ -152,7 +150,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
String exec = OS::get_singleton()->get_executable_path();
- printf("running: %ls", exec.c_str());
+ printf("Running: %ls", exec.c_str());
for (List<String>::Element *E = args.front(); E; E = E->next()) {
printf(" %ls", E->get().c_str());
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 843e5d0748..5c8e166730 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -616,6 +616,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["text_editor/line_numbers/line_length_guideline_column"] = PropertyInfo(Variant::INT, "text_editor/line_numbers/line_length_guideline_column", PROPERTY_HINT_RANGE, "20, 160, 10");
set("text_editor/open_scripts/smooth_scrolling", true);
+ set("text_editor/open_scripts/v_scroll_speed", 80);
set("text_editor/open_scripts/show_members_overview", true);
set("text_editor/files/trim_trailing_whitespace_on_save", false);
@@ -664,7 +665,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("editors/3d/emulate_3_button_mouse", false);
set("editors/3d/warped_mouse_panning", true);
- set("editors/3d/orbit_sensitivity", 0.7);
+ set("editors/3d/orbit_sensitivity", 0.4);
set("editors/3d/freelook_base_speed", 1);
@@ -724,11 +725,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("filesystem/import/pvrtc_texture_tool", "");
#ifdef WINDOWS_ENABLED
- hints["filesystem/import/pvrtc_texture_tool"] = PropertyInfo(Variant::STRING, "import/pvrtc_texture_tool", PROPERTY_HINT_GLOBAL_FILE, "*.exe");
+ hints["filesystem/import/pvrtc_texture_tool"] = PropertyInfo(Variant::STRING, "filesystem/import/pvrtc_texture_tool", PROPERTY_HINT_GLOBAL_FILE, "*.exe");
#else
- hints["import/pvrtc_texture_tool"] = PropertyInfo(Variant::STRING, "import/pvrtc_texture_tool", PROPERTY_HINT_GLOBAL_FILE, "");
+ hints["filesystem/import/pvrtc_texture_tool"] = PropertyInfo(Variant::STRING, "filesystem/import/pvrtc_texture_tool", PROPERTY_HINT_GLOBAL_FILE, "");
#endif
- // TODO: Rename to "filesystem/import/pvrtc_fast_conversion" to match other names?
set("filesystem/import/pvrtc_fast_conversion", false);
set("run/auto_save/save_before_running", true);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index d1f085f4b9..9f6416f4e6 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -559,19 +559,19 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> graphsb = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
graphsb->set_border_width_all(border_width);
graphsb->set_border_color_all(Color(1, 1, 1, 0.6));
- graphsb = add_additional_border(graphsb, 0, -22, 0, 0);
+ graphsb->set_border_width(MARGIN_TOP, 22 * EDSCALE + border_width);
Ref<StyleBoxFlat> graphsbselected = make_flat_stylebox(Color(0, 0, 0, 0.4), 16, 24, 16, 5);
graphsbselected->set_border_width_all(border_width);
graphsbselected->set_border_color_all(Color(1, 1, 1, 0.9));
- graphsbselected = add_additional_border(graphsbselected, 0, -22, 0, 0);
+ graphsbselected->set_border_width(MARGIN_TOP, 22 * EDSCALE + border_width);
Ref<StyleBoxFlat> graphsbcomment = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
graphsbcomment->set_border_width_all(border_width);
graphsbcomment->set_border_color_all(Color(1, 1, 1, 0.6));
- graphsbcomment = add_additional_border(graphsbcomment, 0, -22, 0, 0);
+ graphsbcomment->set_border_width(MARGIN_TOP, 22 * EDSCALE + border_width);
Ref<StyleBoxFlat> graphsbcommentselected = make_flat_stylebox(Color(0, 0, 0, 0.4), 16, 24, 16, 5);
graphsbcommentselected->set_border_width_all(border_width);
graphsbcommentselected->set_border_color_all(Color(1, 1, 1, 0.9));
- graphsbcommentselected = add_additional_border(graphsbcommentselected, 0, -22, 0, 0);
+ graphsbcommentselected->set_border_width(MARGIN_TOP, 22 * EDSCALE + border_width);
theme->set_stylebox("frame", "GraphNode", graphsb);
theme->set_stylebox("selectedframe", "GraphNode", graphsbselected);
theme->set_stylebox("comment", "GraphNode", graphsbcomment);
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 4c46879887..6ace79df27 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -929,10 +929,10 @@ void ProjectManager::_open_project_confirm() {
List<String> args;
- args.push_back("-path");
+ args.push_back("--path");
args.push_back(path);
- args.push_back("-editor");
+ args.push_back("--editor");
String exec = OS::get_singleton()->get_executable_path();
@@ -982,7 +982,7 @@ void ProjectManager::_run_project_confirm() {
List<String> args;
- args.push_back("-path");
+ args.push_back("--path");
args.push_back(path);
String exec = OS::get_singleton()->get_executable_path();
diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp
index 4548ae0939..dfb152d40b 100644
--- a/editor/run_settings_dialog.cpp
+++ b/editor/run_settings_dialog.cpp
@@ -88,7 +88,5 @@ RunSettingsDialog::RunSettingsDialog() {
get_ok()->set_text(TTR("Close"));
//get_cancel()->set_text("Close");
- arguments->set_text("-l $scene");
-
set_title(TTR("Scene Run Settings"));
}