Imgui: Posting gaya / tema warna Anda di sini

Dibuat pada 19 Jun 2016  ·  43Komentar  ·  Sumber: ocornut/imgui

Saya telah memutuskan untuk menyertakan beberapa tema warna yang lebih baik dalam kemasan default, mungkin segera setelah rilis berikutnya (1.50).

Alasannya adalah saya ingin melakukannya untuk mengurangi kesan orang-orang yang sebenarnya terlalu banyak mengotak-atik gaya sendiri. Sebagian kecil karena ini memakan waktu orang, dan sebagian besar karena tema khusus lebih mudah dirusak dan menciptakan situasi di mana saya lebih berhati-hati untuk mengubah sistem gaya. Jadi saya berharap untuk memberikan dasar yang lebih baik dengan tema bernama yang disukai orang, yang kami pertahankan dan tidak mendorong orang untuk melakukan terlalu banyak skinning sampai ImGui benar-benar siap untuk itu.

1.A.
Saya ingin meningkatkan tema default yang ada. Kemungkinan besar, warna tombol utama perlu diubah, sekarang terlihat paling buruk. Sedikit perubahan pada tema default saat ini akan menjadi langkah penyegar yang baik. Jika Anda sedang ingin berkreasi, silakan coba untuk mengubah tema default :)

1.B.
Saya ingin menambahkan tema baru. Kirimkan milik Anda dengan screenshot yang sesuai di sini! Saya berpikir mungkin setidaknya tema hitam-ish, tema putih-ish. Mungkin satu atau dua lagi. Saat membahas, kita perlu mempertimbangkan bahwa jendela yang sedikit transparan berguna bagi banyak pengguna yang menumpuk jendela di atas game / konten mereka. Meskipun ini bukan pemecah kesepakatan, alangkah baiknya jika tema berfungsi dengan warna latar belakang yang sepenuhnya buram dan akan memiliki warna yang sedikit transparan. Anda juga dapat mengirimkan hasil jepretan perangkat lunak lain untuk ide / referensi, saya berharap langsung ke intinya dan mendapatkan pengaturan aktual terintegrasi.

2.
Saya juga ingin, jika memungkinkan, menemukan cara praktis untuk menampilkan perubahan font tanpa menambahkan masalah bangunan / kompatibilitas baru ke contoh / aplikasi. Secara khusus, bergantung pada toolset / sistem build yang digunakan, direktori awal dapat berupa variabel dan membuatnya sedikit lebih bekerja untuk menggunakan file eksternal seperti yang dipamerkan di extra_fonts /. Itu bisa dipecahkan.

topik-topik yang berkaitan

438 desain yang disederhanakan

184 desain / warna baru (tidak sedang dikerjakan sekarang).

help wanted in progress style

Komentar yang paling membantu

Tema ceri: 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;
}

Semua 43 komentar

Tema yang saya gunakan diatur melalui fungsi SetupimGuiStyle dalam Inti ini , berdasarkan gaya ringan oleh @itamago .

Saya memodifikasi ini sedikit untuk menyatukan perlakuan alfa, dan menambahkan fungsi untuk beralih antara terang dan gelap dan untuk memvariasikan alfa latar belakang.

Untuk font utama saya menggunakan Roboto-Regular.ttf dengan ukuran 18.0f, dan Fontawesome menggunakan include dari IconFontCppHeaders .

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

Hai @ocornut ,
Bukan niat saya untuk mempercepat Anda: blush:, tetapi apakah Anda memiliki perkiraan waktu rilis untuk 1,50 dengan peningkatan tema ini?

Hal lain: karena setidaknya ada _four_ port tidak resmi dari imgui ke _emscripten_, alangkah baiknya jika memiliki port resmi di dalam pustaka dasar. Di sisi positifnya, sekali wasm webassembly menjadi wajib di browser yang akan datang sebagai bonus gratis.

Hormat saya,

--RM

Maaf, Roberto, saya tidak bisa memberikan ETA. Mulai pertengahan bulan saya akan mengatur ulang pekerjaan pada kontrol navigasi dan warna akan dijaga setelah itu.

Saya juga tidak bisa mengerjakan proyek baru dan apapun-emscripten akan menjadi hal baru untuk dipikirkan. Saya tidak tahu emscripten dan tidak bisa mengambil keputusan. Jika salah satu dari keempat orang itu serius ingin memberi kepada komunitas dan memelihara sesuatu, maka mereka bebas untuk menyelesaikan sendiri proyeknya dan menyerahkan sesuatu ke repo resmi jika menurut mereka itu masuk akal. Setan dalam detail dan menyortir / memelihara / menyajikan adalah banyak pekerjaan yang tidak dapat saya lakukan untuk mereka. Saya tidak dapat memaksakannya atau hanya menyarankan kepada siapa pun, karena sebagian besar kontribusi adalah satu kesempatan dan menambahkan saya lebih banyak pekerjaan. Orang-orang yang berkontribusi tanpa diminta lebih cenderung membuat semuanya berfungsi dalam jangka panjang :)

Hai Omar dan terima kasih atas tanggapannya,
Saya sepenuhnya memahami Anda karena bagi saya waktu juga hari ini adalah sumber yang sangat langka.
Saya melakukan satu port> 1,5 tahun yang lalu untuk meng-emscripten tetapi terus terang saya tidak tahu di mana saya meletakkannya.
Saat ini saya tidak menggunakan imgui dalam proyek saya karena sebagian besar berbasis web dan untuk mendapatkan imgui, saya menunggu perakitan web menjadi standar dan default di semua browser.
Jika dan ketika itu terjadi, saya akan dengan senang hati mem-portingnya dan berkontribusi (dan membuang semua kegilaan perpustakaan CSS / browser / JS untuk solusi mutiplatform yang lebih stabil).

Kontrol navigasi? maksud Anda hal-hal yang lebih bagus seperti panel buruh pelabuhan (terlihat 3 sekitar), manajemen tab? (Saya berharap: senyum :)

Terima kasih atas potongan kode yang bagus dan membuatnya tetap kecil dan sederhana.

--Roberto

Silakan posting gaya Anda di sini!
Untuk 1,50 karena ini adalah angka yang bagus, saya ingin bekerja dan menambahkan tema warna baru itu :)

Saya akan memposting tema saya di sini setelah menyelesaikan pekerjaan saya.
Ngomong-ngomong, Anda memiliki teman artis yang sangat terampil (benfiquet), saya pikir dia bisa membantu dengan ini.

ini milikku
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 : jika mau, Anda dapat memilih beberapa gaya di cabang addon saya: Lihat metode ResetStyle () di sini: https://github.com/Flix01/imgui/blob/imgui_with_addons/addons/imguistyleserializer/imguistyleserializer.cpp

Tidak semuanya terlihat bagus, tapi inilah yang bisa saya lakukan.

PS Beberapa di antaranya bukan milik saya sama sekali: Saya baru saja mengumpulkan (dan terkadang menyesuaikan) gaya dari postingan lain.

NB Anda dapat mencobanya di sini: https://rawgit.com/Flix01/imgui/imgui_with_addons/examples/addons_examples/html/main.html (atribusi penulisan ditampilkan di tooltip Combo, untuk tema yang tidak saya buat).

[Edit:] Apakah Anda akan memindahkan properti ShowBorder dari _ImGuiWindow_ ke _ImStyle_?

Terima kasih untuk tautannya, keduanya.
@ codz01 Ben sebenarnya bukan seorang desainer ux, dia membuat sesuatu yang mengabaikan pertimbangan praktis dunia nyata.
@ Flix01 Terima kasih! Ya, saya harus mengatakan bahwa Anda benar .. Saya mungkin harus mengarahkan perubahan itu di 1,50. Saya bahkan tidak dapat mengingat bagaimana itu berakhir di tempat pertama, mungkin pilihan tergesa-gesa yang saya buat untuk 1,00.

Saya mungkin harus menargetkan perubahan itu di 1,50

@ocornut : ya, saya pikir menyatukan semua masalah terkait gaya dalam rilis yang sama adalah pilihan yang baik.

ya, saya pikir menyatukan semua masalah terkait gaya dalam rilis yang sama adalah pilihan yang baik.

"semua" sedikit optimis. Bahkan mengubah hanya hal perbatasan membutuhkan sedikit desain di muka.

Menyalin untuk referensi, dari https://github.com/procedural/gpulib/
(https://github.com/procedural/gpulib/blob/e0bda0cd486d720a90857df9f7797722265e9312/examples/04%20Dear%20ImGui/main.c)

Ternyata saya semakin tergoda untuk membuat FreeType loader resmi, karena pada ukuran kecil sulit untuk mendapatkan font anti-alias yang bagus.

Hal lainnya adalah banyak gaya yang diuji / dirancang tanpa transparansi atau dengan latar belakang yang diketahui, dan terlihat berbeda adalah salah satu dari perubahan parameter tersebut.

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);
}

Yang lain dari perangkat lunak lama (mungkin tidak mutakhir)

Berdasarkan tema @Pagghiu

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;

Beberapa perubahan kecil pada tema Doug di atas

// 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

Maaf untuk gaya yang tidak membuat banyak kemajuan akhir-akhir ini, kami akan mencoba untuk melanjutkannya pada bulan November.

Saya membuat beberapa perubahan:

  1. Tema Klasik telah dikerjakan ulang sedikit. Secara khusus saya telah mengubah tombol untuk menggunakan nuansa biru, bukan merah muda kemerahan.

image

  1. Tiga fungsi telah ditambahkan:
    StyleColorsClassic() , StyleColorsDark() , StyleColorsLight() .
    Tema tersebut akan dipertahankan (dan ditingkatkan) di pembaruan dan cabang di masa mendatang.

image

image

Saya akan segera menambahkan kombinasi pemilihan font - di antara font yang dimuat, jika hanya untuk menyarankan agar font dapat dimuat. (Segera setelah saya menemukan apa yang harus dilakukan dengan parameter ke-3 dari API BeginCombo internal saat ini.)

  1. Flag ImGuiWindowFlags_ShowBorders window telah dimatikan seluruhnya.
    Itu membuat penggunaan border tidak terlalu memusingkan.
    Alih-alih ada nilai baru style.WindowBorderSize , style.FrameBorderSize , style.PopupBorderSize , dll. Nilainya dimaksudkan untuk menjadi 0.0 dan 1.0 tetapi terlepas dari kinerja dan alasan yang tumpang tindih, sebenarnya mungkin untuk memiliki lebih tebal batas (tergantung pada pengaturan alfa, ini mungkin tidak terlihat bagus).
    Perbatasan saat ini semua warna yang sama, saya akan memperkenalkan opsi yang lebih banyak / lebih baik saat saya mengerjakan ulang sistem gaya tetapi mungkin tidak selama beberapa bulan (lihat ide di # 1223).

  2. Editor gaya sekarang a) Menawarkan untuk memilih di antara tiga tema stok tersebut, b) Menangani Tabungan / Kembalikan sedikit lebih baik sehingga Anda dapat melihat tombol Kembalikan saat mengubah dari tema khusus (daripada selalu dibandingkan dengan tema default), c) Menunjukkan "pengaturan yang disederhanakan" di bagian atas memperlihatkan FrameRounding dan ukuran perbatasan yang berbeda sebagai kotak centang, bukan float.

(Terlambat ke pesta, tapi ...)

Inilah tema saya, yang (kurang lebih) meniru Panduan Desain Microsoft (https://design.microsoft.com/):

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;

Inilah tema saya, yang (kurang lebih) meniru Panduan Desain Microsoft (https://design.microsoft.com/):

Terima kasih! Juga tautan dan contoh itu berguna untuk # 438.

Di antara hal-hal yang hilang dalam sistem gaya, gaya semacam ini akan mendapat manfaat dari batas yang ditingkatkan (lihat misalnya # 447). Dengan itu dan beberapa definisi warna / gaya tambahan, gaya Anda akan lebih baik sebagai hal Microsoft.

Perhatikan bahwa font Anda terlalu rendah, saat ini ada masalah perataan vertikal yang memengaruhi beberapa font:
Anda mungkin ingin melakukan:

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

Perhatikan bahwa font Anda terlalu rendah, saat ini ada masalah perataan vertikal yang memengaruhi beberapa font:
Anda mungkin ingin melakukan:

Ya, sekarang terlihat lebih baik.

Terima kasih! Juga tautan dan contoh itu berguna untuk # 438.

Untuk tautan langsung, coba juga ini: https://docs.microsoft.com/en-us/windows/uwp/design/basics/commanding-basics

FYI, mendorong perubahan kecil beberapa hari yang lalu untuk menggunakan tanda silang di tombol tutup alih-alih lingkaran yang terkenal:

image
image

Isi sorotan (yang melingkar untuk mengakomodasi jendela bulat) menggunakan warna latar belakang tombol sehingga ImGuiCol_CloseButton , ImGuiCol_CloseButtonActive , ImGuiCol_CloseButtonHovered telah sepenuhnya dihapus (ini adalah perubahan yang merusak ), sebagai bagian dari gaya penyederhanaan.

Saya menyukai mereka dari "namapenggunaiwantedwasalreadytaken" (nama pengguna Anda sulit untuk ditulis :-))

Jadi saya pikir akan sangat bersyukur memiliki tema gelap dan terang untuk masing-masing platform (win, Mac, android) yang akan membantu orang-orang yang menginginkan aplikasi itu menjadi lintas platform dan asli, karena pengguna umum tidak diharapkan menyukai tema. yang tidak sesuai dengan jendela os asli.

Terima kasih atas usahanya, imgui adalah perpustakaan yang bagus

@ocornut , saya punya proposal.

Saya pikir tema ImGui harus dapat dibaca dari disk. Dan harus ada beberapa tema yang disediakan termasuk di bawah misc / themes. Alasan saya pikir ini adalah ide yang bagus adalah karena dapat dengan mudah berbagi tema berarti orang lebih suka membuat dan menyesuaikan tema baru.

Apakah Anda akan mendukung proposal seperti itu secara umum? Jika ya, saya dapat mengirim permintaan penarikan akhir minggu ini. :)

@forrestthewoods IMHO Saya pikir itu benar-benar tidak diinginkan saat ini karena sistem gayanya sangat primitif dan akan banyak berubah tahun ini. Satu-satunya hal yang lebih buruk daripada enum waktu kompilasi yang diubah / dihapus adalah menyimpan data pada disk di tempat yang tidak dapat dilacak oleh pemrogram dan dalam format yang akan menjadi usang. Ketahanan data adalah lapisan tanggung jawab lain, dan saya pikir lebih baik kita menerapkannya untuk tetap berada di sisi programmer saat ini.

Saat ini saya lebih suka tidak mendorong orang untuk memperlakukan imgui sebagai perpustakaan yang dapat dikuliti, terutama mengingat betapa primitif dan sempitnya skinning itu. Saat imgui lebih matang / stabil dan sistem gaya memungkinkan penggantian per jenis widget, gradien, dan kami telah menentukan cara mendistribusikan gaya yang bekerja dengan pencampuran yang benar SRGB, dll., Kami dapat merancang format yang lebih stabil.

(Perhatikan bahwa untuk apa yang saat ini ingin Anda lakukan, Anda menggulung solusi Anda dalam selusin baris kode.)

Sepertinya ada kesepakatan bahwa harus ada format file gaya / tema mandiri di titik _some_. Pertanyaannya bukan jika, tapi kapan. Saya cukup senang dengan itu dan sejujurnya bisa meninggalkan konten karena tahu itu akan datang di beberapa titik. Dan perubahan gaya utama yang datang tahun ini adalah argumen yang pantas untuk ditunggu! Meluangkan waktu untuk mendiskusikan format file adalah alasan yang lebih baik.

Saya ingin meluangkan waktu sejenak untuk mengemukakan beberapa alasan mengapa hal itu harus dilakukan lebih cepat daripada nanti. Belum tentu sekarang, tapi lebih cepat.

Pertama, mendorong adopsi. Saat ini Anda secara eksplisit TIDAK menginginkan itu. Yang saya mengerti. Ini masalah ayam dan telur. Saya pikir format file harus diadopsi sebelum sistem gaya siap untuk itu. Karena sistem gaya tidak dapat siap sebelum digunakan. Dan itu tidak akan digunakan sampai lebih mudah untuk dibagikan. Tidak ada rencana pertempuran yang selamat dari kontak pertama dengan musuh; atau format file apa pun. :)

Kedua, perubahan / ekstensi ke format gaya akan selalu merusak. Entah semuanya rusak pada waktu kompilasi karena penghapusan enum. Atau hal-hal "rusak" pada saat run-time karena ada yang bergaya default; karena nilai gaya baru yang belum disetel atau nilai gaya lama yang berubah. Tidak peduli seberapa matang sistem penataannya, jeda ini akan terjadi.

Ketiga, sistem gayanya primitif, tetapi cukup kuat sehingga tema warna yang bagus dapat menghasilkan peningkatan yang besar. Saya tahu kita akan melihat lebih banyak iterasi tentang ini jika tema lebih mudah dibagikan.

Implementasi kerja saya adalah format file kunci / nilai sederhana. Ia bekerja dari sscanf dengan cara yang berasal dari format file ini. Sangat sederhana. Jika format gaya berubah atau diperpanjang, hasil akhirnya adalah nilai gaya yang memiliki nilai bawaannya.

Saya pikir adalah bijaksana untuk menunggu sampai serangkaian perbaikan besar sistem gaya dilakukan. Tapi menurut saya penting untuk mengaktifkan tema yang dapat dibagikan lebih cepat daripada nanti. Dan saya yakin bahwa mengaktifkan tema akan membantu menginformasikan keputusan yang dibuat untuk sistem gaya.

<3

Simulasi buruk pada tema Darcula 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};

@ ice.cinta

Simulasi buruk pada tema Darcula IntelliJ:

Tangkapan layar?

@tokopedia

Tangkapan layar?

image

  • Kiri: imgui dengan gaya Darcula
  • Kanan: IntelliJ IDEA dengan gaya Darcula

Saya ingin membuat proposal tema jika memungkinkan, itu adalah tema abu-abu / gelap.
Saya ingin membuat tema yang mirip dengan UE4 jadi inilah yang saya buat:
capture

Ini kodenya:

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);

Saya harap Anda menyukainya dan bahkan mungkin mengintegrasikannya ke dalam ImGui.

Tema ceri: 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;
}

tema gelap
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;

// Gaya penyiapan
ImVec4 * colors = ImGui :: GetStyle (). Warna;
warna [ImGuiCol_Text] = ImVec4 (1.00f, 1.00f, 1.00f, 0.95f);
warna [ImGuiCol_TextDisabled] = ImVec4 (0,50f, 0,50f, 0,50f, 1.00f);
warna [ImGuiCol_WindowBg] = ImVec4 (0.13f, 0.12f, 0.12f, 1.00f);
warna [ImGuiCol_ChildBg] = ImVec4 (1.00f, 1.00f, 1.00f, 0.00f);
warna [ImGuiCol_PopupBg] = ImVec4 (0.05f, 0.05f, 0.05f, 0.94f);
warna [ImGuiCol_Border] = ImVec4 (0,53f, 0,53f, 0,53f, 0,46f);
warna [ImGuiCol_BorderShadow] = ImVec4 (0.00f, 0.00f, 0.00f, 0.00f);
warna [ImGuiCol_FrameBg] = ImVec4 (0.00f, 0.00f, 0.00f, 0.85f);
warna [ImGuiCol_FrameBgHovered] = ImVec4 (0.22f, 0.22f, 0.22f, 0.40f);
warna [ImGuiCol_FrameBgActive] = ImVec4 (0.16f, 0.16f, 0.16f, 0.53f);
warna [ImGuiCol_TitleBg] = ImVec4 (0.00f, 0.00f, 0.00f, 1.00f);
warna [ImGuiCol_TitleBgActive] = ImVec4 (0.00f, 0.00f, 0.00f, 1.00f);
warna [ImGuiCol_TitleBgCollapsed] = ImVec4 (0.00f, 0.00f, 0.00f, 0.51f);
warna [ImGuiCol_MenuBarBg] = ImVec4 (0.12f, 0.12f, 0.12f, 1.00f);
warna [ImGuiCol_ScrollbarBg] = ImVec4 (0,02f, 0,02f, 0,02f, 0,53f);
warna [ImGuiCol_ScrollbarGrab] = ImVec4 (0.31f, 0.31f, 0.31f, 1.00f);
warna [ImGuiCol_ScrollbarGrabHovered] = ImVec4 (0.41f, 0.41f, 0.41f, 1.00f);
warna [ImGuiCol_ScrollbarGrabActive] = ImVec4 (0.48f, 0.48f, 0.48f, 1.00f);
warna [ImGuiCol_CheckMark] = ImVec4 (0.79f, 0.79f, 0.79f, 1.00f);
warna [ImGuiCol_SliderGrab] = ImVec4 (0.48f, 0.47f, 0.47f, 0.91f);
warna [ImGuiCol_SliderGrabActive] = ImVec4 (0,56f, 0,55f, 0,55f, 0,62f);
warna [ImGuiCol_Button] = ImVec4 (0.50f, 0.50f, 0.50f, 0.63f);
warna [ImGuiCol_ButtonHovered] = ImVec4 (0.67f, 0.67f, 0.68f, 0.63f);
warna [ImGuiCol_ButtonActive] = ImVec4 (0.26f, 0.26f, 0.26f, 0.63f);
warna [ImGuiCol_Header] = ImVec4 (0,54f, 0,54f, 0,54f, 0,58f);
warna [ImGuiCol_HeaderHovered] = ImVec4 (0.64f, 0.65f, 0.65f, 0.80f);
warna [ImGuiCol_HeaderActive] = ImVec4 (0.25f, 0.25f, 0.25f, 0.80f);
warna [ImGuiCol_Separator] = ImVec4 (0,58f, 0,58f, 0,58f, 0,50f);
warna [ImGuiCol_SeparatorHovered] = ImVec4 (0.81f, 0.81f, 0.81f, 0.64f);
warna [ImGuiCol_SeparatorActive] = ImVec4 (0.81f, 0.81f, 0.81f, 0.64f);
warna [ImGuiCol_ResizeGrip] = ImVec4 (0.87f, 0.87f, 0.87f, 0.53f);
warna [ImGuiCol_ResizeGripHovered] = ImVec4 (0.87f, 0.87f, 0.87f, 0.74f);
warna [ImGuiCol_ResizeGripActive] = ImVec4 (0.87f, 0.87f, 0.87f, 0.74f);
warna [ImGuiCol_Tab] = ImVec4 (0,01f, 0,01f, 0,01f, 0,86f);
warna [ImGuiCol_TabHovered] = ImVec4 (0.29f, 0.29f, 0.29f, 1.00f);
warna [ImGuiCol_TabActive] = ImVec4 (0.31f, 0.31f, 0.31f, 1.00f);
warna [ImGuiCol_TabUnfocused] = ImVec4 (0.02f, 0.02f, 0.02f, 1.00f);
warna [ImGuiCol_TabUnfocusedActive] = ImVec4 (0.19f, 0.19f, 0.19f, 1.00f);
warna [ImGuiCol_DockingPreview] = ImVec4 (0.38f, 0.48f, 0.60f, 1.00f);
warna [ImGuiCol_DockingEmptyBg] = ImVec4 (0.20f, 0.20f, 0.20f, 1.00f);
warna [ImGuiCol_PlotLines] = ImVec4 (0.61f, 0.61f, 0.61f, 1.00f);
warna [ImGuiCol_PlotLinesHovered] = ImVec4 (0.68f, 0.68f, 0.68f, 1.00f);
warna [ImGuiCol_PlotHistogram] = ImVec4 (0.90f, 0.77f, 0.33f, 1.00f);
warna [ImGuiCol_PlotHistogramHovered] = ImVec4 (0.87f, 0.55f, 0.08f, 1.00f);
warna [ImGuiCol_TextSelectedBg] = ImVec4 (0.47f, 0.60f, 0.76f, 0.47f);
warna [ImGuiCol_DragDropTarget] = ImVec4 (0,58f, 0,58f, 0,58f, 0,90f);
warna [ImGuiCol_NavHighlight] = ImVec4 (0.60f, 0.60f, 0.60f, 1.00f);
warna [ImGuiCol_NavWindowingHighlight] = ImVec4 (1.00f, 1.00f, 1.00f, 0.70f);
warna [ImGuiCol_NavWindowingDimBg] = ImVec4 (0.80f, 0.80f, 0.80f, 0.20f);
warna [ImGuiCol_ModalWindowDimBg] = ImVec4 (0.80f, 0.80f, 0.80f, 0.35f);

@ r-lyeh Tema yang bagus. Namun karakter dalam sebuah tombol tidak berada di tengah dengan benar, apakah itu agak meleset? Misalnya di InputInt.

Saya tidak melihat ada masalah: D peduli untuk menyoroti ketidaksejajaran? terima kasih: D
Edit: Ok, terima kasih! Saya telah memperbaiki cuplikan asli.

unaligned

Ini sedikit 'ant-fucking' tetapi seperti yang Anda lihat, '-' dan '+' tidak ada di tengah tombol

Menyalin gaya LightGreen dari @ebachard yang diposting di # 1776 (jadi saya bisa menutup topik lain untuk saat ini).
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 : terima kasih banyak! Untuk orang yang ingin menguji beberapa tema ImGui, ada versi prancis dari miniDart yang tersedia untuk Windows (maaf, saya bukan pro, dan hanya 40% dari UI yang diterjemahkan).

Dependensi adalah:

  • Driver OpenGL
  • webcam yang terhubung (Logitech lebih disukai, seperti yang dijelaskan di repo)

Tema yang tersedia (lihat tab "Préférences"), adalah:

  • Hijau muda
  • Gelap
  • Klasik
  • Biru muda
  • Windows (default)

Anda memerlukan webcam yang tersambung untuk memulai (saya akan segera mengubahnya).

Harap bersikap lembut: Saya bukan seorang profesional ;-)

Tautan: https://framagit.org/ericb/miniDart

Tema saya terinspirasi oleh UI Photoshop. Warna arang gelap digunakan agar UI tidak menarik perhatian Anda sepanjang waktu dan saya menggunakan aksen oranye di sana-sini saat berinteraksi dengan beberapa hal seperti pegangan pengubah ukuran jendela atau pembatas untuk menambahkan sedikit warna yang tidak mengganggu. saat Anda sedang bekerja.

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;
}

Saya menyebutnya tema "CorporateGrey". Parameter warna dan gaya ditujukan untuk kebersihan dan kenyamanan mata, dan lebih cocok untuk aplikasi / suite desktop.

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
}

Bersenang-senang bermain dengan warna ImGui hari ini untuk proyek pribadi.
Saya akhirnya membuat kelas kecil untuk menetapkan tema dari 5 warna dasar yang bisa Anda berikan.

Sunting: lupa menyebutkan bahwa ini untuk cabang Docking imgui.

jadi, misalnya, secara default, saya menggunakan warna-warna ini sebagai masukan: https://coolors.co/252131-f4f1de-da115e-792359-c7ef00

menelepon EditorColorScheme::ApplyTheme(); , saya mendapatkan:
Default

Atau dengan set warna yang berbeda
// From https://coolors.co/1f2421-725ac1-8d86c9-eca400-dce1de ; EditorColorScheme::SetColors(0x1F2421FF /* Background */, 0xDCE1DEFF /* Text */, 0x725AC1FF /* MainColor */, 0x8D86C9FF /* MainAccent */, 0xECA400FF /* Highlight */ );

saya mendapat :
Dark Purple

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

Greenpastel

Kelas ada di sini, jika ada yang ingin bermain dengannya:
`
kelas 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;
    }
};`

Tema gelap lainnya:
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);

Tema VGUI Steam / Half-Life klasik

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;

Tema bergaya Emas & Hitam, dirancang agar sesuai dengan gaya seni Deus Ex: Revolusi Manusia.

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);

Game di latar belakang adalah Sonic Riders dari tahun 2006, ini pertama kalinya saya menggunakan dear imgui dan saya ingin sesuatu untuk diuji; mencintai perpustakaan sejauh ini.

Membuat tema seperti Visual Studio untuk mesin gim saya . Saya menggunakan cabang dok, jadi beberapa pengaturan harus dihapus jika Anda menggunakan satu master
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;

Tema Gelap mesin game saya :
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;
Apakah halaman ini membantu?
5 / 5 - 1 peringkat

Masalah terkait

DarkLinux picture DarkLinux  ·  3Komentar

mkanakis picture mkanakis  ·  3Komentar

SlNPacifist picture SlNPacifist  ·  3Komentar

bogdaNNNN1 picture bogdaNNNN1  ·  3Komentar

the-lay picture the-lay  ·  3Komentar