1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Make default/project theme wait for modules before initializing

This commit is contained in:
Yuri Sizov
2021-11-30 19:09:29 +03:00
parent 2d118bd8b8
commit d567ce3582
3 changed files with 18 additions and 4 deletions

View File

@@ -442,6 +442,9 @@ Error Main::test_setup() {
register_module_types();
register_driver_types();
// Theme needs modules to be initialized so that sub-resources can be loaded.
initialize_theme();
ERR_FAIL_COND_V(TextServerManager::get_singleton()->get_interface_count() == 0, ERR_CANT_CREATE);
TextServerManager::get_singleton()->set_primary_interface(TextServerManager::get_singleton()->get_interface(0));
@@ -1882,6 +1885,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
register_platform_apis();
register_module_types();
// Theme needs modules to be initialized so that sub-resources can be loaded.
initialize_theme();
GLOBAL_DEF("display/mouse_cursor/custom_image", String());
GLOBAL_DEF("display/mouse_cursor/custom_image_hotspot", Vector2());
GLOBAL_DEF("display/mouse_cursor/tooltip_position_offset", Point2(10, 10));