put font initializer on main thread so init text can be immediately rendered and fonts added more easily
This commit is contained in:
+5
-8
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user