summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_settings.cpp9
-rw-r--r--editor/editor_themes.cpp6
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.cpp6
-rw-r--r--editor/plugins/script_text_editor.cpp9
-rw-r--r--editor/plugins/text_editor.cpp9
-rw-r--r--editor/project_converter_3_to_4.cpp10
-rw-r--r--editor/renames_map_3_to_4.cpp2
7 files changed, 39 insertions, 12 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index b4f5eeda84..41d175fcd1 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -450,7 +450,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Theme
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "interface/theme/preset", "Default", "Default,Breeze Dark,Godot 2,Gray,Light,Solarized (Dark),Solarized (Light),Black (OLED),Custom")
- EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/theme/enable_touchscreen_touch_area", DisplayServer::get_singleton()->is_touchscreen_available(), "")
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/theme/icon_and_font_color", 0, "Auto,Dark,Light")
EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/base_color", Color(0.2, 0.23, 0.31), "")
EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/accent_color", Color(0.41, 0.61, 0.91), "")
@@ -463,6 +462,14 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/additional_spacing", 0.0, "0,5,0.1")
EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/theme/custom_theme", "", "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
+ // Touchscreen
+ bool has_touchscreen_ui = DisplayServer::get_singleton()->is_touchscreen_available();
+ EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/increase_scrollbar_touch_area", has_touchscreen_ui, "")
+ EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_long_press_as_right_click", has_touchscreen_ui, "")
+ set_restart_if_changed("interface/touchscreen/enable_long_press_as_right_click", true);
+ EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_pan_and_scale_gestures", has_touchscreen_ui, "")
+ set_restart_if_changed("interface/touchscreen/enable_pan_and_scale_gestures", true);
+
// Scene tabs
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/scene_tabs/display_close_button", 1, "Never,If Tab Active,Always"); // TabBar::CloseButtonDisplayPolicy
_initial_set("interface/scene_tabs/show_thumbnail_on_hover", true);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 304a7acff1..2ab15c1c2c 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -394,7 +394,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Color accent_color = EDITOR_GET("interface/theme/accent_color");
Color base_color = EDITOR_GET("interface/theme/base_color");
float contrast = EDITOR_GET("interface/theme/contrast");
- bool enable_touchscreen_touch_area = EDITOR_GET("interface/theme/enable_touchscreen_touch_area");
+ bool increase_scrollbar_touch_area = EDITOR_GET("interface/touchscreen/increase_scrollbar_touch_area");
bool draw_extra_borders = EDITOR_GET("interface/theme/draw_extra_borders");
float icon_saturation = EDITOR_GET("interface/theme/icon_saturation");
float relationship_line_opacity = EDITOR_GET("interface/theme/relationship_line_opacity");
@@ -1526,7 +1526,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// HScrollBar
Ref<Texture2D> empty_icon = memnew(ImageTexture);
- if (enable_touchscreen_touch_area) {
+ if (increase_scrollbar_touch_area) {
theme->set_stylebox("scroll", "HScrollBar", make_line_stylebox(separator_color, 50));
} else {
theme->set_stylebox("scroll", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 1, 1, 1, 1));
@@ -1544,7 +1544,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("decrement_pressed", "HScrollBar", empty_icon);
// VScrollBar
- if (enable_touchscreen_touch_area) {
+ if (increase_scrollbar_touch_area) {
theme->set_stylebox("scroll", "VScrollBar", make_line_stylebox(separator_color, 50, 1, 1, true));
} else {
theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 1, 1, 1, 1));
diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp
index 9defb4de9b..f4d97a5427 100644
--- a/editor/plugins/polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/polygon_3d_editor_plugin.cpp
@@ -506,7 +506,11 @@ void Polygon3DEditor::edit(Node *p_node) {
wip.clear();
wip_active = false;
edited_point = -1;
- p_node->add_child(imgeom);
+ if (imgeom->get_parent()) {
+ imgeom->reparent(p_node, false);
+ } else {
+ p_node->add_child(imgeom);
+ }
_polygon_draw();
set_process(true);
prev_depth = -1;
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 5e70a407dd..c1a5283662 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1225,8 +1225,13 @@ void ScriptTextEditor::_edit_option(int p_op) {
code_editor->duplicate_selection();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
- for (int caret_idx = 0; caret_idx < tx->get_caret_count(); caret_idx++) {
- tx->toggle_foldable_line(tx->get_caret_line(caret_idx));
+ int previous_line = -1;
+ for (int caret_idx : tx->get_caret_index_edit_order()) {
+ int line_idx = tx->get_caret_line(caret_idx);
+ if (line_idx != previous_line) {
+ tx->toggle_foldable_line(line_idx);
+ previous_line = line_idx;
+ }
}
tx->queue_redraw();
} break;
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index ceb170d7d8..9c0d76a6d3 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -397,8 +397,13 @@ void TextEditor::_edit_option(int p_op) {
code_editor->duplicate_selection();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
- for (int caret_idx = 0; caret_idx < tx->get_caret_count(); caret_idx++) {
- tx->toggle_foldable_line(tx->get_caret_line(caret_idx));
+ int previous_line = -1;
+ for (int caret_idx : tx->get_caret_index_edit_order()) {
+ int line_idx = tx->get_caret_line(caret_idx);
+ if (line_idx != previous_line) {
+ tx->toggle_foldable_line(line_idx);
+ previous_line = line_idx;
+ }
}
tx->queue_redraw();
} break;
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp
index d1f3c3902a..0e7476d045 100644
--- a/editor/project_converter_3_to_4.cpp
+++ b/editor/project_converter_3_to_4.cpp
@@ -410,6 +410,12 @@ bool ProjectConverter3To4::convert() {
rename_common(RenamesMap3To4::input_map_renames, reg_container.input_map_regexes, lines);
} else if (file_name.ends_with(".csproj")) {
// TODO
+ } else if (file_name.ends_with(".import")) {
+ for (int x = 0; x < lines.size(); x++) {
+ if (lines[x].contains("nodes/root_type=\"Spatial\"")) {
+ lines.set(x, "nodes/root_type=\"Node3D\"");
+ }
+ }
} else {
ERR_PRINT(file_name + " is not supported!");
continue;
@@ -636,7 +642,7 @@ Vector<String> ProjectConverter3To4::check_for_files() {
String file_name = dir->_get_next();
while (file_name != "") {
- if (file_name == ".git" || file_name == ".import" || file_name == ".godot") {
+ if (file_name == ".git" || file_name == ".godot") {
file_name = dir->_get_next();
continue;
}
@@ -644,7 +650,7 @@ Vector<String> ProjectConverter3To4::check_for_files() {
directories_to_check.append(current_dir.path_join(file_name) + "/");
} else {
bool proper_extension = false;
- if (file_name.ends_with(".gd") || file_name.ends_with(".shader") || file_name.ends_with(".gdshader") || file_name.ends_with(".tscn") || file_name.ends_with(".tres") || file_name.ends_with(".godot") || file_name.ends_with(".cs") || file_name.ends_with(".csproj"))
+ if (file_name.ends_with(".gd") || file_name.ends_with(".shader") || file_name.ends_with(".gdshader") || file_name.ends_with(".tscn") || file_name.ends_with(".tres") || file_name.ends_with(".godot") || file_name.ends_with(".cs") || file_name.ends_with(".csproj") || file_name.ends_with(".import"))
proper_extension = true;
if (proper_extension) {
diff --git a/editor/renames_map_3_to_4.cpp b/editor/renames_map_3_to_4.cpp
index 277df4e66c..d7cac9a2b9 100644
--- a/editor/renames_map_3_to_4.cpp
+++ b/editor/renames_map_3_to_4.cpp
@@ -1174,7 +1174,7 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = {
{ "unit_db", "volume_db" }, // AudioStreamPlayer3D
{ "unit_offset", "progress_ratio" }, // PathFollow2D, PathFollow3D
{ "vseparation", "v_separation" }, // Theme
- { "frames", "sprite_frames" }, // AnimatedSprite2D, AnimatedSprite3D
+ // { "frames", "sprite_frames" }, // AnimatedSprite2D, AnimatedSprite3D -- GH-73696
{ nullptr, nullptr },
};