Advertisement
Guest User

omg_ptheme

a guest
Mar 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. void InitializeTheme()
  2. {
  3. ImGuiStyle& style = ImGui::GetStyle();
  4. ImColor mainColor = ImColor(int(54), int(54), int(54), 255);
  5. ImColor bodyColor = ImColor(int(24), int(24), int(24), 255);
  6. ImColor fontColor = ImColor(int(255), int(255), int(255), 255);
  7. ImVec4 mainColorHovered = ImVec4(mainColor.Value.x + 0.1f, mainColor.Value.y + 0.1f, mainColor.Value.z + 0.1f, mainColor.Value.w);
  8. ImVec4 mainColorActive = ImVec4(mainColor.Value.x + 0.2f, mainColor.Value.y + 0.2f, mainColor.Value.z + 0.2f, mainColor.Value.w);
  9. ImVec4 menubarColor = ImVec4(bodyColor.Value.x, bodyColor.Value.y, bodyColor.Value.z, bodyColor.Value.w - 0.8f);
  10. ImVec4 frameBgColor = ImVec4(bodyColor.Value.x, bodyColor.Value.y, bodyColor.Value.z, bodyColor.Value.w + .1f);
  11. ImVec4 tooltipBgColor = ImVec4(bodyColor.Value.x, bodyColor.Value.y, bodyColor.Value.z, bodyColor.Value.w + .05f);
  12.  
  13. style.Alpha = .8f;
  14. style.WindowPadding = ImVec2(8, 8);
  15. style.WindowMinSize = ImVec2(32, 32);
  16. style.WindowRounding = 0.0f;
  17. style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
  18. style.ChildWindowRounding = 0.0f;
  19. style.FramePadding = ImVec2(4, 3);
  20. style.FrameRounding = 0;
  21. style.ItemSpacing = ImVec2(6, 3);
  22. style.ItemInnerSpacing = ImVec2(4, 4);
  23. style.TouchExtraPadding = ImVec2(0, 0);
  24. style.IndentSpacing = 21.0f;
  25. style.ColumnsMinSpacing = 3.0f;
  26. style.ScrollbarSize = 8.f;
  27. style.ScrollbarRounding = 0.0f;
  28. style.GrabMinSize = 20;
  29. style.GrabRounding = 16;
  30. style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
  31. style.DisplayWindowPadding = ImVec2(22, 22);
  32. style.DisplaySafeAreaPadding = ImVec2(4, 4);
  33. style.AntiAliasedLines = true;
  34. style.AntiAliasedShapes = true;
  35. style.CurveTessellationTol = 1.25f;
  36.  
  37. style.Colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
  38. style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
  39. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.109, 0.125, 0.141, 1.00f);
  40. style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.18f, 0.18f, 0.18f, 0.00f);
  41. style.Colors[ImGuiCol_PopupBg] = ImVec4(0.09f, 0.09f, 0.09f, 1.05f);
  42. style.Colors[ImGuiCol_Border] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
  43. style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f);
  44. style.Colors[ImGuiCol_FrameBg] = ImVec4(0.09f, 0.09f, 0.09f, 1.10f);
  45. style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  46. style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
  47. style.Colors[ImGuiCol_TitleBg] = ImVec4(0.863, 0.145, 0.322, 0.83f);
  48. style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
  49. style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.863, 0.145, 0.322, 0.83f);
  50. style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.00f, 0.09f, 0.09f, 0.20f);
  51. style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.10f);
  52. style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.77f, 0.21f, 0.21f, 1.00f);
  53. style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  54. style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.48f, 0.41f, 0.41f, 1.00f);
  55. style.Colors[ImGuiCol_ComboBg] = ImVec4(0.09f, 0.09f, 0.09f, 1.10f);
  56. style.Colors[ImGuiCol_CheckMark] = ImVec4(0.651, 0.157, 0.282, 1.00f);
  57. style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  58. style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
  59. style.Colors[ImGuiCol_Button] = ImVec4(0.35f, 0.35f, 0.35f, 1.00f);
  60. style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.35f, 0.35f, 0.35f, 1.00f);
  61. style.Colors[ImGuiCol_ButtonActive] = ImVec4(1.00f, 0.21f, 0.22f, 1.00f);
  62. style.Colors[ImGuiCol_Header] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
  63. style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  64. style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
  65. style.Colors[ImGuiCol_Column] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
  66. style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  67. style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
  68. style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
  69. style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  70. style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
  71. style.Colors[ImGuiCol_CloseButton] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
  72. style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  73. style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
  74. style.Colors[ImGuiCol_PlotLines] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
  75. style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  76. style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
  77. style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
  78. style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f);
  79. style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
  80.  
  81. ImGuiIO& io = ImGui::GetIO();
  82. ImFont* font0 = io.Fonts->AddFontFromMemoryTTF(blocky, blocky_size, 8);
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement