Imgui: Veröffentlichen Sie hier Ihre Farbstile / Themen

Erstellt am 19. Juni 2016  ·  43Kommentare  ·  Quelle: ocornut/imgui

Ich habe beschlossen, ein paar bessere Farbthemen in die Standardverpackung aufzunehmen, vielleicht schon in der nächsten Version (1.50).

Der Grund dafür ist, dass ich es tun möchte, um die Gleichheit von Menschen zu verringern, die tatsächlich zu viel mit dem Styling selbst zu tun haben. Zum kleinen Teil, weil dies Zeit kostet, und zum großen Teil, weil benutzerdefinierte Themen leichter zu brechen sind und eine Situation schaffen, in der ich vorsichtiger bin, das Styling-System zu ändern. Ich hoffe daher, eine bessere Basis mit benannten Themen zu bieten, mit denen die Leute zufrieden sind, die wir beibehalten und die die Leute nicht dazu ermutigen, zu viel zu häuten, bis ImGui tatsächlich dazu bereit ist.

1.A.
Ich möchte das bestehende Standardthema verbessern. Höchstwahrscheinlich müssen die Farben der Haupttasten geändert werden, sie sehen jetzt am schlechtesten aus. Eine geringfügige Änderung des aktuellen Standardthemas wäre eine gute Auffrischung. Wenn Sie in einer kreativen Stimmung sind, versuchen Sie bitte, das Standardthema zu optimieren :)

1.B.
Ich möchte neue Themen hinzufügen. Bitte reichen Sie hier Ihre passenden Screenshots ein! Ich dachte wahrscheinlich zumindest an ein schwarzes Thema, ein weißliches Thema. Wahrscheinlich noch ein oder zwei. Bei der Diskussion müssen wir berücksichtigen, dass leicht transparente Fenster für viele Benutzer nützlich sind, die Fenster über ihr Spiel / ihren Inhalt legen. Dies ist zwar kein Deal-Breaker, aber es ist schön, wenn ein Thema sowohl mit vollständig undurchsichtigen Hintergrundfarben als auch mit leicht transparenten Farben funktioniert. Sie können auch Aufnahmen anderer Software für Ideen / Referenzen einreichen, obwohl ich hoffe, dass ich direkt auf den Punkt komme und die tatsächlichen Einstellungen integriert bekomme.

2.
Wenn möglich, möchte ich auch einen praktischen Weg finden, um Änderungen an Schriftarten zu präsentieren, ohne den Beispielen / Anwendungen neue Gebäude- / Kompatibilitätsprobleme hinzuzufügen. Insbesondere kann das Startverzeichnis abhängig vom verwendeten Toolset / Build-System variabel sein und die Verwendung externer Dateien wie der in extra_fonts / gezeigten etwas einfacher machen. Das ist lösbar.

verwandte Themen

438 vereinfachtes Design

184 neues Design / Farben (momentan nicht).

help wanted in progress style

Hilfreichster Kommentar

Ein Kirschthema: D.

image

void CherryTheme() {
    // cherry colors, 3 intensities
    #define HI(v)   ImVec4(0.502f, 0.075f, 0.256f, v)
    #define MED(v)  ImVec4(0.455f, 0.198f, 0.301f, v)
    #define LOW(v)  ImVec4(0.232f, 0.201f, 0.271f, v)
    // backgrounds (<strong i="8">@todo</strong>: complete with BG_MED, BG_LOW)
    #define BG(v)   ImVec4(0.200f, 0.220f, 0.270f, v)
    // text
    #define TEXT(v) ImVec4(0.860f, 0.930f, 0.890f, v)

    auto &style = ImGui::GetStyle();
    style.Colors[ImGuiCol_Text]                  = TEXT(0.78f);
    style.Colors[ImGuiCol_TextDisabled]          = TEXT(0.28f);
    style.Colors[ImGuiCol_WindowBg]              = ImVec4(0.13f, 0.14f, 0.17f, 1.00f);
    style.Colors[ImGuiCol_ChildWindowBg]         = BG( 0.58f);
    style.Colors[ImGuiCol_PopupBg]               = BG( 0.9f);
    style.Colors[ImGuiCol_Border]                = ImVec4(0.31f, 0.31f, 1.00f, 0.00f);
    style.Colors[ImGuiCol_BorderShadow]          = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    style.Colors[ImGuiCol_FrameBg]               = BG( 1.00f);
    style.Colors[ImGuiCol_FrameBgHovered]        = MED( 0.78f);
    style.Colors[ImGuiCol_FrameBgActive]         = MED( 1.00f);
    style.Colors[ImGuiCol_TitleBg]               = LOW( 1.00f);
    style.Colors[ImGuiCol_TitleBgActive]         = HI( 1.00f);
    style.Colors[ImGuiCol_TitleBgCollapsed]      = BG( 0.75f);
    style.Colors[ImGuiCol_MenuBarBg]             = BG( 0.47f);
    style.Colors[ImGuiCol_ScrollbarBg]           = BG( 1.00f);
    style.Colors[ImGuiCol_ScrollbarGrab]         = ImVec4(0.09f, 0.15f, 0.16f, 1.00f);
    style.Colors[ImGuiCol_ScrollbarGrabHovered]  = MED( 0.78f);
    style.Colors[ImGuiCol_ScrollbarGrabActive]   = MED( 1.00f);
    style.Colors[ImGuiCol_CheckMark]             = ImVec4(0.71f, 0.22f, 0.27f, 1.00f);
    style.Colors[ImGuiCol_SliderGrab]            = ImVec4(0.47f, 0.77f, 0.83f, 0.14f);
    style.Colors[ImGuiCol_SliderGrabActive]      = ImVec4(0.71f, 0.22f, 0.27f, 1.00f);
    style.Colors[ImGuiCol_Button]                = ImVec4(0.47f, 0.77f, 0.83f, 0.14f);
    style.Colors[ImGuiCol_ButtonHovered]         = MED( 0.86f);
    style.Colors[ImGuiCol_ButtonActive]          = MED( 1.00f);
    style.Colors[ImGuiCol_Header]                = MED( 0.76f);
    style.Colors[ImGuiCol_HeaderHovered]         = MED( 0.86f);
    style.Colors[ImGuiCol_HeaderActive]          = HI( 1.00f);
    style.Colors[ImGuiCol_Column]                = ImVec4(0.14f, 0.16f, 0.19f, 1.00f);
    style.Colors[ImGuiCol_ColumnHovered]         = MED( 0.78f);
    style.Colors[ImGuiCol_ColumnActive]          = MED( 1.00f);
    style.Colors[ImGuiCol_ResizeGrip]            = ImVec4(0.47f, 0.77f, 0.83f, 0.04f);
    style.Colors[ImGuiCol_ResizeGripHovered]     = MED( 0.78f);
    style.Colors[ImGuiCol_ResizeGripActive]      = MED( 1.00f);
    style.Colors[ImGuiCol_PlotLines]             = TEXT(0.63f);
    style.Colors[ImGuiCol_PlotLinesHovered]      = MED( 1.00f);
    style.Colors[ImGuiCol_PlotHistogram]         = TEXT(0.63f);
    style.Colors[ImGuiCol_PlotHistogramHovered]  = MED( 1.00f);
    style.Colors[ImGuiCol_TextSelectedBg]        = MED( 0.43f);
    // [...]
    style.Colors[ImGuiCol_ModalWindowDarkening]  = BG( 0.73f);

    style.WindowPadding            = ImVec2(6, 4);
    style.WindowRounding           = 0.0f;
    style.FramePadding             = ImVec2(5, 2);
    style.FrameRounding            = 3.0f;
    style.ItemSpacing              = ImVec2(7, 1);
    style.ItemInnerSpacing         = ImVec2(1, 1);
    style.TouchExtraPadding        = ImVec2(0, 0);
    style.IndentSpacing            = 6.0f;
    style.ScrollbarSize            = 12.0f;
    style.ScrollbarRounding        = 16.0f;
    style.GrabMinSize              = 20.0f;
    style.GrabRounding             = 2.0f;

    style.WindowTitleAlign.x = 0.50f;

    style.Colors[ImGuiCol_Border] = ImVec4(0.539f, 0.479f, 0.255f, 0.162f);
    style.FrameBorderSize = 0.0f;
    style.WindowBorderSize = 1.0f;
}

Alle 43 Kommentare

Das Thema, das ich verwende, wird über die Funktion SetupimGuiStyle in diesem Gist eingerichtet , basierend auf dem Lichtstil von @itamago .

Ich habe dies leicht modifiziert, um die Behandlung von Alpha zu vereinheitlichen, und Funktionen hinzugefügt, um zwischen hell und dunkel zu wechseln und das Hintergrund-Alpha zu variieren.

Für die Hauptschrift verwende ich Roboto-Regular.ttf mit einer Größe von 18,0 f und

Dark Style, no alpha. 2016-5-19_11-47-55_avoyd_3
Light Style, no alpha.  2016-5-19_11-47-48_avoyd_2
Dark Style, medium alpha. 2016-5-19_11-47-32_avoyd_0
Light Style, medium alpha. 2016-5-19_11-47-38_avoyd_1
Dark Style, low alpha.  2016-5-19_11-48-18_avoyd_4
Light Style, low alpha.  2016-5-19_11-48-34_avoyd_5

Hallo @ocornut ,
Es ist nicht meine Absicht, dich zu beeilen: erröten:, aber hast du eine geschätzte Veröffentlichungszeit für 1,50 mit diesen Themenverbesserungen?

Eine andere Sache: Da es mindestens vier inoffizielle Häfen von imgui zu emscripten gibt, wäre es schön, einen offiziellen in der Basisbibliothek zu haben. Auf der positiven Seite ist die einmalige Webassembly in Browsern obligatorisch, die als kostenloser Bonus angeboten wird.

Meine besten,

- RM

Es tut mir leid, Roberto, ich kann keine ETA geben. Ab Mitte des Monats werde ich die Arbeit an Navigationssteuerungen wieder aufnehmen und die Farben werden danach gepflegt.

Ich kann auch keine neuen Projekte annehmen und alles, was geschrieben wurde, wäre eine neue Sache, über die ich nachdenken müsste. Ich kenne emscripten nicht und kann keine fundierte Entscheidung treffen. Wenn es einer dieser vier Personen ernst ist, der Community etwas zu geben und etwas zu pflegen, kann sie die Projekte selbst regeln und dem offiziellen Repo etwas vorlegen, wenn sie dies für sinnvoll halten. Der Teufel in den Details und das Sortieren / Verwalten / Präsentieren ist eine Menge Arbeit, die ich nicht für sie tun kann. Ich kann es weder erzwingen noch nur jemandem vorschlagen, da die meisten Beiträge einmalig sind und mir mehr Arbeit hinzufügen. Menschen, die Beiträge leisten, ohne dazu aufgefordert zu werden, sorgen eher dafür, dass die Dinge langfristig funktionieren :)

Hallo Omar und danke für die Antwort,
Ich verstehe dich voll und ganz, denn auch für mich ist Zeit heute eine wirklich knappe Ressource.
Ich habe vor> 1,5 Jahren einen Port zum Emscripten gemacht, aber ehrlich gesagt weiß ich nicht, wo ich ihn abgelegt habe.
Im Moment verwende ich imgui nicht in meinen Projekten, da sie größtenteils webbasiert sind. Um imgui zu erhalten, warte ich darauf, dass die Webassembly in allen Browsern Standard und Standard ist.
Wenn und wann das passiert, werde ich es gerne portieren und dazu beitragen (und den ganzen Wahnsinn der CSS- / Browser- / JS-Bibliotheken für eine stabilere Lösung für mehrere Plattformen fallen lassen).

Navigationssteuerung? Meinst du raffiniertere Dinge wie ein Docker-Panel (siehe 3), Tab-Verwaltung? (Ich wünsche es: lächeln :)

Vielen Dank für den schönen Code und dafür, dass er klein und einfach gehalten wird.

- Roberto

Bitte poste deine Styles hier!
Für 1,50, weil es eine schöne Zahl ist, würde ich gerne arbeiten und diese neuen Farbthemen hinzufügen :)

Ich werde mein Thema hier veröffentlichen, wenn ich meine Arbeit beendet habe.
Übrigens, Sie haben einen sehr erfahrenen Künstlerfreund (Benfiquet), ich denke, er kann dabei helfen.

hier ist mein
imgui

ImGuiStyle& style = ImGui::GetStyle();
style.WindowRounding = 5.3f;
style.FrameRounding = 2.3f;
style.ScrollbarRounding = 0;

style.Colors[ImGuiCol_Text]                  = ImVec4(0.90f, 0.90f, 0.90f, 0.90f);
style.Colors[ImGuiCol_TextDisabled]          = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
style.Colors[ImGuiCol_WindowBg]              = ImVec4(0.09f, 0.09f, 0.15f, 1.00f);
style.Colors[ImGuiCol_ChildWindowBg]         = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
style.Colors[ImGuiCol_PopupBg]               = ImVec4(0.05f, 0.05f, 0.10f, 0.85f);
style.Colors[ImGuiCol_Border]                = ImVec4(0.70f, 0.70f, 0.70f, 0.65f);
style.Colors[ImGuiCol_BorderShadow]          = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
style.Colors[ImGuiCol_FrameBg]               = ImVec4(0.00f, 0.00f, 0.01f, 1.00f);
style.Colors[ImGuiCol_FrameBgHovered]        = ImVec4(0.90f, 0.80f, 0.80f, 0.40f);
style.Colors[ImGuiCol_FrameBgActive]         = ImVec4(0.90f, 0.65f, 0.65f, 0.45f);
style.Colors[ImGuiCol_TitleBg]               = ImVec4(0.00f, 0.00f, 0.00f, 0.83f);
style.Colors[ImGuiCol_TitleBgCollapsed]      = ImVec4(0.40f, 0.40f, 0.80f, 0.20f);
style.Colors[ImGuiCol_TitleBgActive]         = ImVec4(0.00f, 0.00f, 0.00f, 0.87f);
style.Colors[ImGuiCol_MenuBarBg]             = ImVec4(0.01f, 0.01f, 0.02f, 0.80f);
style.Colors[ImGuiCol_ScrollbarBg]           = ImVec4(0.20f, 0.25f, 0.30f, 0.60f);
style.Colors[ImGuiCol_ScrollbarGrab]         = ImVec4(0.55f, 0.53f, 0.55f, 0.51f);
style.Colors[ImGuiCol_ScrollbarGrabHovered]  = ImVec4(0.56f, 0.56f, 0.56f, 1.00f);
style.Colors[ImGuiCol_ScrollbarGrabActive]   = ImVec4(0.56f, 0.56f, 0.56f, 0.91f);
style.Colors[ImGuiCol_ComboBg]               = ImVec4(0.1f, 0.1f, 0.1f, 0.99f);
style.Colors[ImGuiCol_CheckMark]             = ImVec4(0.90f, 0.90f, 0.90f, 0.83f);
style.Colors[ImGuiCol_SliderGrab]            = ImVec4(0.70f, 0.70f, 0.70f, 0.62f);
style.Colors[ImGuiCol_SliderGrabActive]      = ImVec4(0.30f, 0.30f, 0.30f, 0.84f);
style.Colors[ImGuiCol_Button]                = ImVec4(0.48f, 0.72f, 0.89f, 0.49f);
style.Colors[ImGuiCol_ButtonHovered]         = ImVec4(0.50f, 0.69f, 0.99f, 0.68f);
style.Colors[ImGuiCol_ButtonActive]          = ImVec4(0.80f, 0.50f, 0.50f, 1.00f);
style.Colors[ImGuiCol_Header]                = ImVec4(0.30f, 0.69f, 1.00f, 0.53f);
style.Colors[ImGuiCol_HeaderHovered]         = ImVec4(0.44f, 0.61f, 0.86f, 1.00f);
style.Colors[ImGuiCol_HeaderActive]          = ImVec4(0.38f, 0.62f, 0.83f, 1.00f);
style.Colors[ImGuiCol_Column]                = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
style.Colors[ImGuiCol_ColumnHovered]         = ImVec4(0.70f, 0.60f, 0.60f, 1.00f);
style.Colors[ImGuiCol_ColumnActive]          = ImVec4(0.90f, 0.70f, 0.70f, 1.00f);
style.Colors[ImGuiCol_ResizeGrip]            = ImVec4(1.00f, 1.00f, 1.00f, 0.85f);
style.Colors[ImGuiCol_ResizeGripHovered]     = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
style.Colors[ImGuiCol_ResizeGripActive]      = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
style.Colors[ImGuiCol_CloseButton]           = ImVec4(0.50f, 0.50f, 0.90f, 0.50f);
style.Colors[ImGuiCol_CloseButtonHovered]    = ImVec4(0.70f, 0.70f, 0.90f, 0.60f);
style.Colors[ImGuiCol_CloseButtonActive]     = ImVec4(0.70f, 0.70f, 0.70f, 1.00f);
style.Colors[ImGuiCol_PlotLines]             = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
style.Colors[ImGuiCol_PlotLinesHovered]      = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
style.Colors[ImGuiCol_PlotHistogram]         = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
style.Colors[ImGuiCol_PlotHistogramHovered]  = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
style.Colors[ImGuiCol_TextSelectedBg]        = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
style.Colors[ImGuiCol_ModalWindowDarkening]  = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);

@ocornut : Wenn Sie möchten, können Sie einige der Stile in meinem Addon-Zweig auswählen: Siehe die ResetStyle () -Methode hier: https://github.com/Flix01/imgui/blob/imgui_with_addons/addons/imguistyleserializer/imguistyleserializer.cpp

Nicht alle sehen gut aus, aber das konnte ich tun.

PS Einige von ihnen gehören mir überhaupt nicht: Ich habe gerade Stile aus anderen Posts gesammelt (und manchmal angepasst).

PS Sie können sie hier ausprobieren: https://rawgit.com/Flix01/imgui/imgui_with_addons/examples/addons_examples/html/main.html (die Autorenzuordnung wird im Combo-Tooltip für Themen angezeigt, die ich nicht erstellt habe).

[Bearbeiten:] Verschieben Sie die ShowBorder- Eigenschaft von _ImGuiWindow_ nach _ImStyle_?

Danke für die Links, beide.
@ codz01 Ben ist nicht wirklich ein UX-Designer, er hatte etwas gemacht, das jede praktische Überlegung aus der Praxis ignorierte.
@ Flix01 Danke! Ja, ich sollte mich bewegen, dass Sie Recht haben. Vielleicht sollte ich diese Änderung in 1,50 anstreben. Ich kann mich nicht einmal daran erinnern, wie es dort überhaupt endete, wahrscheinlich eine hastige Entscheidung, die ich für 1,00 getroffen habe.

Ich sollte vielleicht diese Änderung in 1,50 anstreben

@ocornut : Ja, ich denke, es ist eine gute Wahl, alle

Ja, ich denke, es ist eine gute Wahl, alle stilbezogenen Themen in derselben Version zusammen zu berühren.

"all" ist ein wenig optimistisch. Sogar das Ändern nur der Grenzsache erfordert im Voraus einiges an Design.

Kopieren als Referenz von https://github.com/procedural/gpulib/
(https://github.com/procedural/gpulib/blob/e0bda0cd486d720a90857df9f7797722265e9312/examples/04%20Dear%20ImGui/main.c)

Es stellt sich heraus, dass ich immer mehr versucht bin, diesen FreeType-Loader offiziell zu machen, da es bei kleinen Größen schwierig ist, gut aussehende Anti-Alias-Schriftarten zu erhalten.

Eine andere Sache ist, dass viele Stile ohne Transparenz oder vor einem bekannten Hintergrund getestet / entworfen wurden und bei einer dieser Parameteränderungen anders aussehen.

68747470733a2f2f692e696d6775722e636f6d2f6f444c593572592e706e67

theme

// From https://github.com/procedural/gpulib/blob/master/gpulib_imgui.h
struct ImVec3 { float x, y, z; ImVec3(float _x = 0.0f, float _y = 0.0f, float _z = 0.0f) { x = _x; y = _y; z = _z; } };

void imgui_easy_theming(ImVec3 color_for_text, ImVec3 color_for_head, ImVec3 color_for_area, ImVec3 color_for_body, ImVec3 color_for_pops)
{
    ImGuiStyle& style = ImGui::GetStyle();

    style.Colors[ImGuiCol_Text] = ImVec4( color_for_text.x, color_for_text.y, color_for_text.z, 1.00f );
    style.Colors[ImGuiCol_TextDisabled] = ImVec4( color_for_text.x, color_for_text.y, color_for_text.z, 0.58f );
    style.Colors[ImGuiCol_WindowBg] = ImVec4( color_for_body.x, color_for_body.y, color_for_body.z, 0.95f );
    style.Colors[ImGuiCol_ChildWindowBg] = ImVec4( color_for_area.x, color_for_area.y, color_for_area.z, 0.58f );
    style.Colors[ImGuiCol_Border] = ImVec4( color_for_body.x, color_for_body.y, color_for_body.z, 0.00f );
    style.Colors[ImGuiCol_BorderShadow] = ImVec4( color_for_body.x, color_for_body.y, color_for_body.z, 0.00f );
    style.Colors[ImGuiCol_FrameBg] = ImVec4( color_for_area.x, color_for_area.y, color_for_area.z, 1.00f );
    style.Colors[ImGuiCol_FrameBgHovered] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.78f );
    style.Colors[ImGuiCol_FrameBgActive] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_TitleBg] = ImVec4( color_for_area.x, color_for_area.y, color_for_area.z, 1.00f );
    style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4( color_for_area.x, color_for_area.y, color_for_area.z, 0.75f );
    style.Colors[ImGuiCol_TitleBgActive] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_MenuBarBg] = ImVec4( color_for_area.x, color_for_area.y, color_for_area.z, 0.47f );
    style.Colors[ImGuiCol_ScrollbarBg] = ImVec4( color_for_area.x, color_for_area.y, color_for_area.z, 1.00f );
    style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.21f );
    style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.78f );
    style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_ComboBg] = ImVec4( color_for_area.x, color_for_area.y, color_for_area.z, 1.00f );
    style.Colors[ImGuiCol_CheckMark] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.80f );
    style.Colors[ImGuiCol_SliderGrab] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.50f );
    style.Colors[ImGuiCol_SliderGrabActive] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_Button] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.50f );
    style.Colors[ImGuiCol_ButtonHovered] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.86f );
    style.Colors[ImGuiCol_ButtonActive] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_Header] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.76f );
    style.Colors[ImGuiCol_HeaderHovered] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.86f );
    style.Colors[ImGuiCol_HeaderActive] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_Column] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.32f );
    style.Colors[ImGuiCol_ColumnHovered] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.78f );
    style.Colors[ImGuiCol_ColumnActive] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_ResizeGrip] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.15f );
    style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.78f );
    style.Colors[ImGuiCol_ResizeGripActive] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_CloseButton] = ImVec4( color_for_text.x, color_for_text.y, color_for_text.z, 0.16f );
    style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4( color_for_text.x, color_for_text.y, color_for_text.z, 0.39f );
    style.Colors[ImGuiCol_CloseButtonActive] = ImVec4( color_for_text.x, color_for_text.y, color_for_text.z, 1.00f );
    style.Colors[ImGuiCol_PlotLines] = ImVec4( color_for_text.x, color_for_text.y, color_for_text.z, 0.63f );
    style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_PlotHistogram] = ImVec4( color_for_text.x, color_for_text.y, color_for_text.z, 0.63f );
    style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 1.00f );
    style.Colors[ImGuiCol_TextSelectedBg] = ImVec4( color_for_head.x, color_for_head.y, color_for_head.z, 0.43f );
    style.Colors[ImGuiCol_PopupBg] = ImVec4( color_for_pops.x, color_for_pops.y, color_for_pops.z, 0.92f );
    style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4( color_for_area.x, color_for_area.y, color_for_area.z, 0.73f );
}

void ImGuiEx::SetupImGuiStyle2()
{
    static ImVec3 color_for_text = ImVec3(236.f / 255.f, 240.f / 255.f, 241.f / 255.f);
    static ImVec3 color_for_head = ImVec3(41.f / 255.f, 128.f / 255.f, 185.f / 255.f);
    static ImVec3 color_for_area = ImVec3(57.f / 255.f, 79.f / 255.f, 105.f / 255.f);
    static ImVec3 color_for_body = ImVec3(44.f / 255.f, 62.f / 255.f, 80.f / 255.f);
    static ImVec3 color_for_pops = ImVec3(33.f / 255.f, 46.f / 255.f, 60.f / 255.f);
    imgui_easy_theming(color_for_text, color_for_head, color_for_area, color_for_body, color_for_pops);
}

Eine andere aus einer alten Software (möglicherweise nicht auf dem neuesten Stand)

Basierend auf dem @ Pagghiu- Thema

mc2001

childwindows

// Setup style
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_Text] = ImVec4(0.31f, 0.25f, 0.24f, 1.00f);
style.Colors[ImGuiCol_WindowBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f);
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.74f, 0.74f, 0.94f, 1.00f);
style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.68f, 0.68f, 0.68f, 0.00f);
style.Colors[ImGuiCol_Border] = ImVec4(0.50f, 0.50f, 0.50f, 0.60f);
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
style.Colors[ImGuiCol_FrameBg] = ImVec4(0.62f, 0.70f, 0.72f, 0.56f);
style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.95f, 0.33f, 0.14f, 0.47f);
style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.97f, 0.31f, 0.13f, 0.81f);
style.Colors[ImGuiCol_TitleBg] = ImVec4(0.42f, 0.75f, 1.00f, 0.53f);
style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.65f, 0.80f, 0.20f);
style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.40f, 0.62f, 0.80f, 0.15f);
style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.39f, 0.64f, 0.80f, 0.30f);
style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.28f, 0.67f, 0.80f, 0.59f);
style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.25f, 0.48f, 0.53f, 0.67f);
style.Colors[ImGuiCol_ComboBg] = ImVec4(0.89f, 0.98f, 1.00f, 0.99f);
style.Colors[ImGuiCol_CheckMark] = ImVec4(0.48f, 0.47f, 0.47f, 0.71f);
style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.31f, 0.47f, 0.99f, 1.00f);
style.Colors[ImGuiCol_Button] = ImVec4(1.00f, 0.79f, 0.18f, 0.78f);
style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.42f, 0.82f, 1.00f, 0.81f);
style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.72f, 1.00f, 1.00f, 0.86f);
style.Colors[ImGuiCol_Header] = ImVec4(0.65f, 0.78f, 0.84f, 0.80f);
style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.75f, 0.88f, 0.94f, 0.80f);
style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.55f, 0.68f, 0.74f, 0.80f);//ImVec4(0.46f, 0.84f, 0.90f, 1.00f);
style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.60f, 0.60f, 0.80f, 0.30f);
style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
style.Colors[ImGuiCol_CloseButton] = ImVec4(0.41f, 0.75f, 0.98f, 0.50f);
style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(1.00f, 0.47f, 0.41f, 0.60f);
style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(1.00f, 0.16f, 0.00f, 1.00f);
style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(1.00f, 0.99f, 0.54f, 0.43f);
style.Colors[ImGuiCol_TooltipBg] = ImVec4(0.82f, 0.92f, 1.00f, 0.90f);
style.Alpha = 1.0f;
style.WindowFillAlphaDefault = 1.0f;
style.FrameRounding = 4;
style.IndentSpacing = 12.0f;

Einige kleinere Änderungen an Dougs Thema oben

// Dark
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Text]                   = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_TextDisabled]           = ImVec4(0.40f, 0.40f, 0.40f, 1.00f);
colors[ImGuiCol_WindowBg]               = ImVec4(0.06f, 0.06f, 0.06f, 0.94f);
colors[ImGuiCol_Border]                 = ImVec4(1.00f, 1.00f, 1.00f, 0.19f);
colors[ImGuiCol_ChildWindowBg]          = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
colors[ImGuiCol_PopupBg]                = ImVec4(0.00f, 0.00f, 0.00f, 0.94f);
colors[ImGuiCol_FrameBg]                = ImVec4(0.16f, 0.29f, 0.48f, 0.54f);
colors[ImGuiCol_FrameBgHovered]         = ImVec4(0.26f, 0.59f, 0.98f, 0.40f);
colors[ImGuiCol_FrameBgActive]          = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
colors[ImGuiCol_TitleBg]                = ImVec4(0.04f, 0.04f, 0.04f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed]       = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
colors[ImGuiCol_TitleBgActive]          = ImVec4(0.18f, 0.18f, 0.18f, 1.00f);
colors[ImGuiCol_MenuBarBg]              = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
colors[ImGuiCol_ScrollbarBg]            = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
colors[ImGuiCol_ScrollbarGrab]          = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
colors[ImGuiCol_ScrollbarGrabHovered]   = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
colors[ImGuiCol_ScrollbarGrabActive]    = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
colors[ImGuiCol_ComboBg]                = ImVec4(0.14f, 0.14f, 0.14f, 0.99f);
colors[ImGuiCol_CheckMark]              = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_SliderGrab]             = ImVec4(0.24f, 0.52f, 0.88f, 1.00f);
colors[ImGuiCol_SliderGrabActive]       = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_Button]                 = ImVec4(0.26f, 0.59f, 0.98f, 0.40f);
colors[ImGuiCol_ButtonHovered]          = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_ButtonActive]           = ImVec4(0.06f, 0.53f, 0.98f, 1.00f);
colors[ImGuiCol_Header]                 = ImVec4(0.26f, 0.59f, 0.98f, 0.31f);
colors[ImGuiCol_HeaderHovered]          = ImVec4(0.26f, 0.59f, 0.98f, 0.80f);
colors[ImGuiCol_HeaderActive]           = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_Separator]              = colors[ImGuiCol_Border];
colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
colors[ImGuiCol_SeparatorActive]        = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_ResizeGrip]             = ImVec4(0.26f, 0.59f, 0.98f, 0.25f);
colors[ImGuiCol_ResizeGripHovered]      = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
colors[ImGuiCol_ResizeGripActive]       = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
colors[ImGuiCol_CloseButton]            = ImVec4(0.41f, 0.41f, 0.41f, 0.50f);
colors[ImGuiCol_CloseButtonHovered]     = ImVec4(0.98f, 0.39f, 0.36f, 1.00f);
colors[ImGuiCol_CloseButtonActive]      = ImVec4(0.98f, 0.39f, 0.36f, 1.00f);
colors[ImGuiCol_PlotLines]              = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
colors[ImGuiCol_PlotLinesHovered]       = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
colors[ImGuiCol_PlotHistogram]          = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogramHovered]   = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
colors[ImGuiCol_TextSelectedBg]         = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
colors[ImGuiCol_ModalWindowDarkening]   = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
#ifdef IMGUI_HAS_NAV
colors[ImGuiCol_NavHighlight]           = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_NavWindowingHighlight]  = ImVec4(1.00f, 1.00f, 1.00f, 0.12f);
#endif

Es tut uns leid, dass das Styling in letzter Zeit keine großen Fortschritte gemacht hat. Ich werde versuchen, es im November voranzutreiben.

Ich habe einige Änderungen vorgenommen:

  1. Das klassische Thema wurde ein wenig überarbeitet. Insbesondere habe ich die Tasten geändert, um Blautöne anstelle von Rot-Rosa zu verwenden.

image

  1. Drei Funktionen wurden hinzugefügt:
    StyleColorsClassic() , StyleColorsDark() , StyleColorsLight() .
    Diese Themen werden in zukünftigen Updates und Zweigen beibehalten (und verbessert).

image

image

Ich werde in Kürze eine Kombination zur Auswahl von Schriftarten hinzufügen - zwischen geladenen Schriftarten, um nur vorzuschlagen, dass Schriftarten geladen werden können. (Sobald ich herausgefunden habe, was mit den dritten Parametern der derzeit internen BeginCombo-API zu tun ist.)

  1. Die Fensterflagge ImGuiWindowFlags_ShowBorders wurde vollständig getötet.
    Es macht die Verwendung von Rändern weniger Kopfschmerzen.
    Stattdessen gibt es neue Werte style.WindowBorderSize , style.FrameBorderSize , style.PopupBorderSize usw. Die Werte sollen 0,0 und 1,0 sein, aber abgesehen von Leistungen und überlappenden Gründen ist es tatsächlich möglich, dicker zu sein Ränder (abhängig von der Alpha-Einstellung sieht es möglicherweise nicht gut aus).
    Der Rand hat derzeit alle die gleichen Farben. Ich werde mehr / bessere Optionen einführen, wenn ich das Styling-System überarbeite, aber wahrscheinlich nicht für ein paar Monate (siehe Ideen in # 1223).

  2. Der Stileditor bietet jetzt a) die Auswahl zwischen diesen drei Standardthemen an, b) das Speichern / Zurücksetzen etwas besser handhaben, sodass Sie die Schaltfläche Zurücksetzen sehen können, wenn Sie von einem benutzerdefinierten Thema aus optimieren (anstatt immer mit dem Standardthema verglichen zu werden), c) Zeigt oben "vereinfachte Einstellungen" an, wobei FrameRounding und die verschiedenen Rahmengrößen als Kontrollkästchen anstelle von Float angezeigt werden.

(Spät zur Party, aber ...)

Hier ist mein Thema, das (mehr oder weniger) die Microsoft Design Guidelines (https://design.microsoft.com/) nachahmt:

image

ImGuiIO& io = ImGui::GetIO();
io.Fonts->Clear();
ImFont* font = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 18.0f);
if (font != NULL) {
    io.FontDefault = font;
} else {
    io.Fonts->AddFontDefault();
}
io.Fonts->Build();

ImGuiStyle* style = &ImGui::GetStyle();
int hspacing = 8;
int vspacing = 6;
style->DisplaySafeAreaPadding = ImVec2(0, 0);
style->WindowPadding = ImVec2(hspacing/2, vspacing);
style->FramePadding = ImVec2(hspacing, vspacing);
style->ItemSpacing = ImVec2(hspacing, vspacing);
style->ItemInnerSpacing = ImVec2(hspacing, vspacing);
style->IndentSpacing = 20.0f;

style->WindowRounding = 0.0f;
style->FrameRounding = 0.0f;

style->WindowBorderSize = 0.0f;
style->FrameBorderSize = 1.0f;
style->PopupBorderSize = 1.0f;

style->ScrollbarSize = 20.0f;
style->ScrollbarRounding = 0.0f;
style->GrabMinSize = 5.0f;
style->GrabRounding = 0.0f;

ImVec4 white = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
ImVec4 transparent = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
ImVec4 dark = ImVec4(0.00f, 0.00f, 0.00f, 0.20f);
ImVec4 darker = ImVec4(0.00f, 0.00f, 0.00f, 0.50f);

ImVec4 background = ImVec4(0.95f, 0.95f, 0.95f, 1.00f);
ImVec4 text = ImVec4(0.10f, 0.10f, 0.10f, 1.00f);
ImVec4 border = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
ImVec4 grab = ImVec4(0.69f, 0.69f, 0.69f, 1.00f);
ImVec4 header = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
ImVec4 active = ImVec4(0.00f, 0.47f, 0.84f, 1.00f);
ImVec4 hover = ImVec4(0.00f, 0.47f, 0.84f, 0.20f);

style->Colors[ImGuiCol_Text] = text;
style->Colors[ImGuiCol_WindowBg] = background;
style->Colors[ImGuiCol_ChildBg] = background;
style->Colors[ImGuiCol_PopupBg] = white;

style->Colors[ImGuiCol_Border] = border;
style->Colors[ImGuiCol_BorderShadow] = transparent;

style->Colors[ImGuiCol_Button] = header;
style->Colors[ImGuiCol_ButtonHovered] = hover;
style->Colors[ImGuiCol_ButtonActive] = active;

style->Colors[ImGuiCol_FrameBg] = white;
style->Colors[ImGuiCol_FrameBgHovered] = hover;
style->Colors[ImGuiCol_FrameBgActive] = active;

style->Colors[ImGuiCol_MenuBarBg] = header;
style->Colors[ImGuiCol_Header] = header;
style->Colors[ImGuiCol_HeaderHovered] = hover;
style->Colors[ImGuiCol_HeaderActive] = active;

style->Colors[ImGuiCol_CheckMark] = text;
style->Colors[ImGuiCol_SliderGrab] = grab;
style->Colors[ImGuiCol_SliderGrabActive] = darker;

style->Colors[ImGuiCol_CloseButton] = transparent;
style->Colors[ImGuiCol_CloseButtonHovered] = transparent;
style->Colors[ImGuiCol_CloseButtonActive] = transparent;

style->Colors[ImGuiCol_ScrollbarBg] = header;
style->Colors[ImGuiCol_ScrollbarGrab] = grab;
style->Colors[ImGuiCol_ScrollbarGrabHovered] = dark;
style->Colors[ImGuiCol_ScrollbarGrabActive] = darker;

Hier ist mein Thema, das (mehr oder weniger) die Microsoft Design Guidelines (https://design.microsoft.com/) nachahmt:

Vielen Dank! Auch dieser Link und dieses Beispiel sind nützlich für # 438.

Unter den Dingen, die im Stilsystem fehlen, würde diese Art von Stil von verbesserten Rändern profitieren (siehe z. B. # 447). Mit diesen und einigen zusätzlichen Farb- / Stildefinitionen würde Ihr Stil besser als Microsoft-Sache gelten.

Beachten Sie, dass Ihre Schriftart zu niedrig ist. Derzeit gibt es ein Problem mit der vertikalen Ausrichtung, das einige Schriftarten betrifft:
Vielleicht möchten Sie Folgendes tun:

ImFont* font = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 18.0f);
font->DisplayOffset.y -= 1;

Beachten Sie, dass Ihre Schriftart zu niedrig ist. Derzeit gibt es ein Problem mit der vertikalen Ausrichtung, das einige Schriftarten betrifft:
Vielleicht möchten Sie Folgendes tun:

Ja, jetzt sieht es besser aus.

Vielen Dank! Auch dieser Link und dieses Beispiel sind nützlich für # 438.

Versuchen Sie für einen direkten Link auch Folgendes: https://docs.microsoft.com/en-us/windows/uwp/design/basics/commanding-basics

Zu Ihrer Information, ich habe vor ein paar Tagen eine kleine Änderung vorgenommen, um ein Kreuz im Schließknopf anstelle des berüchtigten Kreises zu verwenden:

image
image

Die Hervorhebungsfüllung (die für abgerundete Fenster kreisförmig ist) verwendet die Hintergrundfarben der Schaltfläche, sodass ImGuiCol_CloseButton , ImGuiCol_CloseButtonActive , ImGuiCol_CloseButtonHovered vollständig entfernt wurden (dies ist eine wichtige Änderung ) als Teil der Vereinfachung von Stilen.

Ich mochte sie von "Benutzernameiwantedwasalreadytaken" (Ihr Benutzername ist schwer zu schreiben :-))

Ich denke, es wäre großartig, dunkle und helle Themen für jede der Plattformen (Win, Mac, Android) zu haben, die Menschen helfen würden, die möchten, dass die App plattformübergreifend und nativ ist, da von normalen Benutzern nicht erwartet wird, dass sie die Themen mögen das passt nicht zum fenster des nativen os.

Vielen Dank für die Mühe, imgui ist eine großartige Bibliothek

@ocornut , ich habe einen Vorschlag.

Ich denke, ImGui-Themen sollten von der Festplatte lesbar sein. Und dass es eine Handvoll bereitgestellter Themen geben sollte, schließt unter Sonstiges / Themen ein. Der Grund, warum ich dies für eine gute Idee halte, ist, dass die Möglichkeit, Themen einfach zu teilen, dazu führt, dass die Leute eher neue Themen erstellen und optimieren.

Würden Sie einen solchen Vorschlag generell unterstützen? Wenn ja, kann ich später in dieser Woche eine Pull-Anfrage senden. :) :)

@forrestthewoods IMHO Ich denke, es ist im Moment wirklich unerwünscht, weil das

Im Moment möchte ich die Leute lieber nicht ermutigen, Imgui als eine hautfähige Bibliothek zu behandeln, insbesondere wenn man bedenkt, wie primitiv und eng die Haut ist. Wenn imgui ausgereifter / stabiler ist und das Styling-System Überschreibungen und Verläufe pro Widget-Typ zulässt und wir wissen, wie man einen Stil verteilt, der mit SRGB-korrekter Überblendung usw. funktioniert, können wir ein stabileres Format entwerfen.

(Beachten Sie, dass Sie Ihre Lösung für das, was Sie derzeit tun möchten, in einem Dutzend Codezeilen zusammenfassen.)

Es klingt so, als ob es Übereinstimmung gibt, dass es an einem bestimmten Punkt ein eigenständiges Dateiformat für Stil / Thema geben sollte. Die Frage ist nicht ob, sondern wann. Ich bin ziemlich zufrieden damit und könnte ehrlich gesagt zufrieden weggehen, wenn ich weiß, dass es irgendwann kommt. Und große Stiländerungen in diesem Jahr sind ein faires Argument, um zu warten! Ein noch besserer Grund ist es, sich Zeit zu nehmen, um das Dateiformat zu besprechen.

Ich möchte mir einen Moment Zeit nehmen, um einige Gründe zu nennen, warum dies eher früher als später geschehen sollte. Nicht unbedingt jetzt, aber früher.

Erstens fördert es die Adoption. Im Moment wollen Sie das ausdrücklich NICHT. Was ich verstehe. Dies ist ein Henne-Ei-Problem. Ich denke , ein Dateiformat haben wird angenommen werden , bevor das Stil - System für sie bereit ist. Weil das Stilsystem erst bereit sein kann, wenn es verwendet wurde. Und es wird erst verwendet, wenn es einfacher ist, es zu teilen. Kein Schlachtplan überlebt den ersten Kontakt mit dem Feind; noch irgendein Dateiformat. :) :)

Zweitens werden Änderungen / Erweiterungen am Stilformat immer brechen. Beide Dinge brechen zur Kompilierungszeit aufgrund der Entfernung von Enums ab. Oder Dinge "brechen" zur Laufzeit, weil etwas standardmäßig gestaltet ist; entweder aufgrund eines neuen Stilwerts, der nicht festgelegt wurde, oder aufgrund eines alten Stilwerts, der geändert wurde. Egal wie ausgereift das Styling-System ist, diese Pausen werden auftreten.

Drittens ist das Stilsystem primitiv, aber es ist stark genug, dass ein gutes Farbthema zu einer großen Verbesserung führen kann. Ich weiß, wir würden mehr Iterationen sehen, wenn die Themen leichter zu teilen wären.

Meine Arbeitsimplementierung ist ein einfaches Schlüssel- / Wertedateiformat. Es funktioniert mit sscanf auf eine Weise, die vom ini-Dateiformat abgeleitet ist. Sehr einfach. Wenn sich das Stilformat ändert oder erweitert wird, sind die Endergebnisse Stilwerte mit ihrem standardmäßig erstellten Wert.

Ich denke, es ist ratsam zu warten, bis die ersten großen Verbesserungen des Stilsystems vorgenommen wurden. Ich denke jedoch, dass es wichtig ist, gemeinsam nutzbare Themen eher früher als später zu aktivieren. Und ich denke definitiv, dass das Aktivieren von Themen dazu beitragen wird, Entscheidungen zu treffen, die für das Stilsystem getroffen wurden.

<3

Schlechte Simulation zum Darcula-Thema von IntelliJ:

auto *style = (dst ? dst : &ImGui::GetStyle());
style->WindowRounding = 5.3f;
style->GrabRounding = style->FrameRounding = 2.3f;
style->ScrollbarRounding = 5.0f;
style->FrameBorderSize = 1.0f;
style->ItemSpacing.y = 6.5f;

style->Colors[ImGuiCol_Text]                  = {0.73333335f, 0.73333335f, 0.73333335f, 1.00f};
style->Colors[ImGuiCol_TextDisabled]          = {0.34509805f, 0.34509805f, 0.34509805f, 1.00f};
style->Colors[ImGuiCol_WindowBg]              = {0.23529413f, 0.24705884f, 0.25490198f, 0.94f};
style->Colors[ImGuiCol_ChildBg]               = {0.23529413f, 0.24705884f, 0.25490198f, 0.00f};
style->Colors[ImGuiCol_PopupBg]               = {0.23529413f, 0.24705884f, 0.25490198f, 0.94f};
style->Colors[ImGuiCol_Border]                = {0.33333334f, 0.33333334f, 0.33333334f, 0.50f};
style->Colors[ImGuiCol_BorderShadow]          = {0.15686275f, 0.15686275f, 0.15686275f, 0.00f};
style->Colors[ImGuiCol_FrameBg]               = {0.16862746f, 0.16862746f, 0.16862746f, 0.54f};
style->Colors[ImGuiCol_FrameBgHovered]        = {0.453125f, 0.67578125f, 0.99609375f, 0.67f};
style->Colors[ImGuiCol_FrameBgActive]         = {0.47058827f, 0.47058827f, 0.47058827f, 0.67f};
style->Colors[ImGuiCol_TitleBg]               = {0.04f, 0.04f, 0.04f, 1.00f};
style->Colors[ImGuiCol_TitleBgCollapsed]      = {0.16f, 0.29f, 0.48f, 1.00f};
style->Colors[ImGuiCol_TitleBgActive]         = {0.00f, 0.00f, 0.00f, 0.51f};
style->Colors[ImGuiCol_MenuBarBg]             = {0.27058825f, 0.28627452f, 0.2901961f, 0.80f};
style->Colors[ImGuiCol_ScrollbarBg]           = {0.27058825f, 0.28627452f, 0.2901961f, 0.60f};
style->Colors[ImGuiCol_ScrollbarGrab]         = {0.21960786f, 0.30980393f, 0.41960788f, 0.51f};
style->Colors[ImGuiCol_ScrollbarGrabHovered]  = {0.21960786f, 0.30980393f, 0.41960788f, 1.00f};
style->Colors[ImGuiCol_ScrollbarGrabActive]   = {0.13725491f, 0.19215688f, 0.2627451f, 0.91f};
// style->Colors[ImGuiCol_ComboBg]               = {0.1f, 0.1f, 0.1f, 0.99f};
style->Colors[ImGuiCol_CheckMark]             = {0.90f, 0.90f, 0.90f, 0.83f};
style->Colors[ImGuiCol_SliderGrab]            = {0.70f, 0.70f, 0.70f, 0.62f};
style->Colors[ImGuiCol_SliderGrabActive]      = {0.30f, 0.30f, 0.30f, 0.84f};
style->Colors[ImGuiCol_Button]                = {0.33333334f, 0.3529412f, 0.36078432f, 0.49f};
style->Colors[ImGuiCol_ButtonHovered]         = {0.21960786f, 0.30980393f, 0.41960788f, 1.00f};
style->Colors[ImGuiCol_ButtonActive]          = {0.13725491f, 0.19215688f, 0.2627451f, 1.00f};
style->Colors[ImGuiCol_Header]                = {0.33333334f, 0.3529412f, 0.36078432f, 0.53f};
style->Colors[ImGuiCol_HeaderHovered]         = {0.453125f, 0.67578125f, 0.99609375f, 0.67f};
style->Colors[ImGuiCol_HeaderActive]          = {0.47058827f, 0.47058827f, 0.47058827f, 0.67f};
style->Colors[ImGuiCol_Separator]             = {0.31640625f, 0.31640625f, 0.31640625f, 1.00f};
style->Colors[ImGuiCol_SeparatorHovered]      = {0.31640625f, 0.31640625f, 0.31640625f, 1.00f};
style->Colors[ImGuiCol_SeparatorActive]       = {0.31640625f, 0.31640625f, 0.31640625f, 1.00f};
style->Colors[ImGuiCol_ResizeGrip]            = {1.00f, 1.00f, 1.00f, 0.85f};
style->Colors[ImGuiCol_ResizeGripHovered]     = {1.00f, 1.00f, 1.00f, 0.60f};
style->Colors[ImGuiCol_ResizeGripActive]      = {1.00f, 1.00f, 1.00f, 0.90f};
style->Colors[ImGuiCol_PlotLines]             = {0.61f, 0.61f, 0.61f, 1.00f};
style->Colors[ImGuiCol_PlotLinesHovered]      = {1.00f, 0.43f, 0.35f, 1.00f};
style->Colors[ImGuiCol_PlotHistogram]         = {0.90f, 0.70f, 0.00f, 1.00f};
style->Colors[ImGuiCol_PlotHistogramHovered]  = {1.00f, 0.60f, 0.00f, 1.00f};
style->Colors[ImGuiCol_TextSelectedBg]        = {0.18431373f, 0.39607847f, 0.79215693f, 0.90f};

@ ice1000

Schlechte Simulation zum Darcula-Thema von IntelliJ:

Bildschirmfoto?

@ocornut

Bildschirmfoto?

image

  • Links: Imgui im ​​Darcula-Stil
  • Rechts: IntelliJ IDEA im Darcula-Stil

Ich möchte, wenn möglich, einen Themenvorschlag machen, es ist ein grau / dunkles Thema.
Ich wollte ein Thema ähnlich wie UE4 erstellen, also habe ich mir Folgendes ausgedacht:
capture

Hier ist der Code dafür:

ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Text]                   = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_TextDisabled]           = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
colors[ImGuiCol_WindowBg]               = ImVec4(0.06f, 0.06f, 0.06f, 0.94f);
colors[ImGuiCol_ChildBg]                = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
colors[ImGuiCol_PopupBg]                = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
colors[ImGuiCol_Border]                 = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
colors[ImGuiCol_BorderShadow]           = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_FrameBg]                = ImVec4(0.20f, 0.21f, 0.22f, 0.54f);
colors[ImGuiCol_FrameBgHovered]         = ImVec4(0.40f, 0.40f, 0.40f, 0.40f);
colors[ImGuiCol_FrameBgActive]          = ImVec4(0.18f, 0.18f, 0.18f, 0.67f);
colors[ImGuiCol_TitleBg]                = ImVec4(0.04f, 0.04f, 0.04f, 1.00f);
colors[ImGuiCol_TitleBgActive]          = ImVec4(0.29f, 0.29f, 0.29f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed]       = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
colors[ImGuiCol_MenuBarBg]              = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
colors[ImGuiCol_ScrollbarBg]            = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
colors[ImGuiCol_ScrollbarGrab]          = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
colors[ImGuiCol_ScrollbarGrabHovered]   = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
colors[ImGuiCol_ScrollbarGrabActive]    = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
colors[ImGuiCol_CheckMark]              = ImVec4(0.94f, 0.94f, 0.94f, 1.00f);
colors[ImGuiCol_SliderGrab]             = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
colors[ImGuiCol_SliderGrabActive]       = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
colors[ImGuiCol_Button]                 = ImVec4(0.44f, 0.44f, 0.44f, 0.40f);
colors[ImGuiCol_ButtonHovered]          = ImVec4(0.46f, 0.47f, 0.48f, 1.00f);
colors[ImGuiCol_ButtonActive]           = ImVec4(0.42f, 0.42f, 0.42f, 1.00f);
colors[ImGuiCol_Header]                 = ImVec4(0.70f, 0.70f, 0.70f, 0.31f);
colors[ImGuiCol_HeaderHovered]          = ImVec4(0.70f, 0.70f, 0.70f, 0.80f);
colors[ImGuiCol_HeaderActive]           = ImVec4(0.48f, 0.50f, 0.52f, 1.00f);
colors[ImGuiCol_Separator]              = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.72f, 0.72f, 0.72f, 0.78f);
colors[ImGuiCol_SeparatorActive]        = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
colors[ImGuiCol_ResizeGrip]             = ImVec4(0.91f, 0.91f, 0.91f, 0.25f);
colors[ImGuiCol_ResizeGripHovered]      = ImVec4(0.81f, 0.81f, 0.81f, 0.67f);
colors[ImGuiCol_ResizeGripActive]       = ImVec4(0.46f, 0.46f, 0.46f, 0.95f);
colors[ImGuiCol_PlotLines]              = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
colors[ImGuiCol_PlotLinesHovered]       = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
colors[ImGuiCol_PlotHistogram]          = ImVec4(0.73f, 0.60f, 0.15f, 1.00f);
colors[ImGuiCol_PlotHistogramHovered]   = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
colors[ImGuiCol_TextSelectedBg]         = ImVec4(0.87f, 0.87f, 0.87f, 0.35f);
colors[ImGuiCol_ModalWindowDarkening]   = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
colors[ImGuiCol_DragDropTarget]         = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
colors[ImGuiCol_NavHighlight]           = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
colors[ImGuiCol_NavWindowingHighlight]  = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);

Ich hoffe es gefällt euch und könnte es sogar in ImGui integrieren.

Ein Kirschthema: D.

image

void CherryTheme() {
    // cherry colors, 3 intensities
    #define HI(v)   ImVec4(0.502f, 0.075f, 0.256f, v)
    #define MED(v)  ImVec4(0.455f, 0.198f, 0.301f, v)
    #define LOW(v)  ImVec4(0.232f, 0.201f, 0.271f, v)
    // backgrounds (<strong i="8">@todo</strong>: complete with BG_MED, BG_LOW)
    #define BG(v)   ImVec4(0.200f, 0.220f, 0.270f, v)
    // text
    #define TEXT(v) ImVec4(0.860f, 0.930f, 0.890f, v)

    auto &style = ImGui::GetStyle();
    style.Colors[ImGuiCol_Text]                  = TEXT(0.78f);
    style.Colors[ImGuiCol_TextDisabled]          = TEXT(0.28f);
    style.Colors[ImGuiCol_WindowBg]              = ImVec4(0.13f, 0.14f, 0.17f, 1.00f);
    style.Colors[ImGuiCol_ChildWindowBg]         = BG( 0.58f);
    style.Colors[ImGuiCol_PopupBg]               = BG( 0.9f);
    style.Colors[ImGuiCol_Border]                = ImVec4(0.31f, 0.31f, 1.00f, 0.00f);
    style.Colors[ImGuiCol_BorderShadow]          = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    style.Colors[ImGuiCol_FrameBg]               = BG( 1.00f);
    style.Colors[ImGuiCol_FrameBgHovered]        = MED( 0.78f);
    style.Colors[ImGuiCol_FrameBgActive]         = MED( 1.00f);
    style.Colors[ImGuiCol_TitleBg]               = LOW( 1.00f);
    style.Colors[ImGuiCol_TitleBgActive]         = HI( 1.00f);
    style.Colors[ImGuiCol_TitleBgCollapsed]      = BG( 0.75f);
    style.Colors[ImGuiCol_MenuBarBg]             = BG( 0.47f);
    style.Colors[ImGuiCol_ScrollbarBg]           = BG( 1.00f);
    style.Colors[ImGuiCol_ScrollbarGrab]         = ImVec4(0.09f, 0.15f, 0.16f, 1.00f);
    style.Colors[ImGuiCol_ScrollbarGrabHovered]  = MED( 0.78f);
    style.Colors[ImGuiCol_ScrollbarGrabActive]   = MED( 1.00f);
    style.Colors[ImGuiCol_CheckMark]             = ImVec4(0.71f, 0.22f, 0.27f, 1.00f);
    style.Colors[ImGuiCol_SliderGrab]            = ImVec4(0.47f, 0.77f, 0.83f, 0.14f);
    style.Colors[ImGuiCol_SliderGrabActive]      = ImVec4(0.71f, 0.22f, 0.27f, 1.00f);
    style.Colors[ImGuiCol_Button]                = ImVec4(0.47f, 0.77f, 0.83f, 0.14f);
    style.Colors[ImGuiCol_ButtonHovered]         = MED( 0.86f);
    style.Colors[ImGuiCol_ButtonActive]          = MED( 1.00f);
    style.Colors[ImGuiCol_Header]                = MED( 0.76f);
    style.Colors[ImGuiCol_HeaderHovered]         = MED( 0.86f);
    style.Colors[ImGuiCol_HeaderActive]          = HI( 1.00f);
    style.Colors[ImGuiCol_Column]                = ImVec4(0.14f, 0.16f, 0.19f, 1.00f);
    style.Colors[ImGuiCol_ColumnHovered]         = MED( 0.78f);
    style.Colors[ImGuiCol_ColumnActive]          = MED( 1.00f);
    style.Colors[ImGuiCol_ResizeGrip]            = ImVec4(0.47f, 0.77f, 0.83f, 0.04f);
    style.Colors[ImGuiCol_ResizeGripHovered]     = MED( 0.78f);
    style.Colors[ImGuiCol_ResizeGripActive]      = MED( 1.00f);
    style.Colors[ImGuiCol_PlotLines]             = TEXT(0.63f);
    style.Colors[ImGuiCol_PlotLinesHovered]      = MED( 1.00f);
    style.Colors[ImGuiCol_PlotHistogram]         = TEXT(0.63f);
    style.Colors[ImGuiCol_PlotHistogramHovered]  = MED( 1.00f);
    style.Colors[ImGuiCol_TextSelectedBg]        = MED( 0.43f);
    // [...]
    style.Colors[ImGuiCol_ModalWindowDarkening]  = BG( 0.73f);

    style.WindowPadding            = ImVec2(6, 4);
    style.WindowRounding           = 0.0f;
    style.FramePadding             = ImVec2(5, 2);
    style.FrameRounding            = 3.0f;
    style.ItemSpacing              = ImVec2(7, 1);
    style.ItemInnerSpacing         = ImVec2(1, 1);
    style.TouchExtraPadding        = ImVec2(0, 0);
    style.IndentSpacing            = 6.0f;
    style.ScrollbarSize            = 12.0f;
    style.ScrollbarRounding        = 16.0f;
    style.GrabMinSize              = 20.0f;
    style.GrabRounding             = 2.0f;

    style.WindowTitleAlign.x = 0.50f;

    style.Colors[ImGuiCol_Border] = ImVec4(0.539f, 0.479f, 0.255f, 0.162f);
    style.FrameBorderSize = 0.0f;
    style.WindowBorderSize = 1.0f;
}

Dunkles Thema
imgui

ImGuiStyle & st = ImGui :: GetStyle ();
st.FrameBorderSize = 1.0f;
st.FramePadding = ImVec2 (4.0f, 2.0f);
st.ItemSpacing = ImVec2 (8.0f, 2.0f);
st.WindowBorderSize = 1.0f;
st.TabBorderSize = 1.0f;
st.WindowRounding = 1.0f;
st.ChildRounding = 1.0f;
st.FrameRounding = 1.0f;
st.ScrollbarRounding = 1.0f;
st.GrabRounding = 1.0f;
st.TabRounding = 1.0f;

// Setup-Stil
ImVec4 * colours = ImGui :: GetStyle (). Colors;
Farben [ImGuiCol_Text] = ImVec4 (1,00f, 1,00f, 1,00f, 0,95f);
Farben [ImGuiCol_TextDisabled] = ImVec4 (0,50f, 0,50f, 0,50f, 1,00f);
Farben [ImGuiCol_WindowBg] = ImVec4 (0,13f, 0,12f, 0,12f, 1,00f);
Farben [ImGuiCol_ChildBg] = ImVec4 (1,00f, 1,00f, 1,00f, 0,00f);
Farben [ImGuiCol_PopupBg] = ImVec4 (0,05f, 0,05f, 0,05f, 0,94f);
Farben [ImGuiCol_Border] = ImVec4 (0,53f, 0,53f, 0,53f, 0,46f);
Farben [ImGuiCol_BorderShadow] = ImVec4 (0,00f, 0,00f, 0,00f, 0,00f);
Farben [ImGuiCol_FrameBg] = ImVec4 (0,00f, 0,00f, 0,00f, 0,85f);
Farben [ImGuiCol_FrameBgHovered] = ImVec4 (0,22f, 0,22f, 0,22f, 0,40f);
Farben [ImGuiCol_FrameBgActive] = ImVec4 (0,16f, 0,16f, 0,16f, 0,53f);
Farben [ImGuiCol_TitleBg] = ImVec4 (0,00f, 0,00f, 0,00f, 1,00f);
Farben [ImGuiCol_TitleBgActive] = ImVec4 (0,00f, 0,00f, 0,00f, 1,00f);
Farben [ImGuiCol_TitleBgCollapsed] = ImVec4 (0,00f, 0,00f, 0,00f, 0,51f);
Farben [ImGuiCol_MenuBarBg] = ImVec4 (0,12f, 0,12f, 0,12f, 1,00f);
Farben [ImGuiCol_ScrollbarBg] = ImVec4 (0,02f, 0,02f, 0,02f, 0,53f);
Farben [ImGuiCol_ScrollbarGrab] = ImVec4 (0,31f, 0,31f, 0,31f, 1,00f);
Farben [ImGuiCol_ScrollbarGrabHovered] = ImVec4 (0,41f, 0,41f, 0,41f, 1,00f);
Farben [ImGuiCol_ScrollbarGrabActive] = ImVec4 (0,48f, 0,48f, 0,48f, 1,00f);
Farben [ImGuiCol_CheckMark] = ImVec4 (0,79f, 0,79f, 0,79f, 1,00f);
Farben [ImGuiCol_SliderGrab] = ImVec4 (0,48f, 0,47f, 0,47f, 0,91f);
Farben [ImGuiCol_SliderGrabActive] = ImVec4 (0,56f, 0,55f, 0,55f, 0,62f);
Farben [ImGuiCol_Button] = ImVec4 (0,50f, 0,50f, 0,50f, 0,63f);
Farben [ImGuiCol_ButtonHovered] = ImVec4 (0,67f, 0,67f, 0,68f, 0,63f);
Farben [ImGuiCol_ButtonActive] = ImVec4 (0,26f, 0,26f, 0,26f, 0,63f);
Farben [ImGuiCol_Header] = ImVec4 (0,54f, 0,54f, 0,54f, 0,58f);
Farben [ImGuiCol_HeaderHovered] = ImVec4 (0,64f, 0,65f, 0,65f, 0,80f);
Farben [ImGuiCol_HeaderActive] = ImVec4 (0,25f, 0,25f, 0,25f, 0,80f);
Farben [ImGuiCol_Separator] = ImVec4 (0,58f, 0,58f, 0,58f, 0,50f);
Farben [ImGuiCol_SeparatorHovered] = ImVec4 (0,81f, 0,81f, 0,81f, 0,64f);
Farben [ImGuiCol_SeparatorActive] = ImVec4 (0,81f, 0,81f, 0,81f, 0,64f);
Farben [ImGuiCol_ResizeGrip] = ImVec4 (0,87f, 0,87f, 0,87f, 0,53f);
Farben [ImGuiCol_ResizeGripHovered] = ImVec4 (0,87f, 0,87f, 0,87f, 0,74f);
Farben [ImGuiCol_ResizeGripActive] = ImVec4 (0,87f, 0,87f, 0,87f, 0,74f);
Farben [ImGuiCol_Tab] = ImVec4 (0,01f, 0,01f, 0,01f, 0,86f);
Farben [ImGuiCol_TabHovered] = ImVec4 (0,29f, 0,29f, 0,29f, 1,00f);
Farben [ImGuiCol_TabActive] = ImVec4 (0,31f, 0,31f, 0,31f, 1,00f);
Farben [ImGuiCol_TabUnfocused] = ImVec4 (0,02f, 0,02f, 0,02f, 1,00f);
Farben [ImGuiCol_TabUnfocusedActive] = ImVec4 (0,19f, 0,19f, 0,19f, 1,00f);
Farben [ImGuiCol_DockingPreview] = ImVec4 (0,38f, 0,48f, 0,60f, 1,00f);
Farben [ImGuiCol_DockingEmptyBg] = ImVec4 (0,20f, 0,20f, 0,20f, 1,00f);
Farben [ImGuiCol_PlotLines] = ImVec4 (0,61f, 0,61f, 0,61f, 1,00f);
Farben [ImGuiCol_PlotLinesHovered] = ImVec4 (0,68f, 0,68f, 0,68f, 1,00f);
Farben [ImGuiCol_PlotHistogram] = ImVec4 (0,90f, 0,77f, 0,33f, 1,00f);
Farben [ImGuiCol_PlotHistogramHovered] = ImVec4 (0,87f, 0,55f, 0,08f, 1,00f);
Farben [ImGuiCol_TextSelectedBg] = ImVec4 (0,47f, 0,60f, 0,76f, 0,47f);
Farben [ImGuiCol_DragDropTarget] = ImVec4 (0,58f, 0,58f, 0,58f, 0,90f);
Farben [ImGuiCol_NavHighlight] = ImVec4 (0,60f, 0,60f, 0,60f, 1,00f);
Farben [ImGuiCol_NavWindowingHighlight] = ImVec4 (1,00f, 1,00f, 1,00f, 0,70f);
Farben [ImGuiCol_NavWindowingDimBg] = ImVec4 (0,80f, 0,80f, 0,80f, 0,20f);
Farben [ImGuiCol_ModalWindowDimBg] = ImVec4 (0,80f, 0,80f, 0,80f, 0,35f);

@ r-lyeh Schönes Thema. Allerdings ist das Zeichen in einer Schaltfläche nicht richtig zentriert, es ist leicht aus? Zum Beispiel im InputInt.

Ich sehe keine Probleme: Möchten Sie die Fehlausrichtung hervorheben? thx: D.
Edit: Ok, danke! Ich habe das Original-Snippet repariert.

unaligned

Es ist ein bisschen "Ameisenficken", aber wie Sie sehen können, befinden sich "-" und "+" nicht in der Mitte des Knopfes

Kopieren des LightGreen-Stils von @ebachard aus # 1776 (damit ich das andere Thema
capture du 2018-04-26 20-42-40

// generic miniDart theme
void ImGui::StyleColorsLightGreen(ImGuiStyle* dst)
{
    ImGuiStyle* style = dst ? dst : &ImGui::GetStyle();
    ImVec4* colors = style->Colors;

    style->WindowRounding    = 2.0f;             // Radius of window corners rounding. Set to 0.0f to have rectangular windows
    style->ScrollbarRounding = 3.0f;             // Radius of grab corners rounding for scrollbar
    style->GrabRounding      = 2.0f;             // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
    style->AntiAliasedLines  = true;
    style->AntiAliasedFill   = true;
    style->WindowRounding    = 2;
    style->ChildRounding     = 2;
    style->ScrollbarSize     = 16;
    style->ScrollbarRounding = 3;
    style->GrabRounding      = 2;
    style->ItemSpacing.x     = 10;
    style->ItemSpacing.y     = 4;
    style->IndentSpacing     = 22;
    style->FramePadding.x    = 6;
    style->FramePadding.y    = 4;
    style->Alpha             = 1.0f;
    style->FrameRounding     = 3.0f;

    colors[ImGuiCol_Text]                   = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
    colors[ImGuiCol_TextDisabled]          = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
    colors[ImGuiCol_WindowBg]              = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
    //colors[ImGuiCol_ChildWindowBg]         = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    colors[ImGuiCol_ChildBg]                = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    colors[ImGuiCol_PopupBg]                = ImVec4(0.93f, 0.93f, 0.93f, 0.98f);
    colors[ImGuiCol_Border]                = ImVec4(0.71f, 0.71f, 0.71f, 0.08f);
    colors[ImGuiCol_BorderShadow]          = ImVec4(0.00f, 0.00f, 0.00f, 0.04f);
    colors[ImGuiCol_FrameBg]               = ImVec4(0.71f, 0.71f, 0.71f, 0.55f);
    colors[ImGuiCol_FrameBgHovered]        = ImVec4(0.94f, 0.94f, 0.94f, 0.55f);
    colors[ImGuiCol_FrameBgActive]         = ImVec4(0.71f, 0.78f, 0.69f, 0.98f);
    colors[ImGuiCol_TitleBg]               = ImVec4(0.85f, 0.85f, 0.85f, 1.00f);
    colors[ImGuiCol_TitleBgCollapsed]      = ImVec4(0.82f, 0.78f, 0.78f, 0.51f);
    colors[ImGuiCol_TitleBgActive]         = ImVec4(0.78f, 0.78f, 0.78f, 1.00f);
    colors[ImGuiCol_MenuBarBg]             = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
    colors[ImGuiCol_ScrollbarBg]           = ImVec4(0.20f, 0.25f, 0.30f, 0.61f);
    colors[ImGuiCol_ScrollbarGrab]         = ImVec4(0.90f, 0.90f, 0.90f, 0.30f);
    colors[ImGuiCol_ScrollbarGrabHovered]  = ImVec4(0.92f, 0.92f, 0.92f, 0.78f);
    colors[ImGuiCol_ScrollbarGrabActive]   = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
    colors[ImGuiCol_CheckMark]             = ImVec4(0.184f, 0.407f, 0.193f, 1.00f);
    colors[ImGuiCol_SliderGrab]            = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
    colors[ImGuiCol_SliderGrabActive]      = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
    colors[ImGuiCol_Button]                = ImVec4(0.71f, 0.78f, 0.69f, 0.40f);
    colors[ImGuiCol_ButtonHovered]         = ImVec4(0.725f, 0.805f, 0.702f, 1.00f);
    colors[ImGuiCol_ButtonActive]          = ImVec4(0.793f, 0.900f, 0.836f, 1.00f);
    colors[ImGuiCol_Header]                = ImVec4(0.71f, 0.78f, 0.69f, 0.31f);
    colors[ImGuiCol_HeaderHovered]         = ImVec4(0.71f, 0.78f, 0.69f, 0.80f);
    colors[ImGuiCol_HeaderActive]          = ImVec4(0.71f, 0.78f, 0.69f, 1.00f);
    colors[ImGuiCol_Column]                = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
    colors[ImGuiCol_ColumnHovered]         = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
    colors[ImGuiCol_ColumnActive]          = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
    colors[ImGuiCol_Separator]              = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
    colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.14f, 0.44f, 0.80f, 0.78f);
    colors[ImGuiCol_SeparatorActive]        = ImVec4(0.14f, 0.44f, 0.80f, 1.00f);
    colors[ImGuiCol_ResizeGrip]            = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
    colors[ImGuiCol_ResizeGripHovered]     = ImVec4(0.26f, 0.59f, 0.98f, 0.45f);
    colors[ImGuiCol_ResizeGripActive]      = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
    colors[ImGuiCol_PlotLines]             = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
    colors[ImGuiCol_PlotLinesHovered]      = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
    colors[ImGuiCol_PlotHistogram]         = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
    colors[ImGuiCol_PlotHistogramHovered]  = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
    colors[ImGuiCol_TextSelectedBg]        = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
    colors[ImGuiCol_ModalWindowDarkening]  = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
    colors[ImGuiCol_DragDropTarget]         = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
    colors[ImGuiCol_NavHighlight]           = colors[ImGuiCol_HeaderHovered];
    colors[ImGuiCol_NavWindowingHighlight]  = ImVec4(0.70f, 0.70f, 0.70f, 0.70f);
}

@ocornut : vielen dank! Für diejenigen, die einige ImGui-Themen testen möchten, gibt es eine französische Version von miniDart für Windows (Entschuldigung, ich bin kein Profi und nur 40% der Benutzeroberfläche sind derzeit übersetzt).

Abhängigkeiten sind:

  • OpenGL-Treiber
  • eine verbundene Webcam (Logitech bevorzugt, wie im Repo erklärt)

Die verfügbaren Themen (siehe Registerkarte "Préférences") sind:

  • Hellgrün
  • Dunkel
  • Klassisch
  • Hellblau
  • Windows standard)

Zum Starten benötigen Sie eine angeschlossene Webcam (das werde ich sehr bald ändern).

Bitte sei sanft: Ich bin kein Profi ;-)

Der Link: https://framagit.org/ericb/miniDart

Mein Thema wurde von der Benutzeroberfläche von Photoshop inspiriert. Dunkle Kohlefarben werden verwendet, damit die Benutzeroberfläche nicht ständig Ihre Aufmerksamkeit auf sich zieht, und ich verwende hier und da orangefarbene Akzente, wenn ich mit einigen Dingen wie dem Fenstergrößenänderungsgriff oder dem Teiler interagiere, um ein bisschen Farbe hinzuzufügen, die nicht im Weg ist wenn du arbeitest.

Image of Derydoca Engine

void DearImgui::ApplyDefaultStyle()
{
    ImGuiStyle* style = &ImGui::GetStyle();
    ImVec4* colors = style->Colors;

    colors[ImGuiCol_Text]                   = ImVec4(1.000f, 1.000f, 1.000f, 1.000f);
    colors[ImGuiCol_TextDisabled]           = ImVec4(0.500f, 0.500f, 0.500f, 1.000f);
    colors[ImGuiCol_WindowBg]               = ImVec4(0.180f, 0.180f, 0.180f, 1.000f);
    colors[ImGuiCol_ChildBg]                = ImVec4(0.280f, 0.280f, 0.280f, 0.000f);
    colors[ImGuiCol_PopupBg]                = ImVec4(0.313f, 0.313f, 0.313f, 1.000f);
    colors[ImGuiCol_Border]                 = ImVec4(0.266f, 0.266f, 0.266f, 1.000f);
    colors[ImGuiCol_BorderShadow]           = ImVec4(0.000f, 0.000f, 0.000f, 0.000f);
    colors[ImGuiCol_FrameBg]                = ImVec4(0.160f, 0.160f, 0.160f, 1.000f);
    colors[ImGuiCol_FrameBgHovered]         = ImVec4(0.200f, 0.200f, 0.200f, 1.000f);
    colors[ImGuiCol_FrameBgActive]          = ImVec4(0.280f, 0.280f, 0.280f, 1.000f);
    colors[ImGuiCol_TitleBg]                = ImVec4(0.148f, 0.148f, 0.148f, 1.000f);
    colors[ImGuiCol_TitleBgActive]          = ImVec4(0.148f, 0.148f, 0.148f, 1.000f);
    colors[ImGuiCol_TitleBgCollapsed]       = ImVec4(0.148f, 0.148f, 0.148f, 1.000f);
    colors[ImGuiCol_MenuBarBg]              = ImVec4(0.195f, 0.195f, 0.195f, 1.000f);
    colors[ImGuiCol_ScrollbarBg]            = ImVec4(0.160f, 0.160f, 0.160f, 1.000f);
    colors[ImGuiCol_ScrollbarGrab]          = ImVec4(0.277f, 0.277f, 0.277f, 1.000f);
    colors[ImGuiCol_ScrollbarGrabHovered]   = ImVec4(0.300f, 0.300f, 0.300f, 1.000f);
    colors[ImGuiCol_ScrollbarGrabActive]    = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_CheckMark]              = ImVec4(1.000f, 1.000f, 1.000f, 1.000f);
    colors[ImGuiCol_SliderGrab]             = ImVec4(0.391f, 0.391f, 0.391f, 1.000f);
    colors[ImGuiCol_SliderGrabActive]       = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_Button]                 = ImVec4(1.000f, 1.000f, 1.000f, 0.000f);
    colors[ImGuiCol_ButtonHovered]          = ImVec4(1.000f, 1.000f, 1.000f, 0.156f);
    colors[ImGuiCol_ButtonActive]           = ImVec4(1.000f, 1.000f, 1.000f, 0.391f);
    colors[ImGuiCol_Header]                 = ImVec4(0.313f, 0.313f, 0.313f, 1.000f);
    colors[ImGuiCol_HeaderHovered]          = ImVec4(0.469f, 0.469f, 0.469f, 1.000f);
    colors[ImGuiCol_HeaderActive]           = ImVec4(0.469f, 0.469f, 0.469f, 1.000f);
    colors[ImGuiCol_Separator]              = colors[ImGuiCol_Border];
    colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.391f, 0.391f, 0.391f, 1.000f);
    colors[ImGuiCol_SeparatorActive]        = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_ResizeGrip]             = ImVec4(1.000f, 1.000f, 1.000f, 0.250f);
    colors[ImGuiCol_ResizeGripHovered]      = ImVec4(1.000f, 1.000f, 1.000f, 0.670f);
    colors[ImGuiCol_ResizeGripActive]       = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_Tab]                    = ImVec4(0.098f, 0.098f, 0.098f, 1.000f);
    colors[ImGuiCol_TabHovered]             = ImVec4(0.352f, 0.352f, 0.352f, 1.000f);
    colors[ImGuiCol_TabActive]              = ImVec4(0.195f, 0.195f, 0.195f, 1.000f);
    colors[ImGuiCol_TabUnfocused]           = ImVec4(0.098f, 0.098f, 0.098f, 1.000f);
    colors[ImGuiCol_TabUnfocusedActive]     = ImVec4(0.195f, 0.195f, 0.195f, 1.000f);
    colors[ImGuiCol_DockingPreview]         = ImVec4(1.000f, 0.391f, 0.000f, 0.781f);
    colors[ImGuiCol_DockingEmptyBg]         = ImVec4(0.180f, 0.180f, 0.180f, 1.000f);
    colors[ImGuiCol_PlotLines]              = ImVec4(0.469f, 0.469f, 0.469f, 1.000f);
    colors[ImGuiCol_PlotLinesHovered]       = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_PlotHistogram]          = ImVec4(0.586f, 0.586f, 0.586f, 1.000f);
    colors[ImGuiCol_PlotHistogramHovered]   = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_TextSelectedBg]         = ImVec4(1.000f, 1.000f, 1.000f, 0.156f);
    colors[ImGuiCol_DragDropTarget]         = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_NavHighlight]           = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_NavWindowingHighlight]  = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
    colors[ImGuiCol_NavWindowingDimBg]      = ImVec4(0.000f, 0.000f, 0.000f, 0.586f);
    colors[ImGuiCol_ModalWindowDimBg]       = ImVec4(0.000f, 0.000f, 0.000f, 0.586f);

    style->ChildRounding = 4.0f;
    style->FrameBorderSize = 1.0f;
    style->FrameRounding = 2.0f;
    style->GrabMinSize = 7.0f;
    style->PopupRounding = 2.0f;
    style->ScrollbarRounding = 12.0f;
    style->ScrollbarSize = 13.0f;
    style->TabBorderSize = 1.0f;
    style->TabRounding = 0.0f;
    style->WindowRounding = 4.0f;
}

Ich nenne das Thema "CorporateGrey". Die Farben und Styling-Parameter sollen sauber und augenschonend sein und eignen sich etwas besser für Desktop-Anwendungen / -Suiten.

greyflat
greyframed

inline void Style()
{
    ImGuiStyle & style = ImGui::GetStyle();
    ImVec4 * colors = style.Colors;

    /// 0 = FLAT APPEARENCE
    /// 1 = MORE "3D" LOOK
    int is3D = 0;

    colors[ImGuiCol_Text]                   = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
    colors[ImGuiCol_TextDisabled]           = ImVec4(0.40f, 0.40f, 0.40f, 1.00f);
    colors[ImGuiCol_ChildBg]                = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
    colors[ImGuiCol_WindowBg]               = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
    colors[ImGuiCol_PopupBg]                = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
    colors[ImGuiCol_Border]                 = ImVec4(0.12f, 0.12f, 0.12f, 0.71f);
    colors[ImGuiCol_BorderShadow]           = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
    colors[ImGuiCol_FrameBg]                = ImVec4(0.42f, 0.42f, 0.42f, 0.54f);
    colors[ImGuiCol_FrameBgHovered]         = ImVec4(0.42f, 0.42f, 0.42f, 0.40f);
    colors[ImGuiCol_FrameBgActive]          = ImVec4(0.56f, 0.56f, 0.56f, 0.67f);
    colors[ImGuiCol_TitleBg]                = ImVec4(0.19f, 0.19f, 0.19f, 1.00f);
    colors[ImGuiCol_TitleBgActive]          = ImVec4(0.22f, 0.22f, 0.22f, 1.00f);
    colors[ImGuiCol_TitleBgCollapsed]       = ImVec4(0.17f, 0.17f, 0.17f, 0.90f);
    colors[ImGuiCol_MenuBarBg]              = ImVec4(0.335f, 0.335f, 0.335f, 1.000f);
    colors[ImGuiCol_ScrollbarBg]            = ImVec4(0.24f, 0.24f, 0.24f, 0.53f);
    colors[ImGuiCol_ScrollbarGrab]          = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabHovered]   = ImVec4(0.52f, 0.52f, 0.52f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabActive]    = ImVec4(0.76f, 0.76f, 0.76f, 1.00f);
    colors[ImGuiCol_CheckMark]              = ImVec4(0.65f, 0.65f, 0.65f, 1.00f);
    colors[ImGuiCol_SliderGrab]             = ImVec4(0.52f, 0.52f, 0.52f, 1.00f);
    colors[ImGuiCol_SliderGrabActive]       = ImVec4(0.64f, 0.64f, 0.64f, 1.00f);
    colors[ImGuiCol_Button]                 = ImVec4(0.54f, 0.54f, 0.54f, 0.35f);
    colors[ImGuiCol_ButtonHovered]          = ImVec4(0.52f, 0.52f, 0.52f, 0.59f);
    colors[ImGuiCol_ButtonActive]           = ImVec4(0.76f, 0.76f, 0.76f, 1.00f);
    colors[ImGuiCol_Header]                 = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
    colors[ImGuiCol_HeaderHovered]          = ImVec4(0.47f, 0.47f, 0.47f, 1.00f);
    colors[ImGuiCol_HeaderActive]           = ImVec4(0.76f, 0.76f, 0.76f, 0.77f);
    colors[ImGuiCol_Separator]              = ImVec4(0.000f, 0.000f, 0.000f, 0.137f);
    colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.700f, 0.671f, 0.600f, 0.290f);
    colors[ImGuiCol_SeparatorActive]        = ImVec4(0.702f, 0.671f, 0.600f, 0.674f);
    colors[ImGuiCol_ResizeGrip]             = ImVec4(0.26f, 0.59f, 0.98f, 0.25f);
    colors[ImGuiCol_ResizeGripHovered]      = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
    colors[ImGuiCol_ResizeGripActive]       = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
    colors[ImGuiCol_PlotLines]              = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
    colors[ImGuiCol_PlotLinesHovered]       = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
    colors[ImGuiCol_PlotHistogram]          = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
    colors[ImGuiCol_PlotHistogramHovered]   = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
    colors[ImGuiCol_TextSelectedBg]         = ImVec4(0.73f, 0.73f, 0.73f, 0.35f);
    colors[ImGuiCol_ModalWindowDimBg]       = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
    colors[ImGuiCol_DragDropTarget]         = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
    colors[ImGuiCol_NavHighlight]           = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
    colors[ImGuiCol_NavWindowingHighlight]  = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
    colors[ImGuiCol_NavWindowingDimBg]      = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);

    style.PopupRounding = 3;

    style.WindowPadding = ImVec2(4, 4);
    style.FramePadding  = ImVec2(6, 4);
    style.ItemSpacing   = ImVec2(6, 2);

    style.ScrollbarSize = 18;

    style.WindowBorderSize = 1;
    style.ChildBorderSize  = 1;
    style.PopupBorderSize  = 1;
    style.FrameBorderSize  = is3D; 

    style.WindowRounding    = 3;
    style.ChildRounding     = 3;
    style.FrameRounding     = 3;
    style.ScrollbarRounding = 2;
    style.GrabRounding      = 3;

    #ifdef IMGUI_HAS_DOCK 
        style.TabBorderSize = is3D; 
        style.TabRounding   = 3;

        colors[ImGuiCol_DockingEmptyBg]     = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
        colors[ImGuiCol_Tab]                = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
        colors[ImGuiCol_TabHovered]         = ImVec4(0.40f, 0.40f, 0.40f, 1.00f);
        colors[ImGuiCol_TabActive]          = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
        colors[ImGuiCol_TabUnfocused]       = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
        colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
        colors[ImGuiCol_DockingPreview]     = ImVec4(0.85f, 0.85f, 0.85f, 0.28f);

        if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
        {
            style.WindowRounding = 0.0f;
            style.Colors[ImGuiCol_WindowBg].w = 1.0f;
        }
    #endif
}

Wir hatten heute Spaß daran, mit ImGui-Farben für ein persönliches Projekt zu spielen.
Am Ende habe ich eine kleine Klasse gebildet, um ein Thema aus 5 Grundfarben festzulegen, die Sie bereitstellen können.

Bearbeiten: Ich habe vergessen zu erwähnen, dass dies für den imgui Docking-Zweig ist.

So verwende ich beispielsweise standardmäßig diese Farben als Eingabe: https://coolors.co/252131-f4f1de-da115e-792359-c7ef00

Wenn ich EditorColorScheme::ApplyTheme(); , bekomme ich:
Default

Oder mit einem anderen Farbsatz
// From https://coolors.co/1f2421-725ac1-8d86c9-eca400-dce1de ; EditorColorScheme::SetColors(0x1F2421FF /* Background */, 0xDCE1DEFF /* Text */, 0x725AC1FF /* MainColor */, 0x8D86C9FF /* MainAccent */, 0xECA400FF /* Highlight */ );

Ich bekomme :
Dark Purple

oder
// From : https://coolors.co/c7dfc5-dbdddb-bbddb8-373737-9b287b ; EditorColorScheme::SetColors(0xC7DFC5FF, 0x373737FF, 0x86A586FF, 0xBBDDB8FF, 0x9B287BFF);

Greenpastel

Klasse ist da, wenn jemand damit spielen will:
`
Klasse EditorColorScheme
{
// 0xRRGGBBAA
inline static int BackGroundColor = 0x25213100;
inline static int TextColor = 0xF4F1DE00;
inline static int MainColor = 0xDA115E00;
inline static int MainAccentColor = 0x79235900;
inline static int HighlightColor = 0xC7EF0000;

    inline static int Black             = 0x00000000;
    inline static int White             = 0xFFFFFF00;

    inline static int AlphaTransparent  = 0x00;
    inline static int Alpha20           = 0x33;
    inline static int Alpha40           = 0x66;
    inline static int Alpha50           = 0x80;
    inline static int Alpha60           = 0x99;
    inline static int Alpha80           = 0xCC;
    inline static int Alpha90           = 0xE6;
    inline static int AlphaFull         = 0xFF;

    static float GetR(int colorCode) { return (float)((colorCode & 0xFF000000) >> 24 ) / (float)(0xFF); }
    static float GetG(int colorCode) { return (float)((colorCode & 0x00FF0000) >> 16 ) / (float)(0xFF); }
    static float GetB(int colorCode) { return (float)((colorCode & 0x0000FF00) >> 8  ) / (float)(0xFF); }
    static float GetA(int alphaCode) { return ((float)alphaCode / (float)0xFF); }

    static ImVec4 GetColor(int c, int a = Alpha80)  { return ImVec4(GetR(c), GetG(c), GetB(c), GetA(a)); }
    static ImVec4 Darken(ImVec4 c, float p)         { return ImVec4(fmax(0.f, c.x - 1.0f * p), fmax(0.f, c.y - 1.0f * p), fmax(0.f, c.z - 1.0f *p), c.w); }
    static ImVec4 Lighten(ImVec4 c, float p)        { return ImVec4(fmax(0.f, c.x + 1.0f * p), fmax(0.f, c.y + 1.0f * p), fmax(0.f, c.z + 1.0f *p), c.w); }

    static ImVec4 Disabled(ImVec4 c)    {   return Darken(c, 0.6f);     }       
    static ImVec4 Hovered(ImVec4 c)     {   return Lighten(c, 0.2f);    }
    static ImVec4 Active(ImVec4 c)      {   return Lighten(ImVec4(c.x, c.y, c.z, 1.0f),0.1f); }
    static ImVec4 Collapsed(ImVec4 c)   {   return Darken(c, 0.2f);     }

public:

    static void SetColors(int backGroundColor, int textColor, int mainColor, int mainAccentColor, int highlightColor)
    {
        BackGroundColor = backGroundColor;
        TextColor = textColor;
        MainColor = mainColor;
        MainAccentColor = mainAccentColor;
        HighlightColor = highlightColor;
    }

    static void ApplyTheme()
    {
        ImVec4* colors = ImGui::GetStyle().Colors;

        colors[ImGuiCol_Text]                   = GetColor(TextColor);
        colors[ImGuiCol_TextDisabled]           = Disabled(colors[ImGuiCol_Text]);
        colors[ImGuiCol_WindowBg]               = GetColor(BackGroundColor);
        colors[ImGuiCol_ChildBg]                = GetColor(Black, Alpha20);
        colors[ImGuiCol_PopupBg]                = GetColor(BackGroundColor, Alpha90);
        colors[ImGuiCol_Border]                 = Lighten(GetColor(BackGroundColor),0.4f);
        colors[ImGuiCol_BorderShadow]           = GetColor(Black);
        colors[ImGuiCol_FrameBg]                = GetColor(MainAccentColor, Alpha40);
        colors[ImGuiCol_FrameBgHovered]         = Hovered(colors[ImGuiCol_FrameBg]);
        colors[ImGuiCol_FrameBgActive]          = Active(colors[ImGuiCol_FrameBg]);
        colors[ImGuiCol_TitleBg]                = GetColor(BackGroundColor, Alpha80);
        colors[ImGuiCol_TitleBgActive]          = Active(colors[ImGuiCol_TitleBg]);
        colors[ImGuiCol_TitleBgCollapsed]       = Collapsed(colors[ImGuiCol_TitleBg]);
        colors[ImGuiCol_MenuBarBg]              = Darken(GetColor(BackGroundColor), 0.2f);
        colors[ImGuiCol_ScrollbarBg]            = Lighten(GetColor(BackGroundColor, Alpha50), 0.4f);
        colors[ImGuiCol_ScrollbarGrab]          = Lighten(GetColor(BackGroundColor), 0.3f);
        colors[ImGuiCol_ScrollbarGrabHovered]   = Hovered(colors[ImGuiCol_ScrollbarGrab]);
        colors[ImGuiCol_ScrollbarGrabActive]    = Active(colors[ImGuiCol_ScrollbarGrab]);
        colors[ImGuiCol_CheckMark]              = GetColor(HighlightColor);
        colors[ImGuiCol_SliderGrab]             = GetColor(HighlightColor);
        colors[ImGuiCol_SliderGrabActive]       = Active(colors[ImGuiCol_SliderGrab]);
        colors[ImGuiCol_Button]                 = GetColor(MainColor, Alpha80);
        colors[ImGuiCol_ButtonHovered]          = Hovered(colors[ImGuiCol_Button]);
        colors[ImGuiCol_ButtonActive]           = Active(colors[ImGuiCol_Button]);
        colors[ImGuiCol_Header]                 = GetColor(MainAccentColor, Alpha80);
        colors[ImGuiCol_HeaderHovered]          = Hovered(colors[ImGuiCol_Header]);
        colors[ImGuiCol_HeaderActive]           = Active(colors[ImGuiCol_Header]);
        colors[ImGuiCol_Separator]              = colors[ImGuiCol_Border];
        colors[ImGuiCol_SeparatorHovered]       = Hovered(colors[ImGuiCol_Separator]);
        colors[ImGuiCol_SeparatorActive]        = Active(colors[ImGuiCol_Separator]);
        colors[ImGuiCol_ResizeGrip]             = GetColor(MainColor, Alpha20);
        colors[ImGuiCol_ResizeGripHovered]      = Hovered(colors[ImGuiCol_ResizeGrip]);
        colors[ImGuiCol_ResizeGripActive]       = Active(colors[ImGuiCol_ResizeGrip]);
        colors[ImGuiCol_Tab]                    = GetColor(MainColor, Alpha60);
        colors[ImGuiCol_TabHovered]             = Hovered(colors[ImGuiCol_Tab]);
        colors[ImGuiCol_TabActive]              = Active(colors[ImGuiCol_Tab]);
        colors[ImGuiCol_TabUnfocused]           = colors[ImGuiCol_Tab];
        colors[ImGuiCol_TabUnfocusedActive]     = colors[ImGuiCol_TabActive];
        colors[ImGuiCol_DockingPreview]         = Darken(colors[ImGuiCol_HeaderActive], 0.2f);
        colors[ImGuiCol_DockingEmptyBg]         = Darken(colors[ImGuiCol_HeaderActive], 0.6f);
        colors[ImGuiCol_PlotLines]              = GetColor(HighlightColor);
        colors[ImGuiCol_PlotLinesHovered]       = Hovered(colors[ImGuiCol_PlotLines]);
        colors[ImGuiCol_PlotHistogram]          = GetColor(HighlightColor);
        colors[ImGuiCol_PlotHistogramHovered]   = Hovered(colors[ImGuiCol_PlotHistogram]);
        colors[ImGuiCol_TextSelectedBg]         = GetColor(HighlightColor, Alpha40);
        colors[ImGuiCol_DragDropTarget]         = GetColor(HighlightColor, Alpha80);;
        colors[ImGuiCol_NavHighlight]           = GetColor(White);
        colors[ImGuiCol_NavWindowingHighlight]  = GetColor(White, Alpha80);
        colors[ImGuiCol_NavWindowingDimBg]      = GetColor(White, Alpha20);
        colors[ImGuiCol_ModalWindowDimBg]       = GetColor(Black, Alpha60);

        ImGui::GetStyle().WindowMenuButtonPosition = ImGuiDir_Right;
    }
};`

Noch ein dunkles Thema:
image

    imGuiIO.Fonts->AddFontFromFileTTF("../data/Fonts/Ruda-Bold.ttf", 15.0f, &config);
    ImGui::GetStyle().FrameRounding = 4.0f;
    ImGui::GetStyle().GrabRounding = 4.0f;

    ImVec4* colors = ImGui::GetStyle().Colors;
    colors[ImGuiCol_Text] = ImVec4(0.95f, 0.96f, 0.98f, 1.00f);
    colors[ImGuiCol_TextDisabled] = ImVec4(0.36f, 0.42f, 0.47f, 1.00f);
    colors[ImGuiCol_WindowBg] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
    colors[ImGuiCol_ChildBg] = ImVec4(0.15f, 0.18f, 0.22f, 1.00f);
    colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
    colors[ImGuiCol_Border] = ImVec4(0.08f, 0.10f, 0.12f, 1.00f);
    colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    colors[ImGuiCol_FrameBg] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f);
    colors[ImGuiCol_FrameBgHovered] = ImVec4(0.12f, 0.20f, 0.28f, 1.00f);
    colors[ImGuiCol_FrameBgActive] = ImVec4(0.09f, 0.12f, 0.14f, 1.00f);
    colors[ImGuiCol_TitleBg] = ImVec4(0.09f, 0.12f, 0.14f, 0.65f);
    colors[ImGuiCol_TitleBgActive] = ImVec4(0.08f, 0.10f, 0.12f, 1.00f);
    colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
    colors[ImGuiCol_MenuBarBg] = ImVec4(0.15f, 0.18f, 0.22f, 1.00f);
    colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.39f);
    colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.18f, 0.22f, 0.25f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.09f, 0.21f, 0.31f, 1.00f);
    colors[ImGuiCol_CheckMark] = ImVec4(0.28f, 0.56f, 1.00f, 1.00f);
    colors[ImGuiCol_SliderGrab] = ImVec4(0.28f, 0.56f, 1.00f, 1.00f);
    colors[ImGuiCol_SliderGrabActive] = ImVec4(0.37f, 0.61f, 1.00f, 1.00f);
    colors[ImGuiCol_Button] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f);
    colors[ImGuiCol_ButtonHovered] = ImVec4(0.28f, 0.56f, 1.00f, 1.00f);
    colors[ImGuiCol_ButtonActive] = ImVec4(0.06f, 0.53f, 0.98f, 1.00f);
    colors[ImGuiCol_Header] = ImVec4(0.20f, 0.25f, 0.29f, 0.55f);
    colors[ImGuiCol_HeaderHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f);
    colors[ImGuiCol_HeaderActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
    colors[ImGuiCol_Separator] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f);
    colors[ImGuiCol_SeparatorHovered] = ImVec4(0.10f, 0.40f, 0.75f, 0.78f);
    colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.40f, 0.75f, 1.00f);
    colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.59f, 0.98f, 0.25f);
    colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
    colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
    colors[ImGuiCol_Tab] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
    colors[ImGuiCol_TabHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f);
    colors[ImGuiCol_TabActive] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f);
    colors[ImGuiCol_TabUnfocused] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
    colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f);
    colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
    colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
    colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
    colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
    colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
    colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
    colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
    colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
    colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
    colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);

Klassisches Steam / Half-Life VGUI-Thema

image

    ImVec4* colors = ImGui::GetStyle().Colors;
    colors[ImGuiCol_Text]                              = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
    colors[ImGuiCol_TextDisabled]              = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
    colors[ImGuiCol_WindowBg]                          = ImVec4(0.29f, 0.34f, 0.26f, 1.00f);
    colors[ImGuiCol_ChildBg]                                = ImVec4(0.29f, 0.34f, 0.26f, 1.00f);
    colors[ImGuiCol_PopupBg]                                = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
    colors[ImGuiCol_Border]                          = ImVec4(0.54f, 0.57f, 0.51f, 0.50f);
    colors[ImGuiCol_BorderShadow]              = ImVec4(0.14f, 0.16f, 0.11f, 0.52f);
    colors[ImGuiCol_FrameBg]                                = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
    colors[ImGuiCol_FrameBgHovered]          = ImVec4(0.27f, 0.30f, 0.23f, 1.00f);
    colors[ImGuiCol_FrameBgActive]            = ImVec4(0.30f, 0.34f, 0.26f, 1.00f);
    colors[ImGuiCol_TitleBg]                                = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
    colors[ImGuiCol_TitleBgActive]            = ImVec4(0.29f, 0.34f, 0.26f, 1.00f);
    colors[ImGuiCol_TitleBgCollapsed]          = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
    colors[ImGuiCol_MenuBarBg]                        = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
    colors[ImGuiCol_ScrollbarBg]                    = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
    colors[ImGuiCol_ScrollbarGrab]            = ImVec4(0.28f, 0.32f, 0.24f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabHovered]   = ImVec4(0.25f, 0.30f, 0.22f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabActive]    = ImVec4(0.23f, 0.27f, 0.21f, 1.00f);
    colors[ImGuiCol_CheckMark]                        = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
    colors[ImGuiCol_SliderGrab]                      = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
    colors[ImGuiCol_SliderGrabActive]          = ImVec4(0.54f, 0.57f, 0.51f, 0.50f);
    colors[ImGuiCol_Button]                          = ImVec4(0.29f, 0.34f, 0.26f, 0.40f);
    colors[ImGuiCol_ButtonHovered]            = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
    colors[ImGuiCol_ButtonActive]              = ImVec4(0.54f, 0.57f, 0.51f, 0.50f);
    colors[ImGuiCol_Header]                          = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
    colors[ImGuiCol_HeaderHovered]            = ImVec4(0.35f, 0.42f, 0.31f, 0.6f);
    colors[ImGuiCol_HeaderActive]              = ImVec4(0.54f, 0.57f, 0.51f, 0.50f);
    colors[ImGuiCol_Separator]                        = ImVec4(0.14f, 0.16f, 0.11f, 1.00f);
    colors[ImGuiCol_SeparatorHovered]          = ImVec4(0.54f, 0.57f, 0.51f, 1.00f);
    colors[ImGuiCol_SeparatorActive]                = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
    colors[ImGuiCol_ResizeGrip]                      = ImVec4(0.19f, 0.23f, 0.18f, 0.00f); // grip invis
    colors[ImGuiCol_ResizeGripHovered]        = ImVec4(0.54f, 0.57f, 0.51f, 1.00f);
    colors[ImGuiCol_ResizeGripActive]          = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
    colors[ImGuiCol_Tab]                                    = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
    colors[ImGuiCol_TabHovered]                      = ImVec4(0.54f, 0.57f, 0.51f, 0.78f);
    colors[ImGuiCol_TabActive]                        = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
    colors[ImGuiCol_TabUnfocused]              = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
    colors[ImGuiCol_TabUnfocusedActive]      = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
    colors[ImGuiCol_DockingPreview]          = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
    colors[ImGuiCol_DockingEmptyBg]          = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
    colors[ImGuiCol_PlotLines]                        = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
    colors[ImGuiCol_PlotLinesHovered]          = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
    colors[ImGuiCol_PlotHistogram]            = ImVec4(1.00f, 0.78f, 0.28f, 1.00f);
    colors[ImGuiCol_PlotHistogramHovered]   = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
    colors[ImGuiCol_TextSelectedBg]          = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
    colors[ImGuiCol_DragDropTarget]          = ImVec4(0.73f, 0.67f, 0.24f, 1.00f);
    colors[ImGuiCol_NavHighlight]              = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
    colors[ImGuiCol_NavWindowingHighlight]  = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
    colors[ImGuiCol_NavWindowingDimBg]        = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
    colors[ImGuiCol_ModalWindowDimBg]          = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);

    ImGuiStyle& style = ImGui::GetStyle();
    style.FrameBorderSize = 1.0f;
    style.WindowRounding = 0.0f;
    style.ChildRounding = 0.0f;
    style.FrameRounding = 0.0f;
    style.PopupRounding = 0.0f;
    style.ScrollbarRounding = 0.0f;
    style.GrabRounding = 0.0f;
    style.TabRounding = 0.0f;

Thema im Gold- und Schwarzstil, passend zum Kunststil von Deus Ex: Human Revolution.

image

    ImGuiStyle* style = &ImGui::GetStyle();
    ImVec4* colors = style->Colors;

    colors[ImGuiCol_Text]                   = ImVec4(0.92f, 0.92f, 0.92f, 1.00f);
    colors[ImGuiCol_TextDisabled]           = ImVec4(0.44f, 0.44f, 0.44f, 1.00f);
    colors[ImGuiCol_WindowBg]               = ImVec4(0.06f, 0.06f, 0.06f, 1.00f);
    colors[ImGuiCol_ChildBg]                = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    colors[ImGuiCol_PopupBg]                = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
    colors[ImGuiCol_Border]                 = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
    colors[ImGuiCol_BorderShadow]           = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    colors[ImGuiCol_FrameBg]                = ImVec4(0.11f, 0.11f, 0.11f, 1.00f);
    colors[ImGuiCol_FrameBgHovered]         = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
    colors[ImGuiCol_FrameBgActive]          = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
    colors[ImGuiCol_TitleBg]                = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
    colors[ImGuiCol_TitleBgActive]          = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
    colors[ImGuiCol_TitleBgCollapsed]       = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
    colors[ImGuiCol_MenuBarBg]              = ImVec4(0.11f, 0.11f, 0.11f, 1.00f);
    colors[ImGuiCol_ScrollbarBg]            = ImVec4(0.06f, 0.06f, 0.06f, 0.53f);
    colors[ImGuiCol_ScrollbarGrab]          = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabHovered]   = ImVec4(0.47f, 0.47f, 0.47f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabActive]    = ImVec4(0.81f, 0.83f, 0.81f, 1.00f);
    colors[ImGuiCol_CheckMark]              = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
    colors[ImGuiCol_SliderGrab]             = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
    colors[ImGuiCol_SliderGrabActive]       = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
    colors[ImGuiCol_Button]                 = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
    colors[ImGuiCol_ButtonHovered]          = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
    colors[ImGuiCol_ButtonActive]           = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
    colors[ImGuiCol_Header]                 = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
    colors[ImGuiCol_HeaderHovered]          = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
    colors[ImGuiCol_HeaderActive]           = ImVec4(0.93f, 0.65f, 0.14f, 1.00f);
    colors[ImGuiCol_Separator]              = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
    colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
    colors[ImGuiCol_SeparatorActive]        = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
    colors[ImGuiCol_ResizeGrip]             = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
    colors[ImGuiCol_ResizeGripHovered]      = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
    colors[ImGuiCol_ResizeGripActive]       = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
    colors[ImGuiCol_Tab]                    = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
    colors[ImGuiCol_TabHovered]             = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
    colors[ImGuiCol_TabActive]              = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
    colors[ImGuiCol_TabUnfocused]           = ImVec4(0.07f, 0.10f, 0.15f, 0.97f);
    colors[ImGuiCol_TabUnfocusedActive]     = ImVec4(0.14f, 0.26f, 0.42f, 1.00f);
    colors[ImGuiCol_PlotLines]              = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
    colors[ImGuiCol_PlotLinesHovered]       = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
    colors[ImGuiCol_PlotHistogram]          = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
    colors[ImGuiCol_PlotHistogramHovered]   = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
    colors[ImGuiCol_TextSelectedBg]         = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
    colors[ImGuiCol_DragDropTarget]         = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
    colors[ImGuiCol_NavHighlight]           = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
    colors[ImGuiCol_NavWindowingHighlight]  = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
    colors[ImGuiCol_NavWindowingDimBg]      = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
    colors[ImGuiCol_ModalWindowDimBg]       = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);

    style->FramePadding = ImVec2(4, 2);
    style->ItemSpacing = ImVec2(10, 2);
    style->IndentSpacing = 12;
    style->ScrollbarSize = 10;

    style->WindowRounding = 4;
    style->FrameRounding = 4;
    style->PopupRounding = 4;
    style->ScrollbarRounding = 6;
    style->GrabRounding = 4;
    style->TabRounding = 4;

    style->WindowTitleAlign = ImVec2(1.0f, 0.5f);
    style->WindowMenuButtonPosition = ImGuiDir_Right;

    style->DisplaySafeAreaPadding = ImVec2(4, 4);

SonicRiders_Ahl9Mhw7S2

C # (DearImguiSharp / My Own Wrapper)

var io = ImGui.GetIO();
var fontPath = Path.Combine(modFolder, "Assets/Fonts/Ruda-Bold.ttf");
var font = ImGui.ImFontAtlasAddFontFromFileTTF(io.Fonts, fontPath, 15.0f, null, ref Unsafe.AsRef<ushort>((void*)0x0));
if (font != null) 
    io.FontDefault = font;

var style = ImGui.GetStyle();
style.FrameRounding = 4.0f;
style.WindowBorderSize = 0.0f;
style.PopupBorderSize = 0.0f;
style.GrabRounding = 4.0f;

var colors = style.Colors;
colors[(int) ImGuiCol.ImGuiColText] = new Vector4(1.00f, 1.00f, 1.00f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTextDisabled] = new Vector4(0.73f, 0.75f, 0.74f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColWindowBg] = new Vector4(0.09f, 0.09f, 0.09f, 0.94f).ToImVec();
colors[(int) ImGuiCol.ImGuiColChildBg] = new Vector4(0.00f, 0.00f, 0.00f, 0.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColPopupBg] = new Vector4(0.08f, 0.08f, 0.08f, 0.94f).ToImVec();
colors[(int) ImGuiCol.ImGuiColBorder] = new Vector4(0.20f, 0.20f, 0.20f, 0.50f).ToImVec();
colors[(int) ImGuiCol.ImGuiColBorderShadow] = new Vector4(0.00f, 0.00f, 0.00f, 0.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColFrameBg] = new Vector4(0.71f, 0.39f, 0.39f, 0.54f).ToImVec();
colors[(int) ImGuiCol.ImGuiColFrameBgHovered] = new Vector4(0.84f, 0.66f, 0.66f, 0.40f).ToImVec();
colors[(int) ImGuiCol.ImGuiColFrameBgActive] = new Vector4(0.84f, 0.66f, 0.66f, 0.67f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTitleBg] = new Vector4(0.47f, 0.22f, 0.22f, 0.67f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTitleBgActive] = new Vector4(0.47f, 0.22f, 0.22f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTitleBgCollapsed] = new Vector4(0.47f, 0.22f, 0.22f, 0.67f).ToImVec();
colors[(int) ImGuiCol.ImGuiColMenuBarBg] = new Vector4(0.34f, 0.16f, 0.16f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColScrollbarBg] = new Vector4(0.02f, 0.02f, 0.02f, 0.53f).ToImVec();
colors[(int) ImGuiCol.ImGuiColScrollbarGrab] = new Vector4(0.31f, 0.31f, 0.31f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColScrollbarGrabHovered] = new Vector4(0.41f, 0.41f, 0.41f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColScrollbarGrabActive] = new Vector4(0.51f, 0.51f, 0.51f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColCheckMark] = new Vector4(1.00f, 1.00f, 1.00f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColSliderGrab] = new Vector4(0.71f, 0.39f, 0.39f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColSliderGrabActive] = new Vector4(0.84f, 0.66f, 0.66f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColButton] = new Vector4(0.47f, 0.22f, 0.22f, 0.65f).ToImVec();
colors[(int) ImGuiCol.ImGuiColButtonHovered] = new Vector4(0.71f, 0.39f, 0.39f, 0.65f).ToImVec();
colors[(int) ImGuiCol.ImGuiColButtonActive] = new Vector4(0.20f, 0.20f, 0.20f, 0.50f).ToImVec();
colors[(int) ImGuiCol.ImGuiColHeader] = new Vector4(0.71f, 0.39f, 0.39f, 0.54f).ToImVec();
colors[(int) ImGuiCol.ImGuiColHeaderHovered] = new Vector4(0.84f, 0.66f, 0.66f, 0.65f).ToImVec();
colors[(int) ImGuiCol.ImGuiColHeaderActive] = new Vector4(0.84f, 0.66f, 0.66f, 0.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColSeparator] = new Vector4(0.43f, 0.43f, 0.50f, 0.50f).ToImVec();
colors[(int) ImGuiCol.ImGuiColSeparatorHovered] = new Vector4(0.71f, 0.39f, 0.39f, 0.54f).ToImVec();
colors[(int) ImGuiCol.ImGuiColSeparatorActive] = new Vector4(0.71f, 0.39f, 0.39f, 0.54f).ToImVec();
colors[(int) ImGuiCol.ImGuiColResizeGrip] = new Vector4(0.71f, 0.39f, 0.39f, 0.54f).ToImVec();
colors[(int) ImGuiCol.ImGuiColResizeGripHovered] = new Vector4(0.84f, 0.66f, 0.66f, 0.66f).ToImVec();
colors[(int) ImGuiCol.ImGuiColResizeGripActive] = new Vector4(0.84f, 0.66f, 0.66f, 0.66f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTab] = new Vector4(0.71f, 0.39f, 0.39f, 0.54f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTabHovered] = new Vector4(0.84f, 0.66f, 0.66f, 0.66f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTabActive] = new Vector4(0.84f, 0.66f, 0.66f, 0.66f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTabUnfocused] = new Vector4(0.07f, 0.10f, 0.15f, 0.97f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTabUnfocusedActive] = new Vector4(0.14f, 0.26f, 0.42f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColPlotLines] = new Vector4(0.61f, 0.61f, 0.61f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColPlotLinesHovered] = new Vector4(1.00f, 0.43f, 0.35f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColPlotHistogram] = new Vector4(0.90f, 0.70f, 0.00f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColPlotHistogramHovered] = new Vector4(1.00f, 0.60f, 0.00f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColTextSelectedBg] = new Vector4(0.26f, 0.59f, 0.98f, 0.35f).ToImVec();
colors[(int) ImGuiCol.ImGuiColDragDropTarget] = new Vector4(1.00f, 1.00f, 0.00f, 0.90f).ToImVec();
colors[(int) ImGuiCol.ImGuiColNavHighlight] = new Vector4(0.41f, 0.41f, 0.41f, 1.00f).ToImVec();
colors[(int) ImGuiCol.ImGuiColNavWindowingHighlight] = new Vector4(1.00f, 1.00f, 1.00f, 0.70f).ToImVec();
colors[(int) ImGuiCol.ImGuiColNavWindowingDimBg] = new Vector4(0.80f, 0.80f, 0.80f, 0.20f).ToImVec();
colors[(int) ImGuiCol.ImGuiColModalWindowDimBg] = new Vector4(0.80f, 0.80f, 0.80f, 0.35f).ToImVec();
style.Colors = colors;

C ++

// Sorry if there's any errors here, I translated this back by hand.
auto& io = ImGui::GetIO();
io.Fonts->AddFontFromFileTTF("Assets/Fonts//Ruda-Bold.ttf", 15.0f, &config);

auto& style = ImGui::GetStyle();
style.FrameRounding = 4.0f;
style.WindowBorderSize = 0.0f;
style.PopupBorderSize = 0.0f;
style.GrabRounding = 4.0f;

ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Text]                   = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_TextDisabled]           = ImVec4(0.73f, 0.75f, 0.74f, 1.00f);
colors[ImGuiCol_WindowBg]               = ImVec4(0.09f, 0.09f, 0.09f, 0.94f);
colors[ImGuiCol_ChildBg]                = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_PopupBg]                = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
colors[ImGuiCol_Border]                 = ImVec4(0.20f, 0.20f, 0.20f, 0.50f);
colors[ImGuiCol_BorderShadow]           = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_FrameBg]                = ImVec4(0.71f, 0.39f, 0.39f, 0.54f);
colors[ImGuiCol_FrameBgHovered]         = ImVec4(0.84f, 0.66f, 0.66f, 0.40f);
colors[ImGuiCol_FrameBgActive]          = ImVec4(0.84f, 0.66f, 0.66f, 0.67f);
colors[ImGuiCol_TitleBg]                = ImVec4(0.47f, 0.22f, 0.22f, 0.67f);
colors[ImGuiCol_TitleBgActive]          = ImVec4(0.47f, 0.22f, 0.22f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed]       = ImVec4(0.47f, 0.22f, 0.22f, 0.67f);
colors[ImGuiCol_MenuBarBg]              = ImVec4(0.34f, 0.16f, 0.16f, 1.00f);
colors[ImGuiCol_ScrollbarBg]            = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
colors[ImGuiCol_ScrollbarGrab]          = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
colors[ImGuiCol_ScrollbarGrabHovered]   = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
colors[ImGuiCol_ScrollbarGrabActive]    = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
colors[ImGuiCol_CheckMark]              = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_SliderGrab]             = ImVec4(0.71f, 0.39f, 0.39f, 1.00f);
colors[ImGuiCol_SliderGrabActive]       = ImVec4(0.84f, 0.66f, 0.66f, 1.00f);
colors[ImGuiCol_Button]                 = ImVec4(0.47f, 0.22f, 0.22f, 0.65f);
colors[ImGuiCol_ButtonHovered]          = ImVec4(0.71f, 0.39f, 0.39f, 0.65f);
colors[ImGuiCol_ButtonActive]           = ImVec4(0.20f, 0.20f, 0.20f, 0.50f);
colors[ImGuiCol_Header]                 = ImVec4(0.71f, 0.39f, 0.39f, 0.54f);
colors[ImGuiCol_HeaderHovered]          = ImVec4(0.84f, 0.66f, 0.66f, 0.65f);
colors[ImGuiCol_HeaderActive]           = ImVec4(0.84f, 0.66f, 0.66f, 0.00f);
colors[ImGuiCol_Separator]              = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.71f, 0.39f, 0.39f, 0.54f);
colors[ImGuiCol_SeparatorActive]        = ImVec4(0.71f, 0.39f, 0.39f, 0.54f);
colors[ImGuiCol_ResizeGrip]             = ImVec4(0.71f, 0.39f, 0.39f, 0.54f);
colors[ImGuiCol_ResizeGripHovered]      = ImVec4(0.84f, 0.66f, 0.66f, 0.66f);
colors[ImGuiCol_ResizeGripActive]       = ImVec4(0.84f, 0.66f, 0.66f, 0.66f);
colors[ImGuiCol_Tab]                    = ImVec4(0.71f, 0.39f, 0.39f, 0.54f);
colors[ImGuiCol_TabHovered]             = ImVec4(0.84f, 0.66f, 0.66f, 0.66f);
colors[ImGuiCol_TabActive]              = ImVec4(0.84f, 0.66f, 0.66f, 0.66f);
colors[ImGuiCol_TabUnfocused]           = ImVec4(0.07f, 0.10f, 0.15f, 0.97f);
colors[ImGuiCol_TabUnfocusedActive]     = ImVec4(0.14f, 0.26f, 0.42f, 1.00f);
colors[ImGuiCol_PlotLines]              = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
colors[ImGuiCol_PlotLinesHovered]       = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
colors[ImGuiCol_PlotHistogram]          = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogramHovered]   = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
colors[ImGuiCol_TextSelectedBg]         = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
colors[ImGuiCol_DragDropTarget]         = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
colors[ImGuiCol_NavHighlight]           = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
colors[ImGuiCol_NavWindowingHighlight]  = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
colors[ImGuiCol_NavWindowingDimBg]      = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
colors[ImGuiCol_ModalWindowDimBg]       = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);

Das Spiel im Hintergrund ist Sonic Riders aus dem Jahr 2006. Ich benutze zum ersten Mal dear imgui und wollte etwas zum Testen. Ich liebe die Bibliothek so weit.

Ich habe ein Visual Studio-ähnliches Thema für
screenshot

constexpr auto ColorFromBytes = [](uint8_t r, uint8_t g, uint8_t b)
{
    return ImVec4((float)r / 255.0f, (float)g / 255.0f, (float)b / 255.0f, 1.0f);
};

auto& style = ImGui::GetStyle();
ImVec4* colors = style.Colors;

const ImVec4 bgColor           = ColorFromBytes(37, 37, 38);
const ImVec4 lightBgColor      = ColorFromBytes(82, 82, 85);
const ImVec4 veryLightBgColor  = ColorFromBytes(90, 90, 95);

const ImVec4 panelColor        = ColorFromBytes(51, 51, 55);
const ImVec4 panelHoverColor   = ColorFromBytes(29, 151, 236);
const ImVec4 panelActiveColor  = ColorFromBytes(0, 119, 200);

const ImVec4 textColor         = ColorFromBytes(255, 255, 255);
const ImVec4 textDisabledColor = ColorFromBytes(151, 151, 151);
const ImVec4 borderColor       = ColorFromBytes(78, 78, 78);

colors[ImGuiCol_Text]                 = textColor;
colors[ImGuiCol_TextDisabled]         = textDisabledColor;
colors[ImGuiCol_TextSelectedBg]       = panelActiveColor;
colors[ImGuiCol_WindowBg]             = bgColor;
colors[ImGuiCol_ChildBg]              = bgColor;
colors[ImGuiCol_PopupBg]              = bgColor;
colors[ImGuiCol_Border]               = borderColor;
colors[ImGuiCol_BorderShadow]         = borderColor;
colors[ImGuiCol_FrameBg]              = panelColor;
colors[ImGuiCol_FrameBgHovered]       = panelHoverColor;
colors[ImGuiCol_FrameBgActive]        = panelActiveColor;
colors[ImGuiCol_TitleBg]              = bgColor;
colors[ImGuiCol_TitleBgActive]        = bgColor;
colors[ImGuiCol_TitleBgCollapsed]     = bgColor;
colors[ImGuiCol_MenuBarBg]            = panelColor;
colors[ImGuiCol_ScrollbarBg]          = panelColor;
colors[ImGuiCol_ScrollbarGrab]        = lightBgColor;
colors[ImGuiCol_ScrollbarGrabHovered] = veryLightBgColor;
colors[ImGuiCol_ScrollbarGrabActive]  = veryLightBgColor;
colors[ImGuiCol_CheckMark]            = panelActiveColor;
colors[ImGuiCol_SliderGrab]           = panelHoverColor;
colors[ImGuiCol_SliderGrabActive]     = panelActiveColor;
colors[ImGuiCol_Button]               = panelColor;
colors[ImGuiCol_ButtonHovered]        = panelHoverColor;
colors[ImGuiCol_ButtonActive]         = panelHoverColor;
colors[ImGuiCol_Header]               = panelColor;
colors[ImGuiCol_HeaderHovered]        = panelHoverColor;
colors[ImGuiCol_HeaderActive]         = panelActiveColor;
colors[ImGuiCol_Separator]            = borderColor;
colors[ImGuiCol_SeparatorHovered]     = borderColor;
colors[ImGuiCol_SeparatorActive]      = borderColor;
colors[ImGuiCol_ResizeGrip]           = bgColor;
colors[ImGuiCol_ResizeGripHovered]    = panelColor;
colors[ImGuiCol_ResizeGripActive]     = lightBgColor;
colors[ImGuiCol_PlotLines]            = panelActiveColor;
colors[ImGuiCol_PlotLinesHovered]     = panelHoverColor;
colors[ImGuiCol_PlotHistogram]        = panelActiveColor;
colors[ImGuiCol_PlotHistogramHovered] = panelHoverColor;
colors[ImGuiCol_ModalWindowDarkening] = bgColor;
colors[ImGuiCol_DragDropTarget]       = bgColor;
colors[ImGuiCol_NavHighlight]         = bgColor;
colors[ImGuiCol_DockingPreview]       = panelActiveColor;
colors[ImGuiCol_Tab]                  = bgColor;
colors[ImGuiCol_TabActive]            = panelActiveColor;
colors[ImGuiCol_TabUnfocused]         = bgColor;
colors[ImGuiCol_TabUnfocusedActive]   = panelActiveColor;
colors[ImGuiCol_TabHovered]           = panelHoverColor;

style.WindowRounding    = 0.0f;
style.ChildRounding     = 0.0f;
style.FrameRounding     = 0.0f;
style.GrabRounding      = 0.0f;
style.PopupRounding     = 0.0f;
style.ScrollbarRounding = 0.0f;
style.TabRounding       = 0.0f;

Das dunkle Thema meiner Spiel-Engine :
ImguiTheme

ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_Text]                  = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
style.Colors[ImGuiCol_TextDisabled]          = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
style.Colors[ImGuiCol_WindowBg]              = ImVec4(0.13f, 0.14f, 0.15f, 1.00f);
style.Colors[ImGuiCol_ChildBg]               = ImVec4(0.13f, 0.14f, 0.15f, 1.00f);
style.Colors[ImGuiCol_PopupBg]               = ImVec4(0.13f, 0.14f, 0.15f, 1.00f);
style.Colors[ImGuiCol_Border]                = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
style.Colors[ImGuiCol_BorderShadow]          = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
style.Colors[ImGuiCol_FrameBg]               = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
style.Colors[ImGuiCol_FrameBgHovered]        = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
style.Colors[ImGuiCol_FrameBgActive]         = ImVec4(0.67f, 0.67f, 0.67f, 0.39f);
style.Colors[ImGuiCol_TitleBg]               = ImVec4(0.08f, 0.08f, 0.09f, 1.00f);
style.Colors[ImGuiCol_TitleBgActive]         = ImVec4(0.08f, 0.08f, 0.09f, 1.00f);
style.Colors[ImGuiCol_TitleBgCollapsed]      = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
style.Colors[ImGuiCol_MenuBarBg]             = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
style.Colors[ImGuiCol_ScrollbarBg]           = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
style.Colors[ImGuiCol_ScrollbarGrab]         = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
style.Colors[ImGuiCol_ScrollbarGrabHovered]  = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
style.Colors[ImGuiCol_ScrollbarGrabActive]   = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
style.Colors[ImGuiCol_CheckMark]             = ImVec4(0.11f, 0.64f, 0.92f, 1.00f);
style.Colors[ImGuiCol_SliderGrab]            = ImVec4(0.11f, 0.64f, 0.92f, 1.00f);
style.Colors[ImGuiCol_SliderGrabActive]      = ImVec4(0.08f, 0.50f, 0.72f, 1.00f);
style.Colors[ImGuiCol_Button]                = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
style.Colors[ImGuiCol_ButtonHovered]         = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
style.Colors[ImGuiCol_ButtonActive]          = ImVec4(0.67f, 0.67f, 0.67f, 0.39f);
style.Colors[ImGuiCol_Header]                = ImVec4(0.22f, 0.22f, 0.22f, 1.00f);
style.Colors[ImGuiCol_HeaderHovered]         = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
style.Colors[ImGuiCol_HeaderActive]          = ImVec4(0.67f, 0.67f, 0.67f, 0.39f);
style.Colors[ImGuiCol_Separator]             = style.Colors[ImGuiCol_Border];
style.Colors[ImGuiCol_SeparatorHovered]      = ImVec4(0.41f, 0.42f, 0.44f, 1.00f);
style.Colors[ImGuiCol_SeparatorActive]       = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
style.Colors[ImGuiCol_ResizeGrip]            = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
style.Colors[ImGuiCol_ResizeGripHovered]     = ImVec4(0.29f, 0.30f, 0.31f, 0.67f);
style.Colors[ImGuiCol_ResizeGripActive]      = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
style.Colors[ImGuiCol_Tab]                   = ImVec4(0.08f, 0.08f, 0.09f, 0.83f);
style.Colors[ImGuiCol_TabHovered]            = ImVec4(0.33f, 0.34f, 0.36f, 0.83f);
style.Colors[ImGuiCol_TabActive]             = ImVec4(0.23f, 0.23f, 0.24f, 1.00f);
style.Colors[ImGuiCol_TabUnfocused]          = ImVec4(0.08f, 0.08f, 0.09f, 1.00f);
style.Colors[ImGuiCol_TabUnfocusedActive]    = ImVec4(0.13f, 0.14f, 0.15f, 1.00f);
style.Colors[ImGuiCol_DockingPreview]        = ImVec4(0.26f, 0.59f, 0.98f, 0.70f);
style.Colors[ImGuiCol_DockingEmptyBg]        = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
style.Colors[ImGuiCol_PlotLines]             = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
style.Colors[ImGuiCol_PlotLinesHovered]      = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
style.Colors[ImGuiCol_PlotHistogram]         = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
style.Colors[ImGuiCol_PlotHistogramHovered]  = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
style.Colors[ImGuiCol_TextSelectedBg]        = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
style.Colors[ImGuiCol_DragDropTarget]        = ImVec4(0.11f, 0.64f, 0.92f, 1.00f);
style.Colors[ImGuiCol_NavHighlight]          = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
style.Colors[ImGuiCol_NavWindowingDimBg]     = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
style.Colors[ImGuiCol_ModalWindowDimBg]      = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
style.GrabRounding                           = style.FrameRounding = 2.3f;
War diese Seite hilfreich?
5 / 5 - 1 Bewertungen