Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.69 KB | None | 0 0
  1. #pragma once
  2. #include "Interface.h"
  3. #include <d3d9.h>
  4. #include "Global.h"
  5.  
  6. ImFont* fDefault;
  7. ImFont* fkek;
  8. ImFont* ficon;
  9. ImFont* ftitle;
  10.  
  11. void RenderDefault(IDirect3DDevice9* pDevice)
  12. {
  13. ImGuiIO& io = ImGui::GetIO();
  14. io.DeltaTime = 1.f / 60.f;
  15. D3DDEVICE_CREATION_PARAMETERS d3dcp{ 0 };
  16. pDevice->GetCreationParameters(&d3dcp);
  17.  
  18. auto& style = ImGui::GetStyle();
  19.  
  20. fDefault = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Choktoff.ttf", 15.0f);
  21. //fkek = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\eagle.ttf", 60.0f);
  22. ficon = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\csgo_icons.ttf", 25.0f);
  23. ftitle = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Arial.ttf", 15.0f);
  24.  
  25. static int hue = 140;
  26.  
  27. ImVec4 col_text = ImColor::HSV(hue / 255.f, 20.f / 255.f, 235.f / 255.f);
  28. ImVec4 col_theme = ImColor(255, 85, 0);
  29. ImVec4 col_main = ImColor(118, 39, 0);
  30. ImVec4 col_back = ImColor(100, 33, 0);
  31. ImVec4 col_area = ImColor(100, 33, 0);
  32.  
  33. style.Alpha = 1.0f;
  34. style.FrameRounding = 3.0f;
  35. style.Colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
  36. style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
  37. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.94f, 0.94f, 0.94f, 0.94f);
  38. style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
  39. style.Colors[ImGuiCol_PopupBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.94f);
  40. style.Colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.39f);
  41. style.Colors[ImGuiCol_BorderShadow] = ImVec4(1.00f, 1.00f, 1.00f, 0.10f);
  42. style.Colors[ImGuiCol_FrameBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.94f);
  43. style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f);
  44. style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
  45. style.Colors[ImGuiCol_TitleBg] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f);
  46. style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 1.00f, 1.00f, 0.51f);
  47. style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.82f, 0.82f, 0.82f, 1.00f);
  48. style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
  49. style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.98f, 0.98f, 0.98f, 0.53f);
  50. style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.69f, 0.69f, 0.69f, 1.00f);
  51. style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.59f, 0.59f, 0.59f, 1.00f);
  52. style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.49f, 0.49f, 0.49f, 1.00f);
  53. style.Colors[ImGuiCol_ComboBg] = ImVec4(0.86f, 0.86f, 0.86f, 0.99f);
  54. style.Colors[ImGuiCol_CheckMark] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
  55. style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.24f, 0.52f, 0.88f, 1.00f);
  56. style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
  57. style.Colors[ImGuiCol_Button] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f);
  58. style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
  59. style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.06f, 0.53f, 0.98f, 1.00f);
  60. style.Colors[ImGuiCol_Header] = ImVec4(0.26f, 0.59f, 0.98f, 0.31f);
  61. style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f);
  62. style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
  63. style.Colors[ImGuiCol_Column] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
  64. style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
  65. style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
  66. style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.50f);
  67. style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
  68. style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
  69. style.Colors[ImGuiCol_CloseButton] = ImVec4(0.59f, 0.59f, 0.59f, 0.50f);
  70. style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f);
  71. style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f);
  72. style.Colors[ImGuiCol_PlotLines] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
  73. style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
  74. style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
  75. style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
  76. style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
  77. style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
  78. /*
  79. style.Colors[ImGuiCol_Text] = ImVec4(0.98f, 0.98f, 0.98f, 1.00f);
  80. style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.30f, 0.30f, 0.30f, 1.00f);
  81. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.1f, 0.1f, 0.1f, 0.99f);
  82. style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.11f, 0.11f, 0.11f, 0.95f);
  83. style.Colors[ImGuiCol_Border] = ImVec4(0.27f, 0.27f, .27f, 1.00f);
  84. style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
  85. style.Colors[ImGuiCol_FrameBg] = ImVec4(0.09f, .09f, .09f, 1.f);
  86. style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.13, 0.13, 0.13, 1.f);
  87. style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.11, 0.11, 0.11, 1.f);
  88. style.Colors[ImGuiCol_TitleBg] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  89. style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  90. style.Colors[ImGuiCol_TitleBgActive] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  91. style.Colors[ImGuiCol_MenuBarBg] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  92. style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.1f, 0.1f, 0.1f, 0.95f);
  93. style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  94. style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  95. style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  96. style.Colors[ImGuiCol_ComboBg] = ImVec4(0.15, 0.15, 0.15, 1.00f);
  97. style.Colors[ImGuiCol_CheckMark] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  98. style.Colors[ImGuiCol_SliderGrab] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  99. style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  100. style.Colors[ImGuiCol_Button] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  101. style.Colors[ImGuiCol_ButtonHovered] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  102. style.Colors[ImGuiCol_ButtonActive] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  103. style.Colors[ImGuiCol_Header] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  104. style.Colors[ImGuiCol_HeaderHovered] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  105. style.Colors[ImGuiCol_HeaderActive] = ImVec4(col_theme.x, col_theme.y, col_theme.z, .97f);
  106. style.Colors[ImGuiCol_Column] = ImVec4(col_text.x, col_text.y, col_text.z, 0.32f);
  107. style.Colors[ImGuiCol_ColumnHovered] = ImVec4(col_text.x, col_text.y, col_text.z, 0.78f);
  108. style.Colors[ImGuiCol_ColumnActive] = ImVec4(col_text.x, col_text.y, col_text.z, 1.00f);
  109. style.Colors[ImGuiCol_ResizeGrip] = ImVec4(col_main.x, col_main.y, col_main.z, 0.20f);
  110. style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 0.78f);
  111. style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f);
  112. style.Colors[ImGuiCol_CloseButton] = ImVec4(col_text.x, col_text.y, col_text.z, 0.f);
  113. style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(col_text.x, col_text.y, col_text.z, 0);
  114. style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(col_text.x, col_text.y, col_text.z, 0);
  115. style.Colors[ImGuiCol_PlotLines] = ImVec4(col_text.x, col_text.y, col_text.z, 0.63f);
  116. style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f);
  117. style.Colors[ImGuiCol_PlotHistogram] = ImVec4(col_text.x, col_text.y, col_text.z, 0.63f);
  118. style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(col_main.x, col_main.y, col_main.z, 1.00f);
  119. style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(col_main.x, col_main.y, col_main.z, 0.43f);
  120. style.Colors[ImGuiCol_PopupBg] = ImVec4(col_main.x, col_main.y, col_main.z, 0.92f);
  121. style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.50f);
  122. */
  123. //style.Alpha = 1.0f;
  124. style.WindowPadding = ImVec2(8, 8);
  125. style.WindowMinSize = ImVec2(32, 32);
  126. style.WindowRounding = 0.5f;
  127. style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
  128. style.ChildWindowRounding = 0.0f;
  129. style.FramePadding = ImVec2(4, 2);
  130. //style.FrameRounding = 0.0f;
  131. style.ItemSpacing = ImVec2(8, 4);
  132. style.ItemInnerSpacing = ImVec2(4, 4);
  133. style.TouchExtraPadding = ImVec2(0, 0);
  134. style.IndentSpacing = 21.0f;
  135. style.ColumnsMinSpacing = 3.0f;
  136. style.ScrollbarSize = 12.0f;
  137. style.ScrollbarRounding = 0.0f;
  138. style.GrabMinSize = 0.1f;
  139. style.GrabRounding = 0.0f;
  140. style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
  141. style.DisplayWindowPadding = ImVec2(22, 22);
  142. style.DisplaySafeAreaPadding = ImVec2(4, 4);
  143. style.AntiAliasedLines = true;
  144. style.AntiAliasedShapes = true;
  145. style.CurveTessellationTol = 1.25f;
  146. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement