mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Unify Scripts Panel naming for the script and shader editors
Both use the same shortcut and action, so it makes sense to call it a Files panel as opposed to a Scripts panel.
This commit is contained in:
parent
4248411baf
commit
e8eeccebcb
15 changed files with 97 additions and 97 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue