diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/code_editor.cpp | 5 | ||||
-rw-r--r-- | editor/editor_help.cpp | 2 | ||||
-rw-r--r-- | editor/editor_node.cpp | 4 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 3 | ||||
-rw-r--r-- | editor/editor_visual_profiler.cpp | 8 | ||||
-rw-r--r-- | editor/import_dock.cpp | 64 | ||||
-rw-r--r-- | editor/import_dock.h | 1 | ||||
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/project_manager.cpp | 2 |
9 files changed, 49 insertions, 46 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index f3da1b59b2..e898bc54dd 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -517,6 +517,11 @@ void FindReplaceBar::_replace_text_entered(const String &p_text) { if (selection_only->is_pressed() && text_edit->is_selection_active()) { _replace_all(); _hide_bar(); + } else if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + _replace(); + search_prev(); + } else { + _replace(); } } diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 22a16ac65a..0ade4c5c80 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -50,7 +50,7 @@ void EditorHelp::_init_colors() { text_color = get_color("default_color", "RichTextLabel"); headline_color = get_color("headline_color", "EditorHelp"); base_type_color = title_color.linear_interpolate(text_color, 0.5); - comment_color = text_color * Color(1, 1, 1, 0.4); + comment_color = text_color * Color(1, 1, 1, 0.6); symbol_color = comment_color; value_color = text_color * Color(1, 1, 1, 0.6); qualifier_color = text_color * Color(1, 1, 1, 0.8); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f88b071515..56581d671a 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5823,7 +5823,7 @@ EditorNode::EditorNode() { EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true); EDITOR_DEF_RST("interface/inspector/capitalize_properties", true); EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "interface/inspector/default_float_step", PROPERTY_HINT_EXP_RANGE, "0,1,0")); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0,1,0")); EDITOR_DEF_RST("interface/inspector/disable_folding", false); EDITOR_DEF_RST("interface/inspector/auto_unfold_foreign_scenes", true); EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false); @@ -6406,6 +6406,8 @@ EditorNode::EditorNode() { video_driver->set_focus_mode(Control::FOCUS_NONE); video_driver->connect("item_selected", this, "_video_driver_selected"); video_driver->add_font_override("font", gui_base->get_font("bold", "EditorFonts")); + // TODO re-enable when GLES2 is ported + video_driver->set_disabled(true); right_menu_hb->add_child(video_driver); String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/quality/driver/driver_name"].hint_string; diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index f43aefc944..50e3408037 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -90,9 +90,6 @@ Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color, float Ref<ImageTexture> icon = memnew(ImageTexture); Ref<Image> img = memnew(Image); - // dumb gizmo check - bool is_gizmo = String(editor_icons_names[p_index]).begins_with("Gizmo"); - // Upsample icon generation only if the editor scale isn't an integer multiplier. // Generating upsampled icons is slower, and the benefit is hardly visible // with integer editor scales. diff --git a/editor/editor_visual_profiler.cpp b/editor/editor_visual_profiler.cpp index 3f3da7c4a5..1b68a89181 100644 --- a/editor/editor_visual_profiler.cpp +++ b/editor/editor_visual_profiler.cpp @@ -113,12 +113,6 @@ void EditorVisualProfiler::clear() { seeking = false; } -static String _get_percent_txt(float p_value, float p_total) { - if (p_total == 0) - p_total = 0.00001; - return String::num((p_value / p_total) * 100, 1) + "%"; -} - String EditorVisualProfiler::_get_time_as_text(float p_time) { int dmode = display_mode->get_selected(); @@ -126,7 +120,7 @@ String EditorVisualProfiler::_get_time_as_text(float p_time) { if (dmode == DISPLAY_FRAME_TIME) { return rtos(p_time) + "ms"; } else if (dmode == DISPLAY_FRAME_PERCENT) { - return String::num(p_time * 100 / graph_limit, 2) + "%"; //_get_percent_txt(p_time, m.frame_time); + return String::num(p_time * 100 / graph_limit, 2) + "%"; } return "err"; diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 20d47e8250..1eb453f4d0 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -49,7 +49,7 @@ public: values[p_name] = p_value; if (checking) { checked.insert(p_name); - _change_notify(String(p_name).utf8().get_data()); + _change_notify(); } return true; } @@ -159,24 +159,7 @@ void ImportDock::_update_options(const Ref<ConfigFile> &p_config) { } params->update(); - - preset->get_popup()->clear(); - - if (params->importer->get_preset_count() == 0) { - preset->get_popup()->add_item(TTR("Default")); - } else { - for (int i = 0; i < params->importer->get_preset_count(); i++) { - preset->get_popup()->add_item(params->importer->get_preset_name(i)); - } - } - - preset->get_popup()->add_separator(); - preset->get_popup()->add_item(vformat(TTR("Set as Default for '%s'"), params->importer->get_visible_name()), ITEM_SET_AS_DEFAULT); - if (ProjectSettings::get_singleton()->has_setting("importer_defaults/" + params->importer->get_importer_name())) { - preset->get_popup()->add_item(TTR("Load Default"), ITEM_LOAD_DEFAULT); - preset->get_popup()->add_separator(); - preset->get_popup()->add_item(vformat(TTR("Clear Default for '%s'"), params->importer->get_visible_name()), ITEM_CLEAR_DEFAULT); - } + _update_preset_menu(); } void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { @@ -276,6 +259,17 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { } } + _update_preset_menu(); + + params->paths = p_paths; + import->set_disabled(false); + import_as->set_disabled(false); + preset->set_disabled(false); + + imported->set_text(itos(p_paths.size()) + TTR(" Files")); +} + +void ImportDock::_update_preset_menu() { preset->get_popup()->clear(); if (params->importer->get_preset_count() == 0) { @@ -286,12 +280,13 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { } } - params->paths = p_paths; - import->set_disabled(false); - import_as->set_disabled(false); - preset->set_disabled(false); - - imported->set_text(itos(p_paths.size()) + TTR(" Files")); + preset->get_popup()->add_separator(); + preset->get_popup()->add_item(vformat(TTR("Set as Default for '%s'"), params->importer->get_visible_name()), ITEM_SET_AS_DEFAULT); + if (ProjectSettings::get_singleton()->has_setting("importer_defaults/" + params->importer->get_importer_name())) { + preset->get_popup()->add_item(TTR("Load Default"), ITEM_LOAD_DEFAULT); + preset->get_popup()->add_separator(); + preset->get_popup()->add_item(vformat(TTR("Clear Default for '%s'"), params->importer->get_visible_name()), ITEM_CLEAR_DEFAULT); + } } void ImportDock::_importer_selected(int i_idx) { @@ -326,7 +321,7 @@ void ImportDock::_preset_selected(int p_idx) { ProjectSettings::get_singleton()->set("importer_defaults/" + params->importer->get_importer_name(), d); ProjectSettings::get_singleton()->save(); - + _update_preset_menu(); } break; case ITEM_LOAD_DEFAULT: { @@ -336,17 +331,22 @@ void ImportDock::_preset_selected(int p_idx) { List<Variant> v; d.get_key_list(&v); + if (params->checking) { + params->checked.clear(); + } for (List<Variant>::Element *E = v.front(); E; E = E->next()) { params->values[E->get()] = d[E->get()]; + if (params->checking) { + params->checked.insert(E->get()); + } } params->update(); - } break; case ITEM_CLEAR_DEFAULT: { ProjectSettings::get_singleton()->set("importer_defaults/" + params->importer->get_importer_name(), Variant()); ProjectSettings::get_singleton()->save(); - + _update_preset_menu(); } break; default: { @@ -354,11 +354,15 @@ void ImportDock::_preset_selected(int p_idx) { params->importer->get_import_options(&options, p_idx); + if (params->checking) { + params->checked.clear(); + } for (List<ResourceImporter::ImportOption>::Element *E = options.front(); E; E = E->next()) { - params->values[E->get().option.name] = E->get().default_value; + if (params->checking) { + params->checked.insert(E->get().option.name); + } } - params->update(); } break; } diff --git a/editor/import_dock.h b/editor/import_dock.h index a4378fb60d..7a2e669620 100644 --- a/editor/import_dock.h +++ b/editor/import_dock.h @@ -62,6 +62,7 @@ class ImportDock : public VBoxContainer { void _preset_selected(int p_idx); void _importer_selected(int i_idx); void _update_options(const Ref<ConfigFile> &p_config = Ref<ConfigFile>()); + void _update_preset_menu(); void _property_toggled(const StringName &p_prop, bool p_checked); void _reimport_attempt(); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index ebd7b4edf6..d9bccc35f4 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -2179,7 +2179,7 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da _add_custom_node(arr[i]); j++; } - } else if (ClassDB::get_parent_class(type) == "Texture") { + } else if (ClassDB::get_parent_class(type) == "Texture2D") { saved_node_pos = p_point + Vector2(0, j * 210 * EDSCALE); saved_node_pos_dirty = true; _add_texture_node(arr[i]); @@ -2710,10 +2710,10 @@ VisualShaderEditor::VisualShaderEditor() { // TEXTURES - add_options.push_back(AddOption("CubeMap", "Textures", "Functions", "VisualShaderNodeCubeMap", TTR("Perform the cubic texture lookup."), -1, -1)); + add_options.push_back(AddOption("CubeMap", "Textures", "Functions", "VisualShaderNodeCubemap", TTR("Perform the cubic texture lookup."), -1, -1)); texture_node_option_idx = add_options.size(); add_options.push_back(AddOption("Texture2D", "Textures", "Functions", "VisualShaderNodeTexture", TTR("Perform the texture lookup."), -1, -1)); - add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubeMapUniform", TTR("Cubic texture uniform lookup."), -1, -1)); + add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubemapUniform", TTR("Cubic texture uniform lookup."), -1, -1)); add_options.push_back(AddOption("TextureUniform", "Textures", "Variables", "VisualShaderNodeTextureUniform", TTR("2D texture uniform lookup."), -1, -1)); add_options.push_back(AddOption("TextureUniformTriplanar", "Textures", "Variables", "VisualShaderNodeTextureUniformTriplanar", TTR("2D texture uniform lookup with triplanar."), -1, -1, VisualShader::TYPE_FRAGMENT | VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 0c22db075d..a1032130f8 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -885,7 +885,7 @@ public: rs_button->set_pressed(true); rvb->add_child(rs_button); l = memnew(Label); - l->set_text(TTR("- Higher visual quality\n- More accurate API, which produces very fast code\n- Some features not implemented yet — work in progress\n- Incompatible with older hardware\n- Not recommended for web and mobile games")); + l->set_text(TTR("- Higher visual quality\n- More accurate API, which produces very fast code\n- Some features not implemented yet - work in progress\n- Incompatible with older hardware\n- Not recommended for web and mobile games")); l->set_modulate(Color(1, 1, 1, 0.7)); rvb->add_child(l); |