diff options
author | Clay John <claynjohn@gmail.com> | 2022-08-18 14:38:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 14:38:38 -0600 |
commit | 1811a4d78491c970f0d1c4ba424f681bd3bfa21c (patch) | |
tree | a03ffae1bdb8303df1ad3f6104d3ef3c29cb0803 /main | |
parent | 0a313b4b8350f697b67c0d91c9f689942f0b5bb7 (diff) | |
parent | f6417a4ead03025179675b74ccacd2deb16d9700 (diff) |
Merge pull request #64356 from Calinou/editor-hide-dummy-text-driver
Hide Dummy text driver in the Project Settings as it makes editor unusable
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp index 965fcc66c6..9e7d9e6f5a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1997,10 +1997,16 @@ Error Main::setup2(Thread::ID p_main_tid_override) { GLOBAL_DEF_RST("internationalization/rendering/text_driver", ""); String text_driver_options; for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) { - if (i > 0) { + const String driver_name = TextServerManager::get_singleton()->get_interface(i)->get_name(); + if (driver_name == "Dummy") { + // Dummy text driver cannot draw any text, making the editor unusable if selected. + continue; + } + if (!text_driver_options.is_empty() && text_driver_options.find(",") == -1) { + // Not the first option; add a comma before it as a separator for the property hint. text_driver_options += ","; } - text_driver_options += TextServerManager::get_singleton()->get_interface(i)->get_name(); + text_driver_options += driver_name; } ProjectSettings::get_singleton()->set_custom_property_info("internationalization/rendering/text_driver", PropertyInfo(Variant::STRING, "internationalization/rendering/text_driver", PROPERTY_HINT_ENUM, text_driver_options)); |