|
@@ -1304,13 +1304,13 @@ TypedArray<Script> ScriptEditor::_get_open_scripts() const {
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-bool ScriptEditor::toggle_scripts_panel() {
|
|
|
|
|
|
+bool ScriptEditor::toggle_files_panel() {
|
|
list_split->set_visible(!list_split->is_visible());
|
|
list_split->set_visible(!list_split->is_visible());
|
|
- EditorSettings::get_singleton()->set_project_metadata("scripts_panel", "show_scripts_panel", list_split->is_visible());
|
|
|
|
|
|
+ EditorSettings::get_singleton()->set_project_metadata("files_panel", "show_files_panel", list_split->is_visible());
|
|
return list_split->is_visible();
|
|
return list_split->is_visible();
|
|
}
|
|
}
|
|
|
|
|
|
-bool ScriptEditor::is_scripts_panel_toggled() {
|
|
|
|
|
|
+bool ScriptEditor::is_files_panel_toggled() {
|
|
return list_split->is_visible();
|
|
return list_split->is_visible();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1438,15 +1438,15 @@ void ScriptEditor::_menu_option(int p_option) {
|
|
_sort_list_on_update = true;
|
|
_sort_list_on_update = true;
|
|
_update_script_names();
|
|
_update_script_names();
|
|
} break;
|
|
} break;
|
|
- case TOGGLE_SCRIPTS_PANEL: {
|
|
|
|
- toggle_scripts_panel();
|
|
|
|
|
|
+ case TOGGLE_FILES_PANEL: {
|
|
|
|
+ toggle_files_panel();
|
|
if (current) {
|
|
if (current) {
|
|
- current->update_toggle_scripts_button();
|
|
|
|
|
|
+ current->update_toggle_files_button();
|
|
} else {
|
|
} else {
|
|
Control *tab = tab_container->get_current_tab_control();
|
|
Control *tab = tab_container->get_current_tab_control();
|
|
EditorHelp *editor_help = Object::cast_to<EditorHelp>(tab);
|
|
EditorHelp *editor_help = Object::cast_to<EditorHelp>(tab);
|
|
if (editor_help) {
|
|
if (editor_help) {
|
|
- editor_help->update_toggle_scripts_button();
|
|
|
|
|
|
+ editor_help->update_toggle_files_button();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3476,7 +3476,7 @@ void ScriptEditor::_make_script_list_context_menu() {
|
|
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/window_move_up"), WINDOW_MOVE_UP);
|
|
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/window_move_up"), WINDOW_MOVE_UP);
|
|
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/window_move_down"), WINDOW_MOVE_DOWN);
|
|
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/window_move_down"), WINDOW_MOVE_DOWN);
|
|
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/window_sort"), WINDOW_SORT);
|
|
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/window_sort"), WINDOW_SORT);
|
|
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/toggle_scripts_panel"), TOGGLE_SCRIPTS_PANEL);
|
|
|
|
|
|
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/toggle_files_panel"), TOGGLE_FILES_PANEL);
|
|
|
|
|
|
context_menu->set_item_disabled(context_menu->get_item_index(CLOSE_ALL), tab_container->get_tab_count() <= 0);
|
|
context_menu->set_item_disabled(context_menu->get_item_index(CLOSE_ALL), tab_container->get_tab_count() <= 0);
|
|
context_menu->set_item_disabled(context_menu->get_item_index(CLOSE_OTHER_TABS), tab_container->get_tab_count() <= 1);
|
|
context_menu->set_item_disabled(context_menu->get_item_index(CLOSE_OTHER_TABS), tab_container->get_tab_count() <= 1);
|
|
@@ -4222,7 +4222,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|
overview_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
|
|
overview_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
|
|
|
|
|
|
list_split->add_child(overview_vbox);
|
|
list_split->add_child(overview_vbox);
|
|
- list_split->set_visible(EditorSettings::get_singleton()->get_project_metadata("scripts_panel", "show_scripts_panel", true));
|
|
|
|
|
|
+ list_split->set_visible(EditorSettings::get_singleton()->get_project_metadata("files_panel", "show_files_panel", true));
|
|
buttons_hbox = memnew(HBoxContainer);
|
|
buttons_hbox = memnew(HBoxContainer);
|
|
overview_vbox->add_child(buttons_hbox);
|
|
overview_vbox->add_child(buttons_hbox);
|
|
|
|
|
|
@@ -4355,7 +4355,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/run_file", TTRC("Run"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::X), FILE_RUN);
|
|
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/run_file", TTRC("Run"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::X), FILE_RUN);
|
|
|
|
|
|
file_menu->get_popup()->add_separator();
|
|
file_menu->get_popup()->add_separator();
|
|
- file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTRC("Toggle Scripts Panel"), KeyModifierMask::CMD_OR_CTRL | Key::BACKSLASH), TOGGLE_SCRIPTS_PANEL);
|
|
|
|
|
|
+ file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_files_panel", TTRC("Toggle Files Panel"), KeyModifierMask::CMD_OR_CTRL | Key::BACKSLASH), TOGGLE_FILES_PANEL);
|
|
file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option));
|
|
file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option));
|
|
file_menu->get_popup()->connect("about_to_popup", callable_mp(this, &ScriptEditor::_prepare_file_menu));
|
|
file_menu->get_popup()->connect("about_to_popup", callable_mp(this, &ScriptEditor::_prepare_file_menu));
|
|
file_menu->get_popup()->connect("popup_hide", callable_mp(this, &ScriptEditor::_file_menu_closed));
|
|
file_menu->get_popup()->connect("popup_hide", callable_mp(this, &ScriptEditor::_file_menu_closed));
|