MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / InitializeImGui

Function InitializeImGui

projects/uDesigner/source/main.cpp:2737–2765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2735 }
2736
2737 int InitializeImGui() {
2738 IMGUI_CHECKVERSION();
2739 ImGui::CreateContext();
2740 ImGui_ImplGlfw_InitForOpenGL(g_Window, true);
2741 ImGui_ImplOpenGL3_Init();
2742
2743 ImGui::StyleColorsDark();
2744
2745 auto &io = ImGui::GetIO();
2746
2747 io.Fonts->AddFontDefault();
2748
2749 #define _LOAD_BUILTIN_FONT_FOR_SIZE(name, size) { \
2750 ImFontConfig config; \
2751 config.MergeMode = true; \
2752 g_FontStandard_##name = io.Fonts->AddFontFromFileTTF("assets/FontStandard.ttf", size * g_Scale, nullptr, StandardGlyphRanges); \
2753 g_FontExtended_##name = io.Fonts->AddFontFromFileTTF("assets/FontExtended.ttf", size * g_Scale, &config, ExtendedGlyphRanges); \
2754 }
2755 _LOAD_BUILTIN_FONT_FOR_SIZE(Small, 27.0f)
2756 _LOAD_BUILTIN_FONT_FOR_SIZE(Medium, 30.0f)
2757 _LOAD_BUILTIN_FONT_FOR_SIZE(MediumLarge, 37.0f)
2758 _LOAD_BUILTIN_FONT_FOR_SIZE(Large, 45.0f)
2759
2760 io.Fonts->Build();
2761
2762 ResizeCanvas();
2763
2764 return 0;
2765 }
2766
2767 #define _RES_TRY(expr) { \
2768 const auto tmp_res = (expr); \

Callers 1

InitializeFunction · 0.85

Calls 1

ResizeCanvasFunction · 0.85

Tested by

no test coverage detected