diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index 7473db6d6..bb7c94135 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -320,6 +320,11 @@ void Editor::Initialize() //infoDisplay.heap_allocation_counter = true; //infoDisplay.vram_usage = true; + // Font icon is from #include "FontAwesomeV6.h" + // We will not directly use this font style, but let the font renderer fall back on it + // when an icon character is not found in the default font. + wi::font::AddFontStyle("FontAwesomeV6", font_awesome_v6, font_awesome_v6_size); + if (!IsScriptReplacement()) // we only activate editor functionality if this exe does not have a script replacement { renderComponent.main = this; @@ -1400,14 +1405,6 @@ void EditorComponent::Load() } void EditorComponent::Start() { - // Start() is called after system initialization is complete, while Load() can be while initialization is still not finished - // Therefore we initialize things in Start which would need to be after system initializations: - - // Font icon is from #include "FontAwesomeV6.h" - // We will not directly use this font style, but let the font renderer fall back on it - // when an icon character is not found in the default font. - wi::font::AddFontStyle("FontAwesomeV6", font_awesome_v6, font_awesome_v6_size); - // Add other fonts that were loaded from fonts directory as fallback fonts: for (auto& x : font_datas) { diff --git a/Editor/ProjectCreatorWindow.cpp b/Editor/ProjectCreatorWindow.cpp index 24fe7591e..0d1664809 100644 --- a/Editor/ProjectCreatorWindow.cpp +++ b/Editor/ProjectCreatorWindow.cpp @@ -502,6 +502,8 @@ void ProjectCreatorWindow::Render(const wi::Canvas& canvas, wi::graphics::Comman { wi::gui::Window::Render(canvas, cmd); + if (!IsVisible()) + return; wi::gui::Window::ApplyScissor(canvas, scissorRect, cmd); wi::image::Params fx; fx.pos.x = cursorButton.GetPos().x + cursorButton.GetSize().x * hotspotX; diff --git a/WickedEngine/wiInitializer.cpp b/WickedEngine/wiInitializer.cpp index 4505da830..127b14f1e 100644 --- a/WickedEngine/wiInitializer.cpp +++ b/WickedEngine/wiInitializer.cpp @@ -128,7 +128,6 @@ namespace wi::initializer wi::jobsystem::Initialize(); wi::backlog::post(""); - wi::jobsystem::Execute(ctx, [](wi::jobsystem::JobArgs args) { wi::font::Initialize(); systems[INITIALIZED_SYSTEM_FONT].store(true); }); wi::jobsystem::Execute(ctx, [](wi::jobsystem::JobArgs args) { wi::image::Initialize(); systems[INITIALIZED_SYSTEM_IMAGE].store(true); }); wi::jobsystem::Execute(ctx, [](wi::jobsystem::JobArgs args) { wi::input::Initialize(); systems[INITIALIZED_SYSTEM_INPUT].store(true); }); wi::jobsystem::Execute(ctx, [](wi::jobsystem::JobArgs args) { wi::renderer::Initialize(); systems[INITIALIZED_SYSTEM_RENDERER].store(true); }); @@ -144,6 +143,7 @@ namespace wi::initializer // Initialize these immediately: wi::lua::Initialize(); systems[INITIALIZED_SYSTEM_LUA].store(true); wi::audio::Initialize(); systems[INITIALIZED_SYSTEM_AUDIO].store(true); + wi::font::Initialize(); systems[INITIALIZED_SYSTEM_FONT].store(true); std::thread([] { wi::jobsystem::Wait(ctx);