diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 38e1e869c0f..b1b18eec537 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1634,10 +1634,10 @@ void CodeTextEditor::_set_show_warnings_panel(bool p_show) { emit_signal(SNAME("show_warnings_panel"), p_show); } -void CodeTextEditor::_toggle_scripts_pressed() { - ERR_FAIL_NULL(toggle_scripts_list); - toggle_scripts_list->set_visible(!toggle_scripts_list->is_visible()); - update_toggle_scripts_button(); +void CodeTextEditor::_toggle_files_pressed() { + ERR_FAIL_NULL(toggle_files_list); + toggle_files_list->set_visible(!toggle_files_list->is_visible()); + update_toggle_files_button(); } void CodeTextEditor::_error_pressed(const Ref &p_event) { @@ -1655,22 +1655,22 @@ void CodeTextEditor::_notification(int p_what) { } break; case NOTIFICATION_THEME_CHANGED: { - if (toggle_scripts_button->is_visible()) { - update_toggle_scripts_button(); + if (toggle_files_button->is_visible()) { + update_toggle_files_button(); } _update_text_editor_theme(); } break; case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: case NOTIFICATION_TRANSLATION_CHANGED: { - if (toggle_scripts_button->is_visible()) { - update_toggle_scripts_button(); + if (toggle_files_button->is_visible()) { + update_toggle_files_button(); } } break; case NOTIFICATION_VISIBILITY_CHANGED: { - if (toggle_scripts_button->is_visible()) { - update_toggle_scripts_button(); + if (toggle_files_button->is_visible()) { + update_toggle_files_button(); } set_process_input(is_visible_in_tree()); } break; @@ -1827,18 +1827,18 @@ void CodeTextEditor::set_code_complete_func(CodeTextEditorCodeCompleteFunc p_cod } void CodeTextEditor::set_toggle_list_control(Control *p_control) { - toggle_scripts_list = p_control; + toggle_files_list = p_control; } -void CodeTextEditor::show_toggle_scripts_button() { - toggle_scripts_button->show(); +void CodeTextEditor::show_toggle_files_button() { + toggle_files_button->show(); } -void CodeTextEditor::update_toggle_scripts_button() { - ERR_FAIL_NULL(toggle_scripts_list); - bool forward = toggle_scripts_list->is_visible() == is_layout_rtl(); - toggle_scripts_button->set_button_icon(get_editor_theme_icon(forward ? SNAME("Forward") : SNAME("Back"))); - toggle_scripts_button->set_tooltip_text(vformat("%s (%s)", TTR("Toggle Scripts Panel"), ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text())); +void CodeTextEditor::update_toggle_files_button() { + ERR_FAIL_NULL(toggle_files_list); + bool forward = toggle_files_list->is_visible() == is_layout_rtl(); + toggle_files_button->set_button_icon(get_editor_theme_icon(forward ? SNAME("Forward") : SNAME("Back"))); + toggle_files_button->set_tooltip_text(vformat("%s (%s)", TTR("Toggle Files Panel"), ED_GET_SHORTCUT("script_editor/toggle_files_panel")->get_as_text())); } CodeTextEditor::CodeTextEditor() { @@ -1875,13 +1875,13 @@ CodeTextEditor::CodeTextEditor() { error_line = 0; error_column = 0; - toggle_scripts_button = memnew(Button); - toggle_scripts_button->set_flat(true); - toggle_scripts_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER); - toggle_scripts_button->connect(SceneStringName(pressed), callable_mp(this, &CodeTextEditor::_toggle_scripts_pressed)); - toggle_scripts_button->set_accessibility_name(TTRC("Scripts")); - status_bar->add_child(toggle_scripts_button); - toggle_scripts_button->hide(); + toggle_files_button = memnew(Button); + toggle_files_button->set_flat(true); + toggle_files_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER); + toggle_files_button->connect(SceneStringName(pressed), callable_mp(this, &CodeTextEditor::_toggle_files_pressed)); + toggle_files_button->set_accessibility_name(TTRC("Scripts")); + status_bar->add_child(toggle_files_button); + toggle_files_button->hide(); // Error ScrollContainer *scroll = memnew(ScrollContainer); diff --git a/editor/code_editor.h b/editor/code_editor.h index d1c67086f9e..082dca7aabc 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -165,8 +165,8 @@ class CodeTextEditor : public VBoxContainer { FindReplaceBar *find_replace_bar = nullptr; HBoxContainer *status_bar = nullptr; - Button *toggle_scripts_button = nullptr; - Control *toggle_scripts_list = nullptr; + Button *toggle_files_button = nullptr; + Control *toggle_files_list = nullptr; Button *error_button = nullptr; Button *warning_button = nullptr; @@ -220,7 +220,7 @@ class CodeTextEditor : public VBoxContainer { void _zoom_popup_id_pressed(int p_idx); - void _toggle_scripts_pressed(); + void _toggle_files_pressed(); protected: virtual void _load_theme_settings() {} @@ -298,8 +298,8 @@ public: void validate_script(); void set_toggle_list_control(Control *p_control); - void show_toggle_scripts_button(); - void update_toggle_scripts_button(); + void show_toggle_files_button(); + void update_toggle_files_button(); CodeTextEditor(); }; diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index f1181044d10..3cd0bc68bf5 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -3197,9 +3197,9 @@ void EditorHelp::generate_doc(bool p_use_cache, bool p_use_script_cache) { } } -void EditorHelp::_toggle_scripts_pressed() { - ScriptEditor::get_singleton()->toggle_scripts_panel(); - update_toggle_scripts_button(); +void EditorHelp::_toggle_files_pressed() { + ScriptEditor::get_singleton()->toggle_files_panel(); + update_toggle_files_button(); } void EditorHelp::_notification(int p_what) { @@ -3233,13 +3233,13 @@ void EditorHelp::_notification(int p_what) { if (is_inside_tree()) { _class_desc_resized(true); } - update_toggle_scripts_button(); + update_toggle_files_button(); } break; case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: case NOTIFICATION_TRANSLATION_CHANGED: case NOTIFICATION_VISIBILITY_CHANGED: { - update_toggle_scripts_button(); + update_toggle_files_button(); } break; } } @@ -3308,13 +3308,13 @@ void EditorHelp::set_scroll(int p_scroll) { class_desc->get_v_scroll_bar()->set_value(p_scroll); } -void EditorHelp::update_toggle_scripts_button() { +void EditorHelp::update_toggle_files_button() { if (is_layout_rtl()) { - toggle_scripts_button->set_button_icon(get_editor_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Forward") : SNAME("Back"))); + toggle_files_button->set_button_icon(get_editor_theme_icon(ScriptEditor::get_singleton()->is_files_panel_toggled() ? SNAME("Forward") : SNAME("Back"))); } else { - toggle_scripts_button->set_button_icon(get_editor_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Back") : SNAME("Forward"))); + toggle_files_button->set_button_icon(get_editor_theme_icon(ScriptEditor::get_singleton()->is_files_panel_toggled() ? SNAME("Back") : SNAME("Forward"))); } - toggle_scripts_button->set_tooltip_text(vformat("%s (%s)", TTR("Toggle Scripts Panel"), ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text())); + toggle_files_button->set_tooltip_text(vformat("%s (%s)", TTR("Toggle Files Panel"), ED_GET_SHORTCUT("script_editor/toggle_files_panel")->get_as_text())); } void EditorHelp::_bind_methods() { @@ -3357,11 +3357,11 @@ EditorHelp::EditorHelp() { status_bar->set_h_size_flags(SIZE_EXPAND_FILL); status_bar->set_custom_minimum_size(Size2(0, 24 * EDSCALE)); - toggle_scripts_button = memnew(Button); - toggle_scripts_button->set_accessibility_name(TTRC("Scripts")); - toggle_scripts_button->set_flat(true); - toggle_scripts_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelp::_toggle_scripts_pressed)); - status_bar->add_child(toggle_scripts_button); + toggle_files_button = memnew(Button); + toggle_files_button->set_accessibility_name(TTRC("Scripts")); + toggle_files_button->set_flat(true); + toggle_files_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelp::_toggle_files_pressed)); + status_bar->add_child(toggle_files_button); class_desc->set_selection_enabled(true); class_desc->set_context_menu_enabled(true); diff --git a/editor/editor_help.h b/editor/editor_help.h index 29084f72d89..a43acd8f47c 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -118,7 +118,7 @@ class EditorHelp : public VBoxContainer { LineEdit *search = nullptr; FindBar *find_bar = nullptr; HBoxContainer *status_bar = nullptr; - Button *toggle_scripts_button = nullptr; + Button *toggle_files_button = nullptr; String base_path; @@ -185,7 +185,7 @@ class EditorHelp : public VBoxContainer { void _request_help(const String &p_string); void _search(bool p_search_previous = false); - void _toggle_scripts_pressed(); + void _toggle_files_pressed(); inline static int doc_generation_count = 0; inline static String doc_version_hash; @@ -264,7 +264,7 @@ public: int get_scroll() const; void set_scroll(int p_scroll); - void update_toggle_scripts_button(); + void update_toggle_files_button(); static void init_gdext_pointers(); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index ad0905ac888..2ed7d0a1741 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1304,13 +1304,13 @@ TypedArray