| 1702 | } |
| 1703 | |
| 1704 | void ScriptEditor::_theme_option(int p_option) { |
| 1705 | switch (p_option) { |
| 1706 | case THEME_IMPORT: { |
| 1707 | file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE); |
| 1708 | file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM); |
| 1709 | file_dialog_option = THEME_IMPORT; |
| 1710 | file_dialog->clear_filters(); |
| 1711 | file_dialog->add_filter("*.tet"); |
| 1712 | file_dialog->set_title(TTRC("Import Theme")); |
| 1713 | file_dialog->popup_file_dialog(); |
| 1714 | } break; |
| 1715 | case THEME_RELOAD: { |
| 1716 | EditorSettings::get_singleton()->mark_setting_changed("text_editor/theme/color_theme"); |
| 1717 | EditorSettings::get_singleton()->notify_changes(); |
| 1718 | } break; |
| 1719 | case THEME_SAVE_AS: { |
| 1720 | ScriptEditor::_show_save_theme_as_dialog(); |
| 1721 | } break; |
| 1722 | } |
| 1723 | } |
| 1724 | |
| 1725 | void ScriptEditor::_show_save_theme_as_dialog() { |
| 1726 | file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE); |
nothing calls this directly
no test coverage detected