diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index a2c9b9c8c1..2820e0e45a 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -962,6 +962,9 @@ The preferred monitor to display the project manager. + + If [code]true[/code], a renderer selector that can be used to change the [member ProjectSettings.rendering/renderer/rendering_method] project setting will be shown in the top right of the main editor window. + If enabled, displays an icon in the top-right corner of the editor that spins when the editor redraws a frame. This can be used to diagnose situations where the engine is constantly redrawing, which should be avoided as this increases CPU and GPU utilization for no good reason. To further troubleshoot these situations, start the editor with the [code]--debug-canvas-item-redraw[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. Consider enabling this if you are developing editor plugins to ensure they only make the editor redraw when required. diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2a0f83be3a..2feec76d4b 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1155,6 +1155,7 @@ void EditorNode::_notification(int p_what) { if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/appearance")) { _update_update_spinner(); _update_main_menu_type(); + renderer->set_visible(EDITOR_GET("interface/editor/appearance/show_renderer_selector")); } if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/display")) { _update_vsync_mode(); @@ -9041,7 +9042,6 @@ EditorNode::EditorNode() { title_bar->add_child(right_menu_hb); renderer = memnew(OptionButton); - renderer->set_visible(true); renderer->set_flat(true); renderer->set_theme_type_variation("TopBarOptionButton"); renderer->set_fit_to_longest_item(false); @@ -9087,6 +9087,8 @@ EditorNode::EditorNode() { } _update_renderer_color(); + renderer->set_visible(EDITOR_GET("interface/editor/appearance/show_renderer_selector")); + progress_hb = memnew(BackgroundProgress); layout_dialog = memnew(EditorLayoutsDialog); diff --git a/editor/settings/editor_settings.cpp b/editor/settings/editor_settings.cpp index 58103e5d7f..8d471f1eec 100644 --- a/editor/settings/editor_settings.cpp +++ b/editor/settings/editor_settings.cpp @@ -566,6 +566,8 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { #endif EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/appearance/collapse_main_menu", is_android_editor, "") + EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/appearance/show_renderer_selector", false, "") + _initial_set("interface/editors/derive_script_globals_by_name", true); _initial_set("docks/scene_tree/ask_before_revoking_unique_name", true);