MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / CreateMainWindow

Method CreateMainWindow

Source/Editor/Editor.cpp:652–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650}
651
652Window* Editor::CreateMainWindow()
653{
654 PROFILE_MEM(Editor);
655 Window* window = Managed->GetMainWindow();
656
657#if PLATFORM_LINUX || (PLATFORM_MAC && PLATFORM_SDL)
658 // Set window icon
659 const String iconPath = Globals::BinariesFolder / TEXT("Logo.png");
660 if (FileSystem::FileExists(iconPath))
661 {
662 TextureData icon;
663 if (TextureTool::ImportTexture(iconPath, icon))
664 {
665 LOG(Warning, "Failed to load icon file.");
666 }
667 else
668 {
669 window->SetIcon(icon);
670 }
671 }
672 else
673 {
674 LOG(Warning, "Missing icon file.");
675 }
676#endif
677 return window;
678}
679
680bool Editor::Init()
681{

Callers

nothing calls this directly

Calls 3

ImportTextureClass · 0.50
GetMainWindowMethod · 0.45
SetIconMethod · 0.45

Tested by

no test coverage detected