🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

[v0] Alternative GUI theme

A topic by procedural created 88 days ago Views: 180
Viewing posts 1 to 1
Developer (Edited 5 times)

Place NotoMono-Regular.ttf to /tmp/lib0_engine/ folder. Download the font here: https://www.google.com/get/noto/#mono-mono

Paste this code after `ImguiInit(dpy, win, scancodes);` line of `AppLoad` procedure:

#if 1
  {
    struct ImGuiIO    * io    = igGetIO();
    struct ImGuiStyle * style = igGetStyle();
    
    style->ScrollbarRounding = 0;
    style->WindowRounding    = 0;
    style->FrameRounding     = 0;
    
    char font[10000] = {0};
    char * base_path = GpuSysGetBasePath();
    snprintf(font, 10000, "%s%s", base_path, "NotoMono-Regular.ttf");
    free(base_path);
    ImFontAtlas_AddFontFromFileTTF(io->Fonts, font, 20, NULL, NULL);
    
    static struct ImVec3 color_for_text = {211 / 255.f, 218 / 255.f, 227 / 255.f};
    static struct ImVec3 color_for_head = { 64 / 255.f, 132 / 255.f, 214 / 255.f};
    static struct ImVec3 color_for_area = { 47 / 255.f,  52 / 255.f,  63 / 255.f};
    static struct ImVec3 color_for_body = { 56 / 255.f,  60 / 255.f,  74 / 255.f};
    static struct ImVec3 color_for_pops = { 28 / 255.f,  30 / 255.f,  37 / 255.f};
    ImguiEasyTheming(color_for_text, color_for_head, color_for_area, color_for_body, color_for_pops);
    style->Colors[ImGuiCol_WindowBg] = (struct ImVec4){color_for_body.x, color_for_body.y, color_for_body.z, 0.75f};
    style->Colors[ImGuiCol_FrameBg]  = (struct ImVec4){color_for_area.x, color_for_area.y, color_for_area.z, 0.75f};
  }
#endif

Before:


After: