MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _theme_option

Method _theme_option

editor/script/script_editor_plugin.cpp:1704–1723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1702}
1703
1704void 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
1725void ScriptEditor::_show_save_theme_as_dialog() {
1726 file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);

Callers

nothing calls this directly

Calls 8

mark_setting_changedMethod · 0.80
notify_changesMethod · 0.80
set_file_modeMethod · 0.45
set_accessMethod · 0.45
clear_filtersMethod · 0.45
add_filterMethod · 0.45
set_titleMethod · 0.45
popup_file_dialogMethod · 0.45

Tested by

no test coverage detected