Advertisement
Thunder-Menu

Link to guide imgui

Dec 25th, 2020 (edited)
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.98 KB | None | 0 0
  1. https://pastebin.com/NeK7atnr
  2. // %LocalAppData%\.xmake\packages\i\
  3.  
  4. // - Homepage & latest https://github.com/ocornut/imgui
  5.  
  6. //.h
  7. typedef unsigned long DWORD;
  8. typedef DWORD H;
  9. namespace HASH
  10. {
  11. H GET_HASH_KEY(char* value);
  12. }
  13. namespace GuiCol
  14. {
  15. extern void COLGUI(const char* colstyle, ImVec4 colint);
  16. //HASH
  17. extern DWORD ImGuiCol2_Text;
  18. extern DWORD ImGuiCol2_TextDisabled;
  19. extern DWORD ImGuiCol2_WindowBg;
  20. extern DWORD ImGuiCol2_ChildBg;
  21. extern DWORD ImGuiCol2_PopupBg;
  22. extern DWORD ImGuiCol2_Border;
  23. extern DWORD ImGuiCol2_BorderShadow;
  24. extern DWORD ImGuiCol2_FrameBg;
  25. extern DWORD ImGuiCol2_FrameBgHovered;
  26. extern DWORD ImGuiCol2_FrameBgActive;
  27. extern DWORD ImGuiCol2_TitleBg;
  28. extern DWORD ImGuiCol2_TitleBgActive;
  29. extern DWORD ImGuiCol2_TitleBgCollapsed;
  30. extern DWORD ImGuiCol2_MenuBarBg;
  31. extern DWORD ImGuiCol2_ScrollbarBg;
  32. extern DWORD ImGuiCol2_ScrollbarGrab;
  33. extern DWORD ImGuiCol2_ScrollbarGrabHovered;
  34. extern DWORD ImGuiCol2_ScrollbarGrabActive;
  35. extern DWORD ImGuiCol2_CheckMark;
  36. extern DWORD ImGuiCol2_SliderGrab;
  37. extern DWORD ImGuiCol2_SliderGrabActive;
  38. extern DWORD ImGuiCol2_Button;
  39. extern DWORD ImGuiCol2_ButtonHovered;
  40. extern DWORD ImGuiCol2_ButtonActive;
  41. extern DWORD ImGuiCol2_Header;
  42. extern DWORD ImGuiCol2_HeaderHovered;
  43. extern DWORD ImGuiCol2_HeaderActive;
  44. extern DWORD ImGuiCol2_Separator;
  45. extern DWORD ImGuiCol2_SeparatorHovered;
  46. extern DWORD ImGuiCol2_SeparatorActive;
  47. extern DWORD ImGuiCol2_ResizeGrip;
  48. extern DWORD ImGuiCol2_ResizeGripHovered;
  49. extern DWORD ImGuiCol2_ResizeGripActive;
  50. extern DWORD ImGuiCol2_Tab;
  51. extern DWORD ImGuiCol2_TabHovered;
  52. extern DWORD ImGuiCol2_TabActive;
  53. extern DWORD ImGuiCol2_TabUnfocused;
  54. extern DWORD ImGuiCol2_TabUnfocusedActive;
  55. extern DWORD ImGuiCol2_PlotLines;
  56. extern DWORD ImGuiCol2_PlotLinesHovered;
  57. extern DWORD ImGuiCol2_PlotHistogram;
  58. extern DWORD ImGuiCol2_PlotHistogramHovered;
  59. extern DWORD ImGuiCol2_TextSelectedBg;
  60. extern DWORD ImGuiCol2_DragDropTarget;
  61. extern DWORD ImGuiCol2_NavHighlight;
  62. extern DWORD ImGuiCol2_NavWindowingHighlight;
  63. extern DWORD ImGuiCol2_NavWindowingDimBg;
  64. extern DWORD ImGuiCol2_ModalWindowDimBg;
  65. //string
  66. extern std::string ImGuiCol1_Text;
  67. extern std::string ImGuiCol1_TextDisabled;
  68. extern std::string ImGuiCol1_WindowBg;
  69. extern std::string ImGuiCol1_ChildBg;
  70. extern std::string ImGuiCol1_PopupBg;
  71. extern std::string ImGuiCol1_Border;
  72. extern std::string ImGuiCol1_BorderShadow;
  73. extern std::string ImGuiCol1_FrameBg;
  74. extern std::string ImGuiCol1_FrameBgHovered;
  75. extern std::string ImGuiCol1_FrameBgActive;
  76. extern std::string ImGuiCol1_TitleBg;
  77. extern std::string ImGuiCol1_TitleBgActive;
  78. extern std::string ImGuiCol1_TitleBgCollapsed;
  79. extern std::string ImGuiCol1_MenuBarBg;
  80. extern std::string ImGuiCol1_ScrollbarBg;
  81. extern std::string ImGuiCol1_ScrollbarGrab;
  82. extern std::string ImGuiCol1_ScrollbarGrabHovered;
  83. extern std::string ImGuiCol1_ScrollbarGrabActive;
  84. extern std::string ImGuiCol1_CheckMark;
  85. extern std::string ImGuiCol1_SliderGrab;
  86. extern std::string ImGuiCol1_SliderGrabActive;
  87. extern std::string ImGuiCol1_Button;
  88. extern std::string ImGuiCol1_ButtonHovered;
  89. extern std::string ImGuiCol1_ButtonActive;
  90. extern std::string ImGuiCol1_Header;
  91. extern std::string ImGuiCol1_HeaderHovered;
  92. extern std::string ImGuiCol1_HeaderActive;
  93. extern std::string ImGuiCol1_Separator;
  94. extern std::string ImGuiCol1_SeparatorHovered;
  95. extern std::string ImGuiCol1_SeparatorActive;
  96. extern std::string ImGuiCol1_ResizeGrip;
  97. extern std::string ImGuiCol1_ResizeGripHovered;
  98. extern std::string ImGuiCol1_ResizeGripActive;
  99. extern std::string ImGuiCol1_Tab;
  100. extern std::string ImGuiCol1_TabHovered;
  101. extern std::string ImGuiCol1_TabActive;
  102. extern std::string ImGuiCol1_TabUnfocused;
  103. extern std::string ImGuiCol1_TabUnfocusedActive;
  104. extern std::string ImGuiCol1_PlotLines;
  105. extern std::string ImGuiCol1_PlotLinesHovered;
  106. extern std::string ImGuiCol1_PlotHistogram;
  107. extern std::string ImGuiCol1_PlotHistogramHovered;
  108. extern std::string ImGuiCol1_TextSelectedBg;
  109. extern std::string ImGuiCol1_DragDropTarget;
  110. extern std::string ImGuiCol1_NavHighlight;
  111. extern std::string ImGuiCol1_NavWindowingHighlight;
  112. extern std::string ImGuiCol1_NavWindowingDimBg;
  113. extern std::string ImGuiCol1_ModalWindowDimBg;
  114. //Vector4D
  115. static ImVec4 ImGuiCol_Text;
  116. static ImVec4 ImGuiCol_TextDisabled;
  117. static ImVec4 ImGuiCol_WindowBg;
  118. static ImVec4 ImGuiCol_ChildBg;
  119. static ImVec4 ImGuiCol_PopupBg;
  120. static ImVec4 ImGuiCol_Border;
  121. static ImVec4 ImGuiCol_BorderShadow;
  122. static ImVec4 ImGuiCol_FrameBg;
  123. static ImVec4 ImGuiCol_FrameBgHovered;
  124. static ImVec4 ImGuiCol_FrameBgActive;
  125. static ImVec4 ImGuiCol_TitleBg;
  126. static ImVec4 ImGuiCol_TitleBgActive;
  127. static ImVec4 ImGuiCol_TitleBgCollapsed;
  128. static ImVec4 ImGuiCol_MenuBarBg;
  129. static ImVec4 ImGuiCol_ScrollbarBg;
  130. static ImVec4 ImGuiCol_ScrollbarGrab;
  131. static ImVec4 ImGuiCol_ScrollbarGrabHovered;
  132. static ImVec4 ImGuiCol_ScrollbarGrabActive;
  133. static ImVec4 ImGuiCol_CheckMark;
  134. static ImVec4 ImGuiCol_SliderGrab;
  135. static ImVec4 ImGuiCol_SliderGrabActive;
  136. static ImVec4 ImGuiCol_Button;
  137. static ImVec4 ImGuiCol_ButtonHovered;
  138. static ImVec4 ImGuiCol_ButtonActive;
  139. static ImVec4 ImGuiCol_Header;
  140. static ImVec4 ImGuiCol_HeaderHovered;
  141. static ImVec4 ImGuiCol_HeaderActive;
  142. static ImVec4 ImGuiCol_Separator;
  143. static ImVec4 ImGuiCol_SeparatorHovered;
  144. static ImVec4 ImGuiCol_SeparatorActive;
  145. static ImVec4 ImGuiCol_ResizeGrip;
  146. static ImVec4 ImGuiCol_ResizeGripHovered;
  147. static ImVec4 ImGuiCol_ResizeGripActive;
  148. static ImVec4 ImGuiCol_Tab;
  149. static ImVec4 ImGuiCol_TabHovered;
  150. static ImVec4 ImGuiCol_TabActive;
  151. static ImVec4 ImGuiCol_TabUnfocused;
  152. static ImVec4 ImGuiCol_TabUnfocusedActive;
  153. static ImVec4 ImGuiCol_PlotLines;
  154. static ImVec4 ImGuiCol_PlotLinesHovered;
  155. static ImVec4 ImGuiCol_PlotHistogram;
  156. static ImVec4 ImGuiCol_PlotHistogramHovered;
  157. static ImVec4 ImGuiCol_TextSelectedBg;
  158. static ImVec4 ImGuiCol_DragDropTarget;
  159. static ImVec4 ImGuiCol_NavHighlight;
  160. static ImVec4 ImGuiCol_NavWindowingHighlight;
  161. static ImVec4 ImGuiCol_NavWindowingDimBg;
  162. static ImVec4 ImGuiCol_ModalWindowDimBg;
  163. extern int readstyle();
  164. }
  165. //.cpp
  166.  
  167.  
  168. ImU32 ImGui::ColorConvertFloat4ToU322(const ImVec4& in)
  169. {
  170. ImU32 out;
  171. out = ((ImU32)IM_F32_TO_INT8_SAT(in.x)) << 24;
  172. out |= ((ImU32)IM_F32_TO_INT8_SAT(in.y)) << 16;
  173. out |= ((ImU32)IM_F32_TO_INT8_SAT(in.z)) << 8;
  174. out |= ((ImU32)IM_F32_TO_INT8_SAT(in.w));
  175. return out;
  176. }
  177. ImVec4 ImGui::ColorConvertU32ToFloat42(DWORD in)
  178. {
  179. /*float s = 1.0f / 255.0f;*/
  180. /*return ImVec4(
  181. ((in >> IM_COL32_R_SHIFT) & 0xFF) * s,
  182. ((in >> IM_COL32_G_SHIFT) & 0xFF) * s,
  183. ((in >> IM_COL32_B_SHIFT) & 0xFF) * s,
  184. ((in >> IM_COL32_A_SHIFT) & 0xFF) * s);*/
  185. float xf;
  186. float yf;
  187. float zf;
  188. float wf;
  189. xf = (float)((in & 0xFF000000) >> 24) / 255;
  190. yf = (float)((in & 0x00FF0000) >> 16) / 255;
  191. zf = (float)((in & 0x0000FF00) >> 8) / 255;
  192. wf = (float)((in & 0x000000FF)) / 255;
  193. return ImVec4(xf, yf, zf, wf);
  194. }
  195. ImGui::Begin("Style Editor", &show_apps_style_editor); ImGui::ShowStyleEditor();
  196. void ImGui::ShowStyleEditor(ImGuiStyle* ref)
  197. {
  198. // You can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it compares to an internally stored reference)
  199. ImGuiStyle& style = ImGui::GetStyle();
  200. static ImGuiStyle ref_saved_style;
  201.  
  202. // Default to using internal storage as reference
  203. static bool init = true;
  204. if (init && ref == NULL)
  205. ref_saved_style = style;
  206. init = false;
  207. if (ref == NULL)
  208. ref = &ref_saved_style;
  209.  
  210. ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.50f);
  211.  
  212. if (ImGui::ShowStyleSelector("Colors##Selector"))
  213. ref_saved_style = style;
  214. /*ImGui::ShowFontSelector("Fonts##Selector");*/
  215.  
  216. // Simplified Settings
  217. //if (ImGui::SliderFloat("FrameRounding", &style.FrameRounding, 0.0f, 12.0f, "%.0f"))
  218. // style.GrabRounding = style.FrameRounding; // Make GrabRounding always the same value as FrameRounding
  219. //{ bool window_border = (style.WindowBorderSize > 0.0f); if (ImGui::Checkbox("WindowBorder", &window_border)) style.WindowBorderSize = window_border ? 1.0f : 0.0f; }
  220. //ImGui::SameLine();
  221. //{ bool frame_border = (style.FrameBorderSize > 0.0f); if (ImGui::Checkbox("FrameBorder", &frame_border)) style.FrameBorderSize = frame_border ? 1.0f : 0.0f; }
  222. //ImGui::SameLine();
  223. //{ bool popup_border = (style.PopupBorderSize > 0.0f); if (ImGui::Checkbox("PopupBorder", &popup_border)) style.PopupBorderSize = popup_border ? 1.0f : 0.0f; }
  224.  
  225. //// Save/Revert button
  226. //if (ImGui::Button("Save Ref"))
  227. // *ref = ref_saved_style = style;
  228. //ImGui::SameLine();
  229. //if (ImGui::Button("Revert Ref"))
  230. // style = *ref;
  231. //ImGui::SameLine();
  232. //ShowHelpMarker("Save/Revert in local non-persistent storage. Default Colors definition are not affected. Use \"Export Colors\" below to save them somewhere.");
  233.  
  234. ImGui::Separator();
  235.  
  236. if (ImGui::BeginTabBar("##tabs", ImGuiTabBarFlags_None))
  237. {
  238. /*
  239. if (ImGui::BeginTabItem("Sizes"))
  240. {
  241. ImGui::Text("Main");
  242. ImGui::SliderFloat2("WindowPadding", (float*)&style.WindowPadding, 0.0f, 20.0f, "%.0f");
  243. ImGui::SliderFloat("PopupRounding", &style.PopupRounding, 0.0f, 16.0f, "%.0f");
  244. ImGui::SliderFloat2("FramePadding", (float*)&style.FramePadding, 0.0f, 20.0f, "%.0f");
  245. ImGui::SliderFloat2("ItemSpacing", (float*)&style.ItemSpacing, 0.0f, 20.0f, "%.0f");
  246. ImGui::SliderFloat2("ItemInnerSpacing", (float*)&style.ItemInnerSpacing, 0.0f, 20.0f, "%.0f");
  247. ImGui::SliderFloat2("TouchExtraPadding", (float*)&style.TouchExtraPadding, 0.0f, 10.0f, "%.0f");
  248. ImGui::SliderFloat("IndentSpacing", &style.IndentSpacing, 0.0f, 30.0f, "%.0f");
  249. ImGui::SliderFloat("ScrollbarSize", &style.ScrollbarSize, 1.0f, 20.0f, "%.0f");
  250. ImGui::SliderFloat("GrabMinSize", &style.GrabMinSize, 1.0f, 20.0f, "%.0f");
  251. ImGui::Text("Borders");
  252. ImGui::SliderFloat("WindowBorderSize", &style.WindowBorderSize, 0.0f, 1.0f, "%.0f");
  253. ImGui::SliderFloat("ChildBorderSize", &style.ChildBorderSize, 0.0f, 1.0f, "%.0f");
  254. ImGui::SliderFloat("PopupBorderSize", &style.PopupBorderSize, 0.0f, 1.0f, "%.0f");
  255. ImGui::SliderFloat("FrameBorderSize", &style.FrameBorderSize, 0.0f, 1.0f, "%.0f");
  256. ImGui::SliderFloat("TabBorderSize", &style.TabBorderSize, 0.0f, 1.0f, "%.0f");
  257. ImGui::Text("Rounding");
  258. ImGui::SliderFloat("WindowRounding", &style.WindowRounding, 0.0f, 14.0f, "%.0f");
  259. ImGui::SliderFloat("ChildRounding", &style.ChildRounding, 0.0f, 16.0f, "%.0f");
  260. ImGui::SliderFloat("FrameRounding", &style.FrameRounding, 0.0f, 12.0f, "%.0f");
  261. ImGui::SliderFloat("ScrollbarRounding", &style.ScrollbarRounding, 0.0f, 12.0f, "%.0f");
  262. ImGui::SliderFloat("GrabRounding", &style.GrabRounding, 0.0f, 12.0f, "%.0f");
  263. ImGui::SliderFloat("TabRounding", &style.TabRounding, 0.0f, 12.0f, "%.0f");
  264. ImGui::Text("Alignment");
  265. ImGui::SliderFloat2("WindowTitleAlign", (float*)&style.WindowTitleAlign, 0.0f, 1.0f, "%.2f");
  266. ImGui::SliderFloat2("ButtonTextAlign", (float*)&style.ButtonTextAlign, 0.0f, 1.0f, "%.2f"); ImGui::SameLine(); ShowHelpMarker("Alignment applies when a button is larger than its text content.");
  267. ImGui::Text("Safe Area Padding"); ImGui::SameLine(); ShowHelpMarker("Adjust if you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured).");
  268. ImGui::SliderFloat2("DisplaySafeAreaPadding", (float*)&style.DisplaySafeAreaPadding, 0.0f, 30.0f, "%.0f");
  269. ImGui::EndTabItem();
  270. }*/
  271.  
  272. if (ImGui::BeginTabItem("Colors"))
  273. {
  274. /*static int output_dest = 0;
  275. static bool output_only_modified = true;
  276. if (ImGui::Button("Export Unsaved"))
  277. {
  278. if (output_dest == 0)
  279. ImGui::LogToClipboard();
  280. else
  281. ImGui::LogToTTY();
  282. ImGui::LogText("ImVec4* colors = ImGui::GetStyle().Colors;" IM_NEWLINE);
  283. for (int i = 0; i < ImGuiCol_COUNT; i++)
  284. {
  285. const ImVec4& col = style.Colors[i];
  286. const char* name = ImGui::GetStyleColorName(i);
  287. if (!output_only_modified || memcmp(&col, &ref->Colors[i], sizeof(ImVec4)) != 0)
  288. ImGui::LogText("colors[ImGuiCol_%s]%*s= ImVec4(%.2ff, %.2ff, %.2ff, %.2ff);" IM_NEWLINE, name, 23 - (int)strlen(name), "", col.x, col.y, col.z, col.w);
  289. }
  290. ImGui::LogFinish();
  291. }
  292. ImGui::SameLine(); ImGui::PushItemWidth(120); ImGui::Combo("##output_type", &output_dest, "To Clipboard\0To TTY\0"); ImGui::PopItemWidth();
  293. ImGui::SameLine(); ImGui::Checkbox("Only Modified Colors", &output_only_modified);
  294. */
  295. static ImGuiTextFilter filter;
  296. filter.Draw("Filter colors", ImGui::GetFontSize() * 16);
  297.  
  298. static ImGuiColorEditFlags alpha_flags = 0;
  299. ImGui::RadioButton("Opaque", &alpha_flags, 0); ImGui::SameLine();
  300. ImGui::RadioButton("Alpha", &alpha_flags, ImGuiColorEditFlags_AlphaPreview); ImGui::SameLine();
  301. ImGui::RadioButton("Both", &alpha_flags, ImGuiColorEditFlags_AlphaPreviewHalf); ImGui::SameLine();
  302. /*ShowHelpMarker("In the color list:\nLeft-click on colored square to open color picker,\nRight-click to open edit options menu.");*/
  303.  
  304. HelpMarker(
  305. "In the color list:\n"
  306. "Left-click on color square to open color picker,\n"
  307. "Right-click to open edit options menu.");
  308.  
  309. ImGui::BeginChild("##colors", ImVec2(0, 0), true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar | ImGuiWindowFlags_NavFlattened);
  310. ImGui::PushItemWidth(-160);
  311. for (int i = 0; i < ImGuiCol_COUNT; i++)
  312. {
  313. const char* name = ImGui::GetStyleColorName(i);
  314. if (!filter.PassFilter(name))
  315. continue;
  316. ImGui::PushID(i);
  317. ImGui::ColorEdit4("##color", (float*)&style.Colors[i], ImGuiColorEditFlags_AlphaBar | alpha_flags);
  318. if (memcmp(&style.Colors[i], &ref->Colors[i], sizeof(ImVec4)) != 0)
  319. {
  320. // Tips: in a real user application, you may want to merge and use an icon font into the main font, so instead of "Save"/"Revert" you'd use icons.
  321. // Read the FAQ and misc/fonts/README.txt about using icon fonts. It's really easy and super convenient!
  322. /*ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); if (ImGui::Button("Save")) ref->Colors[i] = style.Colors[i];*/
  323. ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); if (ImGui::Button("Save")) ref->Colors[i] = style.Colors[i];
  324. {
  325. GuiCol::COLGUI(name, ref->Colors[i]);
  326. }
  327. ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); if (ImGui::Button("Revert")) style.Colors[i] = ref->Colors[i];
  328. }
  329. ImGui::SameLine(0.0f, style.ItemInnerSpacing.x);
  330. ImGui::TextUnformatted(name);
  331. ImGui::PopID();
  332. }
  333. ImGui::PopItemWidth();
  334. ImGui::EndChild();
  335.  
  336. ImGui::EndTabItem();
  337. }
  338. ImGui::EndTabBar();
  339. }
  340. // if (ImGui::BeginTabItem("Fonts"))
  341. // {
  342. // ImFontAtlas* atlas = ImGui::GetIO().Fonts;
  343. // ShowHelpMarker("Read FAQ and misc/fonts/README.txt for details on font loading.");
  344. // ImGui::PushItemWidth(120);
  345. // for (int i = 0; i < atlas->Fonts.Size; i++)
  346. // {
  347. // ImFont* font = atlas->Fonts[i];
  348. // ImGui::PushID(font);
  349. // bool font_details_opened = ImGui::TreeNode(font, "Font %d: \"%s\"\n%.2f px, %d glyphs, %d file(s)", i, font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size, font->ConfigDataCount);
  350. // ImGui::SameLine(); if (ImGui::SmallButton("Set as default")) ImGui::GetIO().FontDefault = font;
  351. // if (font_details_opened)
  352. // {
  353. // ImGui::PushFont(font);
  354. // ImGui::Text("The quick brown fox jumps over the lazy dog");
  355. // ImGui::PopFont();
  356. // ImGui::DragFloat("Font scale", &font->Scale, 0.005f, 0.3f, 2.0f, "%.1f"); // Scale only this font
  357. // ImGui::SameLine(); ShowHelpMarker("Note than the default embedded font is NOT meant to be scaled.\n\nFont are currently rendered into bitmaps at a given size at the time of building the atlas. You may oversample them to get some flexibility with scaling. You can also render at multiple sizes and select which one to use at runtime.\n\n(Glimmer of hope: the atlas system should hopefully be rewritten in the future to make scaling more natural and automatic.)");
  358. // ImGui::InputFloat("Font offset", &font->DisplayOffset.y, 1, 1, "%.0f");
  359. // ImGui::Text("Ascent: %f, Descent: %f, Height: %f", font->Ascent, font->Descent, font->Ascent - font->Descent);
  360. // ImGui::Text("Fallback character: '%c' (%d)", font->FallbackChar, font->FallbackChar);
  361. // ImGui::Text("Texture surface: %d pixels (approx) ~ %dx%d", font->MetricsTotalSurface, (int)sqrtf((float)font->MetricsTotalSurface), (int)sqrtf((float)font->MetricsTotalSurface));
  362. // for (int config_i = 0; config_i < font->ConfigDataCount; config_i++)
  363. // if (ImFontConfig* cfg = &font->ConfigData[config_i])
  364. // ImGui::BulletText("Input %d: \'%s\', Oversample: (%d,%d), PixelSnapH: %d", config_i, cfg->Name, cfg->OversampleH, cfg->OversampleV, cfg->PixelSnapH);
  365. // if (ImGui::TreeNode("Glyphs", "Glyphs (%d)", font->Glyphs.Size))
  366. // {
  367. // // Display all glyphs of the fonts in separate pages of 256 characters
  368. // for (int base = 0; base < 0x10000; base += 256)
  369. // {
  370. // int count = 0;
  371. // for (int n = 0; n < 256; n++)
  372. // count += font->FindGlyphNoFallback((ImWchar)(base + n)) ? 1 : 0;
  373. // if (count > 0 && ImGui::TreeNode((void*)(intptr_t)base, "U+%04X..U+%04X (%d %s)", base, base + 255, count, count > 1 ? "glyphs" : "glyph"))
  374. // {
  375. // float cell_size = font->FontSize * 1;
  376. // float cell_spacing = style.ItemSpacing.y;
  377. // ImVec2 base_pos = ImGui::GetCursorScreenPos();
  378. // ImDrawList* draw_list = ImGui::GetWindowDrawList();
  379. // for (int n = 0; n < 256; n++)
  380. // {
  381. // ImVec2 cell_p1(base_pos.x + (n % 16) * (cell_size + cell_spacing), base_pos.y + (n / 16) * (cell_size + cell_spacing));
  382. // ImVec2 cell_p2(cell_p1.x + cell_size, cell_p1.y + cell_size);
  383. // const ImFontGlyph* glyph = font->FindGlyphNoFallback((ImWchar)(base + n));
  384. // draw_list->AddRect(cell_p1, cell_p2, glyph ? IM_COL32(255, 255, 255, 100) : IM_COL32(255, 255, 255, 50));
  385. // if (glyph)
  386. // font->RenderChar(draw_list, cell_size, cell_p1, ImGui::GetColorU32(ImGuiCol_Text), (ImWchar)(base + n)); // We use ImFont::RenderChar as a shortcut because we don't have UTF-8 conversion functions available to generate a string.
  387. // if (glyph && ImGui::IsMouseHoveringRect(cell_p1, cell_p2))
  388. // {
  389. // ImGui::BeginTooltip();
  390. // ImGui::Text("Codepoint: U+%04X", base + n);
  391. // ImGui::Separator();
  392. // ImGui::Text("AdvanceX: %.1f", glyph->AdvanceX);
  393. // ImGui::Text("Pos: (%.2f,%.2f)->(%.2f,%.2f)", glyph->X0, glyph->Y0, glyph->X1, glyph->Y1);
  394. // ImGui::Text("UV: (%.3f,%.3f)->(%.3f,%.3f)", glyph->U0, glyph->V0, glyph->U1, glyph->V1);
  395. // ImGui::EndTooltip();
  396. // }
  397. // }
  398. // ImGui::Dummy(ImVec2((cell_size + cell_spacing) * 16, (cell_size + cell_spacing) * 16));
  399. // ImGui::TreePop();
  400. // }
  401. // }
  402. // ImGui::TreePop();
  403. // }
  404. // ImGui::TreePop();
  405. // }
  406. // ImGui::PopID();
  407. // }
  408. // if (ImGui::TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight))
  409. // {
  410. // ImGui::Image(atlas->TexID, ImVec2((float)atlas->TexWidth, (float)atlas->TexHeight), ImVec2(0, 0), ImVec2(1, 1), ImColor(255, 255, 255, 255), ImColor(255, 255, 255, 128));
  411. // ImGui::TreePop();
  412. // }
  413.  
  414. // static float window_scale = 1.0f;
  415. // if (ImGui::DragFloat("this window scale", &window_scale, 0.005f, 0.3f, 2.0f, "%.1f")) // scale only this window
  416. // ImGui::SetWindowFontScale(window_scale);
  417. // ImGui::DragFloat("global scale", &ImGui::GetIO().FontGlobalScale, 0.005f, 0.3f, 2.0f, "%.1f"); // scale everything
  418. // ImGui::PopItemWidth();
  419.  
  420. // ImGui::EndTabItem();
  421. // }
  422.  
  423. // if (ImGui::BeginTabItem("Rendering"))
  424. // {
  425. // ImGui::Checkbox("Anti-aliased lines", &style.AntiAliasedLines); ImGui::SameLine(); ShowHelpMarker("When disabling anti-aliasing lines, you'll probably want to disable borders in your style as well.");
  426. // ImGui::Checkbox("Anti-aliased fill", &style.AntiAliasedFill);
  427. // ImGui::PushItemWidth(100);
  428. // ImGui::DragFloat("Curve Tessellation Tolerance", &style.CurveTessellationTol, 0.02f, 0.10f, FLT_MAX, "%.2f", 2.0f);
  429. // if (style.CurveTessellationTol < 0.10f) style.CurveTessellationTol = 0.10f;
  430. // ImGui::DragFloat("Global Alpha", &style.Alpha, 0.005f, 0.20f, 1.0f, "%.2f"); // Not exposing zero here so user doesn't "lose" the UI (zero alpha clips all widgets). But application code could have a toggle to switch between zero and non-zero.
  431. // ImGui::PopItemWidth();
  432.  
  433. // ImGui::EndTabItem();
  434. // }
  435.  
  436. // ImGui::EndTabBar();
  437. //}
  438.  
  439. ImGui::PopItemWidth();
  440. }
  441.  
  442. void GuiCol::COLGUI(const char* colstyle, ImVec4 colint)
  443. {
  444. if (colstyle == (char*)"Text")
  445. {
  446. GuiCol::ImGuiCol_Text = colint; //ImVec4
  447. GuiCol::ImGuiCol2_Text = ImGui::ColorConvertFloat4ToU322(colint); //DWORD
  448. std::stringstream hcolor;
  449. hcolor << std::hex << GuiCol::ImGuiCol2_Text;
  450. GuiCol::ImGuiCol1_Text = hcolor.str(); //string
  451. }
  452. if (colstyle == (char*)"TextDisabled")
  453. {
  454. GuiCol::ImGuiCol_TextDisabled = colint;
  455. GuiCol::ImGuiCol2_TextDisabled = ImGui::ColorConvertFloat4ToU322(colint);
  456. std::stringstream hcolor;
  457. hcolor << std::hex << GuiCol::ImGuiCol2_TextDisabled;
  458. GuiCol::ImGuiCol1_TextDisabled = hcolor.str();
  459. }
  460. if (colstyle == (char*)"WindowBg")
  461. {
  462. GuiCol::ImGuiCol_WindowBg = colint;
  463. GuiCol::ImGuiCol2_WindowBg = ImGui::ColorConvertFloat4ToU322(colint);
  464. std::stringstream hcolor;
  465. hcolor << std::hex << GuiCol::ImGuiCol2_WindowBg;
  466. GuiCol::ImGuiCol1_WindowBg = hcolor.str();
  467. }
  468. if (colstyle == (char*)"ChildBg")
  469. {
  470. GuiCol::ImGuiCol_ChildBg = colint;
  471. GuiCol::ImGuiCol2_ChildBg = ImGui::ColorConvertFloat4ToU322(colint);
  472. std::stringstream hcolor;
  473. hcolor << std::hex << GuiCol::ImGuiCol2_ChildBg;
  474. GuiCol::ImGuiCol1_ChildBg = hcolor.str();
  475. }
  476. if (colstyle == (char*)"PopupBg")
  477. {
  478. GuiCol::ImGuiCol_PopupBg = colint;
  479. GuiCol::ImGuiCol2_PopupBg = ImGui::ColorConvertFloat4ToU322(colint);
  480. std::stringstream hcolor;
  481. hcolor << std::hex << GuiCol::ImGuiCol2_PopupBg;
  482. GuiCol::ImGuiCol1_PopupBg = hcolor.str();
  483. }
  484. if (colstyle == (char*)"Border")
  485. {
  486. GuiCol::ImGuiCol_Border = colint;
  487. GuiCol::ImGuiCol2_Border = ImGui::ColorConvertFloat4ToU322(colint);
  488. std::stringstream hcolor;
  489. hcolor << std::hex << GuiCol::ImGuiCol2_Border;
  490. GuiCol::ImGuiCol1_Border = hcolor.str();
  491. }
  492. if (colstyle == (char*)"BorderShadow")
  493. {
  494. GuiCol::ImGuiCol_BorderShadow = colint;
  495. GuiCol::ImGuiCol2_BorderShadow = ImGui::ColorConvertFloat4ToU322(colint);
  496. std::stringstream hcolor;
  497. hcolor << std::hex << GuiCol::ImGuiCol2_BorderShadow;
  498. GuiCol::ImGuiCol1_BorderShadow = hcolor.str();
  499. }
  500. if (colstyle == (char*)"FrameBg")
  501. {
  502. GuiCol::ImGuiCol_FrameBg = colint;
  503. GuiCol::ImGuiCol2_FrameBg = ImGui::ColorConvertFloat4ToU322(colint);
  504. std::stringstream hcolor;
  505. hcolor << std::hex << GuiCol::ImGuiCol2_FrameBg;
  506. GuiCol::ImGuiCol1_FrameBg = hcolor.str();
  507. }
  508. if (colstyle == (char*)"FrameBgHovered")
  509. {
  510. GuiCol::ImGuiCol_FrameBgHovered = colint;
  511. GuiCol::ImGuiCol2_FrameBgHovered = ImGui::ColorConvertFloat4ToU322(colint);
  512. std::stringstream hcolor;
  513. hcolor << std::hex << GuiCol::ImGuiCol2_FrameBgHovered;
  514. GuiCol::ImGuiCol1_FrameBgHovered = hcolor.str();
  515. }
  516. if (colstyle == (char*)"FrameBgActive")
  517. {
  518. GuiCol::ImGuiCol_FrameBgActive = colint;
  519. GuiCol::ImGuiCol2_FrameBgActive = ImGui::ColorConvertFloat4ToU322(colint);
  520. std::stringstream hcolor;
  521. hcolor << std::hex << GuiCol::ImGuiCol2_FrameBgActive;
  522. GuiCol::ImGuiCol1_FrameBgActive = hcolor.str();
  523. }
  524. if (colstyle == (char*)"TitleBg")
  525. {
  526. GuiCol::ImGuiCol_TitleBg = colint;
  527. GuiCol::ImGuiCol2_TitleBg = ImGui::ColorConvertFloat4ToU322(colint);
  528. std::stringstream hcolor;
  529. hcolor << std::hex << GuiCol::ImGuiCol2_TitleBg;
  530. GuiCol::ImGuiCol1_TitleBg = hcolor.str();
  531. }
  532. if (colstyle == (char*)"TitleBgActive")
  533. {
  534. GuiCol::ImGuiCol_TitleBgActive = colint;
  535. GuiCol::ImGuiCol2_TitleBgActive = ImGui::ColorConvertFloat4ToU322(colint);
  536. std::stringstream hcolor;
  537. hcolor << std::hex << GuiCol::ImGuiCol2_TitleBgActive;
  538. GuiCol::ImGuiCol1_TitleBgActive = hcolor.str();
  539. }
  540. if (colstyle == (char*)"TitleBgCollapsed")
  541. {
  542. GuiCol::ImGuiCol_TitleBgCollapsed = colint;
  543. GuiCol::ImGuiCol2_TitleBgCollapsed = ImGui::ColorConvertFloat4ToU322(colint);
  544. std::stringstream hcolor;
  545. hcolor << std::hex << GuiCol::ImGuiCol2_TitleBgCollapsed;
  546. GuiCol::ImGuiCol1_TitleBgCollapsed = hcolor.str();
  547. }
  548. if (colstyle == (char*)"MenuBarBg")
  549. {
  550. GuiCol::ImGuiCol_MenuBarBg = colint;
  551. GuiCol::ImGuiCol2_MenuBarBg = ImGui::ColorConvertFloat4ToU322(colint);
  552. std::stringstream hcolor;
  553. hcolor << std::hex << GuiCol::ImGuiCol2_MenuBarBg;
  554. GuiCol::ImGuiCol1_MenuBarBg = hcolor.str();
  555. }
  556. if (colstyle == (char*)"ScrollbarBg")
  557. {
  558. GuiCol::ImGuiCol_ScrollbarBg = colint;
  559. GuiCol::ImGuiCol2_ScrollbarBg = ImGui::ColorConvertFloat4ToU322(colint);
  560. std::stringstream hcolor;
  561. hcolor << std::hex << GuiCol::ImGuiCol2_ScrollbarBg;
  562. GuiCol::ImGuiCol1_ScrollbarBg = hcolor.str();
  563. }
  564. if (colstyle == (char*)"ScrollbarGrab")
  565. {
  566. GuiCol::ImGuiCol_ScrollbarGrab = colint;
  567. GuiCol::ImGuiCol2_ScrollbarGrab = ImGui::ColorConvertFloat4ToU322(colint);
  568. std::stringstream hcolor;
  569. hcolor << std::hex << GuiCol::ImGuiCol2_ScrollbarGrab;
  570. GuiCol::ImGuiCol1_ScrollbarGrab = hcolor.str();
  571. }
  572. if (colstyle == (char*)"ScrollbarGrabHovered")
  573. {
  574. GuiCol::ImGuiCol_ScrollbarGrabHovered = colint;
  575. GuiCol::ImGuiCol2_ScrollbarGrabHovered = ImGui::ColorConvertFloat4ToU322(colint);
  576. std::stringstream hcolor;
  577. hcolor << std::hex << GuiCol::ImGuiCol2_ScrollbarGrabHovered;
  578. GuiCol::ImGuiCol1_ScrollbarGrabHovered = hcolor.str();
  579. }
  580. if (colstyle == (char*)"ScrollbarGrabActive")
  581. {
  582. GuiCol::ImGuiCol_ScrollbarGrabActive = colint;
  583. GuiCol::ImGuiCol2_ScrollbarGrabActive = ImGui::ColorConvertFloat4ToU322(colint);
  584. std::stringstream hcolor;
  585. hcolor << std::hex << GuiCol::ImGuiCol2_ScrollbarGrabActive;
  586. GuiCol::ImGuiCol1_ScrollbarGrabActive = hcolor.str();
  587. }
  588. if (colstyle == (char*)"CheckMark")
  589. {
  590. GuiCol::ImGuiCol_CheckMark = colint;
  591. GuiCol::ImGuiCol2_CheckMark = ImGui::ColorConvertFloat4ToU322(colint);
  592. std::stringstream hcolor;
  593. hcolor << std::hex << GuiCol::ImGuiCol2_CheckMark;
  594. GuiCol::ImGuiCol1_CheckMark = hcolor.str();
  595. }
  596. if (colstyle == (char*)"SliderGrab")
  597. {
  598. GuiCol::ImGuiCol_SliderGrab = colint;
  599. GuiCol::ImGuiCol2_SliderGrab = ImGui::ColorConvertFloat4ToU322(colint);
  600. std::stringstream hcolor;
  601. hcolor << std::hex << GuiCol::ImGuiCol2_SliderGrab;
  602. GuiCol::ImGuiCol1_SliderGrab = hcolor.str();
  603. }
  604. if (colstyle == (char*)"SliderGrabActive")
  605. {
  606. GuiCol::ImGuiCol_SliderGrabActive = colint;
  607. GuiCol::ImGuiCol2_SliderGrabActive = ImGui::ColorConvertFloat4ToU322(colint);
  608. std::stringstream hcolor;
  609. hcolor << std::hex << GuiCol::ImGuiCol2_SliderGrabActive;
  610. GuiCol::ImGuiCol1_SliderGrabActive = hcolor.str();
  611. }
  612. if (colstyle == (char*)"Button")
  613. {
  614. GuiCol::ImGuiCol_Button = colint;
  615. GuiCol::ImGuiCol2_Button = ImGui::ColorConvertFloat4ToU322(colint);
  616. std::stringstream hcolor;
  617. hcolor << std::hex << GuiCol::ImGuiCol2_Button;
  618. GuiCol::ImGuiCol1_Button = hcolor.str();
  619. }
  620. if (colstyle == (char*)"ButtonHovered")
  621. {
  622. GuiCol::ImGuiCol_ButtonHovered = colint;
  623. GuiCol::ImGuiCol2_ButtonHovered = ImGui::ColorConvertFloat4ToU322(colint);
  624. std::stringstream hcolor;
  625. hcolor << std::hex << GuiCol::ImGuiCol2_ButtonHovered;
  626. GuiCol::ImGuiCol1_ButtonHovered = hcolor.str();
  627. }
  628. if (colstyle == (char*)"ButtonActive")
  629. {
  630. GuiCol::ImGuiCol_ButtonActive = colint;
  631. GuiCol::ImGuiCol2_ButtonActive = ImGui::ColorConvertFloat4ToU322(colint);
  632. std::stringstream hcolor;
  633. hcolor << std::hex << GuiCol::ImGuiCol2_ButtonActive;
  634. GuiCol::ImGuiCol1_ButtonActive = hcolor.str();
  635. }
  636. if (colstyle == (char*)"Header")
  637. {
  638. GuiCol::ImGuiCol_Header = colint;
  639. GuiCol::ImGuiCol2_Header = ImGui::ColorConvertFloat4ToU322(colint);
  640. std::stringstream hcolor;
  641. hcolor << std::hex << GuiCol::ImGuiCol2_Header;
  642. GuiCol::ImGuiCol1_Header = hcolor.str();
  643. }
  644. if (colstyle == (char*)"HeaderHovered")
  645. {
  646. GuiCol::ImGuiCol_HeaderHovered = colint;
  647. GuiCol::ImGuiCol2_HeaderHovered = ImGui::ColorConvertFloat4ToU322(colint);
  648. std::stringstream hcolor;
  649. hcolor << std::hex << GuiCol::ImGuiCol2_HeaderHovered;
  650. GuiCol::ImGuiCol1_HeaderHovered = hcolor.str();
  651. }
  652. if (colstyle == (char*)"HeaderActive")
  653. {
  654. GuiCol::ImGuiCol_HeaderActive = colint;
  655. GuiCol::ImGuiCol2_HeaderActive = ImGui::ColorConvertFloat4ToU322(colint);
  656. std::stringstream hcolor;
  657. hcolor << std::hex << GuiCol::ImGuiCol2_HeaderActive;
  658. GuiCol::ImGuiCol1_HeaderActive = hcolor.str();
  659. }
  660. if (colstyle == (char*)"Separator")
  661. {
  662. GuiCol::ImGuiCol_Separator = colint;
  663. GuiCol::ImGuiCol2_Separator = ImGui::ColorConvertFloat4ToU322(colint);
  664. std::stringstream hcolor;
  665. hcolor << std::hex << GuiCol::ImGuiCol2_Separator;
  666. GuiCol::ImGuiCol1_Separator = hcolor.str();
  667. }
  668. if (colstyle == (char*)"SeparatorHovered")
  669. {
  670. GuiCol::ImGuiCol_SeparatorHovered = colint;
  671. GuiCol::ImGuiCol2_SeparatorHovered = ImGui::ColorConvertFloat4ToU322(colint);
  672. std::stringstream hcolor;
  673. hcolor << std::hex << GuiCol::ImGuiCol2_SeparatorHovered;
  674. GuiCol::ImGuiCol1_SeparatorHovered = hcolor.str();
  675. }
  676. if (colstyle == (char*)"SeparatorActive")
  677. {
  678. GuiCol::ImGuiCol_SeparatorActive = colint;
  679. GuiCol::ImGuiCol2_SeparatorActive = ImGui::ColorConvertFloat4ToU322(colint);
  680. std::stringstream hcolor;
  681. hcolor << std::hex << GuiCol::ImGuiCol2_SeparatorActive;
  682. GuiCol::ImGuiCol1_SeparatorActive = hcolor.str();
  683. }
  684. if (colstyle == (char*)"ResizeGrip")
  685. {
  686. GuiCol::ImGuiCol_ResizeGrip = colint;
  687. GuiCol::ImGuiCol2_ResizeGrip = ImGui::ColorConvertFloat4ToU322(colint);
  688. std::stringstream hcolor;
  689. hcolor << std::hex << GuiCol::ImGuiCol2_ResizeGrip;
  690. GuiCol::ImGuiCol1_ResizeGrip = hcolor.str();
  691. }
  692. if (colstyle == (char*)"ResizeGripHovered")
  693. {
  694. GuiCol::ImGuiCol_ResizeGripHovered = colint;
  695. GuiCol::ImGuiCol2_ResizeGripHovered = ImGui::ColorConvertFloat4ToU322(colint);
  696. std::stringstream hcolor;
  697. hcolor << std::hex << GuiCol::ImGuiCol2_ResizeGripHovered;
  698. GuiCol::ImGuiCol1_ResizeGripHovered = hcolor.str();
  699. }
  700. if (colstyle == (char*)"ResizeGripActive")
  701. {
  702. GuiCol::ImGuiCol_ResizeGripActive = colint;
  703. GuiCol::ImGuiCol2_ResizeGripActive = ImGui::ColorConvertFloat4ToU322(colint);
  704. std::stringstream hcolor;
  705. hcolor << std::hex << GuiCol::ImGuiCol2_ResizeGripActive;
  706. GuiCol::ImGuiCol1_ResizeGripActive = hcolor.str();
  707. }
  708. if (colstyle == (char*)"Tab")
  709. {
  710. GuiCol::ImGuiCol_Tab = colint;
  711. GuiCol::ImGuiCol2_Tab = ImGui::ColorConvertFloat4ToU322(colint);
  712. std::stringstream hcolor;
  713. hcolor << std::hex << GuiCol::ImGuiCol2_Tab;
  714. GuiCol::ImGuiCol1_Tab = hcolor.str();
  715. }
  716. if (colstyle == (char*)"TabHovered")
  717. {
  718. GuiCol::ImGuiCol_TabHovered = colint;
  719. GuiCol::ImGuiCol2_TabHovered = ImGui::ColorConvertFloat4ToU322(colint);
  720. std::stringstream hcolor;
  721. hcolor << std::hex << GuiCol::ImGuiCol2_TabHovered;
  722. GuiCol::ImGuiCol1_TabHovered = hcolor.str();
  723. }
  724. if (colstyle == (char*)"TabActive")
  725. {
  726. GuiCol::ImGuiCol_TabActive = colint;
  727. GuiCol::ImGuiCol2_TabActive = ImGui::ColorConvertFloat4ToU322(colint);
  728. std::stringstream hcolor;
  729. hcolor << std::hex << GuiCol::ImGuiCol2_TabActive;
  730. GuiCol::ImGuiCol1_TabActive = hcolor.str();
  731. }
  732. if (colstyle == (char*)"TabUnfocused")
  733. {
  734. GuiCol::ImGuiCol_TabUnfocused = colint;
  735. GuiCol::ImGuiCol2_TabUnfocused = ImGui::ColorConvertFloat4ToU322(colint);
  736. std::stringstream hcolor;
  737. hcolor << std::hex << GuiCol::ImGuiCol2_TabUnfocused;
  738. GuiCol::ImGuiCol1_TabUnfocused = hcolor.str();
  739. }
  740. if (colstyle == (char*)"TabUnfocusedActive")
  741. {
  742. GuiCol::ImGuiCol_TabUnfocusedActive = colint;
  743. GuiCol::ImGuiCol2_TabUnfocusedActive = ImGui::ColorConvertFloat4ToU322(colint);
  744. std::stringstream hcolor;
  745. hcolor << std::hex << GuiCol::ImGuiCol2_TabUnfocusedActive;
  746. GuiCol::ImGuiCol1_TabUnfocusedActive = hcolor.str();
  747. }
  748. if (colstyle == (char*)"PlotLines")
  749. {
  750. GuiCol::ImGuiCol_PlotLines = colint;
  751. GuiCol::ImGuiCol2_PlotLines = ImGui::ColorConvertFloat4ToU322(colint);
  752. std::stringstream hcolor;
  753. hcolor << std::hex << GuiCol::ImGuiCol2_PlotLines;
  754. GuiCol::ImGuiCol1_PlotLines = hcolor.str();
  755. }
  756. if (colstyle == (char*)"PlotLinesHovered")
  757. {
  758. GuiCol::ImGuiCol_PlotLinesHovered = colint;
  759. GuiCol::ImGuiCol2_PlotLinesHovered = ImGui::ColorConvertFloat4ToU322(colint);
  760. std::stringstream hcolor;
  761. hcolor << std::hex << GuiCol::ImGuiCol2_PlotLinesHovered;
  762. GuiCol::ImGuiCol1_PlotLinesHovered = hcolor.str();
  763. }
  764. if (colstyle == (char*)"PlotHistogram")
  765. {
  766. GuiCol::ImGuiCol_PlotHistogram = colint;
  767. GuiCol::ImGuiCol2_PlotHistogram = ImGui::ColorConvertFloat4ToU322(colint);
  768. std::stringstream hcolor;
  769. hcolor << std::hex << GuiCol::ImGuiCol2_PlotHistogram;
  770. GuiCol::ImGuiCol1_PlotHistogram = hcolor.str();
  771. }
  772. if (colstyle == (char*)"PlotHistogramHovered")
  773. {
  774. GuiCol::ImGuiCol_PlotHistogramHovered = colint;
  775. GuiCol::ImGuiCol2_PlotHistogramHovered = ImGui::ColorConvertFloat4ToU322(colint);
  776. std::stringstream hcolor;
  777. hcolor << std::hex << GuiCol::ImGuiCol2_PlotHistogramHovered;
  778. GuiCol::ImGuiCol1_PlotHistogramHovered = hcolor.str();
  779. }
  780. if (colstyle == (char*)"TextSelectedBg")
  781. {
  782. GuiCol::ImGuiCol_TextSelectedBg = colint;
  783. GuiCol::ImGuiCol2_TextSelectedBg = ImGui::ColorConvertFloat4ToU322(colint);
  784. std::stringstream hcolor;
  785. hcolor << std::hex << GuiCol::ImGuiCol2_TextSelectedBg;
  786. GuiCol::ImGuiCol1_TextSelectedBg = hcolor.str();
  787. }
  788. if (colstyle == (char*)"DragDropTarget")
  789. {
  790. GuiCol::ImGuiCol_DragDropTarget = colint;
  791. GuiCol::ImGuiCol2_DragDropTarget = ImGui::ColorConvertFloat4ToU322(colint);
  792. std::stringstream hcolor;
  793. hcolor << std::hex << GuiCol::ImGuiCol2_DragDropTarget;
  794. GuiCol::ImGuiCol1_DragDropTarget = hcolor.str();
  795. }
  796. if (colstyle == (char*)"NavHighlight")
  797. {
  798. GuiCol::ImGuiCol_NavHighlight = colint;
  799. GuiCol::ImGuiCol2_NavHighlight = ImGui::ColorConvertFloat4ToU322(colint);
  800. std::stringstream hcolor;
  801. hcolor << std::hex << GuiCol::ImGuiCol2_NavHighlight;
  802. GuiCol::ImGuiCol1_NavHighlight = hcolor.str();
  803. }
  804. if (colstyle == (char*)"NavWindowingHighlight")
  805. {
  806. GuiCol::ImGuiCol_NavWindowingHighlight = colint;
  807. GuiCol::ImGuiCol2_NavWindowingHighlight = ImGui::ColorConvertFloat4ToU322(colint);
  808. std::stringstream hcolor;
  809. hcolor << std::hex << GuiCol::ImGuiCol2_NavWindowingHighlight;
  810. GuiCol::ImGuiCol1_NavWindowingHighlight = hcolor.str();
  811. }
  812. if (colstyle == (char*)"NavWindowingDimBg")
  813. {
  814. GuiCol::ImGuiCol_NavWindowingDimBg = colint;
  815. GuiCol::ImGuiCol2_NavWindowingDimBg = ImGui::ColorConvertFloat4ToU322(colint);
  816. std::stringstream hcolor;
  817. hcolor << std::hex << GuiCol::ImGuiCol2_NavWindowingDimBg;
  818. GuiCol::ImGuiCol1_NavWindowingDimBg = hcolor.str();
  819. }
  820. if (colstyle == (char*)"ModalWindowDimBg")
  821. {
  822. GuiCol::ImGuiCol_ModalWindowDimBg = colint;
  823. GuiCol::ImGuiCol2_ModalWindowDimBg = ImGui::ColorConvertFloat4ToU322(colint);
  824. std::stringstream hcolor;
  825. hcolor << std::hex << GuiCol::ImGuiCol2_ModalWindowDimBg;
  826. GuiCol::ImGuiCol1_ModalWindowDimBg = hcolor.str();
  827. }
  828.  
  829. /*std::string appdata;
  830. appdata = getenv("appdata");
  831. std::ofstream savecol(appdata + "\\ThunderMenu\\SaveColor.Thunder");
  832. savecol << colstyle << "\n";
  833. float r, g, b, a;
  834. r = colint.x;
  835. b = colint.y;
  836. g = colint.z;
  837. a = colint.w;
  838. savecol << r << "\n";
  839. savecol << g << "\n";
  840. savecol << b << "\n";
  841. savecol << a << "\n";*/
  842. }
  843. //HASH
  844. DWORD GuiCol::ImGuiCol2_Text;
  845. DWORD GuiCol::ImGuiCol2_TextDisabled;
  846. DWORD GuiCol::ImGuiCol2_WindowBg;
  847. DWORD GuiCol::ImGuiCol2_ChildBg;
  848. DWORD GuiCol::ImGuiCol2_PopupBg;
  849. DWORD GuiCol::ImGuiCol2_Border;
  850. DWORD GuiCol::ImGuiCol2_BorderShadow;
  851. DWORD GuiCol::ImGuiCol2_FrameBg;
  852. DWORD GuiCol::ImGuiCol2_FrameBgHovered;
  853. DWORD GuiCol::ImGuiCol2_FrameBgActive;
  854. DWORD GuiCol::ImGuiCol2_TitleBg;
  855. DWORD GuiCol::ImGuiCol2_TitleBgActive;
  856. DWORD GuiCol::ImGuiCol2_TitleBgCollapsed;
  857. DWORD GuiCol::ImGuiCol2_MenuBarBg;
  858. DWORD GuiCol::ImGuiCol2_ScrollbarBg;
  859. DWORD GuiCol::ImGuiCol2_ScrollbarGrab;
  860. DWORD GuiCol::ImGuiCol2_ScrollbarGrabHovered;
  861. DWORD GuiCol::ImGuiCol2_ScrollbarGrabActive;
  862. DWORD GuiCol::ImGuiCol2_CheckMark;
  863. DWORD GuiCol::ImGuiCol2_SliderGrab;
  864. DWORD GuiCol::ImGuiCol2_SliderGrabActive;
  865. DWORD GuiCol::ImGuiCol2_Button;
  866. DWORD GuiCol::ImGuiCol2_ButtonHovered;
  867. DWORD GuiCol::ImGuiCol2_ButtonActive;
  868. DWORD GuiCol::ImGuiCol2_Header;
  869. DWORD GuiCol::ImGuiCol2_HeaderHovered;
  870. DWORD GuiCol::ImGuiCol2_HeaderActive;
  871. DWORD GuiCol::ImGuiCol2_Separator;
  872. DWORD GuiCol::ImGuiCol2_SeparatorHovered;
  873. DWORD GuiCol::ImGuiCol2_SeparatorActive;
  874. DWORD GuiCol::ImGuiCol2_ResizeGrip;
  875. DWORD GuiCol::ImGuiCol2_ResizeGripHovered;
  876. DWORD GuiCol::ImGuiCol2_ResizeGripActive;
  877. DWORD GuiCol::ImGuiCol2_Tab;
  878. DWORD GuiCol::ImGuiCol2_TabHovered;
  879. DWORD GuiCol::ImGuiCol2_TabActive;
  880. DWORD GuiCol::ImGuiCol2_TabUnfocused;
  881. DWORD GuiCol::ImGuiCol2_TabUnfocusedActive;
  882. DWORD GuiCol::ImGuiCol2_PlotLines;
  883. DWORD GuiCol::ImGuiCol2_PlotLinesHovered;
  884. DWORD GuiCol::ImGuiCol2_PlotHistogram;
  885. DWORD GuiCol::ImGuiCol2_PlotHistogramHovered;
  886. DWORD GuiCol::ImGuiCol2_TextSelectedBg;
  887. DWORD GuiCol::ImGuiCol2_DragDropTarget;
  888. DWORD GuiCol::ImGuiCol2_NavHighlight;
  889. DWORD GuiCol::ImGuiCol2_NavWindowingHighlight;
  890. DWORD GuiCol::ImGuiCol2_NavWindowingDimBg;
  891. DWORD GuiCol::ImGuiCol2_ModalWindowDimBg;
  892. //string
  893. std::string GuiCol::ImGuiCol1_Text = "";
  894. std::string GuiCol::ImGuiCol1_TextDisabled = "";
  895. std::string GuiCol::ImGuiCol1_WindowBg = "";
  896. std::string GuiCol::ImGuiCol1_ChildBg = "";
  897. std::string GuiCol::ImGuiCol1_PopupBg = "";
  898. std::string GuiCol::ImGuiCol1_Border = "";
  899. std::string GuiCol::ImGuiCol1_BorderShadow = "";
  900. std::string GuiCol::ImGuiCol1_FrameBg = "";
  901. std::string GuiCol::ImGuiCol1_FrameBgHovered = "";
  902. std::string GuiCol::ImGuiCol1_FrameBgActive = "";
  903. std::string GuiCol::ImGuiCol1_TitleBg = "";
  904. std::string GuiCol::ImGuiCol1_TitleBgActive = "";
  905. std::string GuiCol::ImGuiCol1_TitleBgCollapsed = "";
  906. std::string GuiCol::ImGuiCol1_MenuBarBg = "";
  907. std::string GuiCol::ImGuiCol1_ScrollbarBg = "";
  908. std::string GuiCol::ImGuiCol1_ScrollbarGrab = "";
  909. std::string GuiCol::ImGuiCol1_ScrollbarGrabHovered = "";
  910. std::string GuiCol::ImGuiCol1_ScrollbarGrabActive = "";
  911. std::string GuiCol::ImGuiCol1_CheckMark = "";
  912. std::string GuiCol::ImGuiCol1_SliderGrab = "";
  913. std::string GuiCol::ImGuiCol1_SliderGrabActive = "";
  914. std::string GuiCol::ImGuiCol1_Button = "";
  915. std::string GuiCol::ImGuiCol1_ButtonHovered = "";
  916. std::string GuiCol::ImGuiCol1_ButtonActive = "";
  917. std::string GuiCol::ImGuiCol1_Header = "";
  918. std::string GuiCol::ImGuiCol1_HeaderHovered = "";
  919. std::string GuiCol::ImGuiCol1_HeaderActive = "";
  920. std::string GuiCol::ImGuiCol1_Separator = "";
  921. std::string GuiCol::ImGuiCol1_SeparatorHovered = "";
  922. std::string GuiCol::ImGuiCol1_SeparatorActive = "";
  923. std::string GuiCol::ImGuiCol1_ResizeGrip = "";
  924. std::string GuiCol::ImGuiCol1_ResizeGripHovered = "";
  925. std::string GuiCol::ImGuiCol1_ResizeGripActive = "";
  926. std::string GuiCol::ImGuiCol1_Tab = "";
  927. std::string GuiCol::ImGuiCol1_TabHovered = "";
  928. std::string GuiCol::ImGuiCol1_TabActive = "";
  929. std::string GuiCol::ImGuiCol1_TabUnfocused = "";
  930. std::string GuiCol::ImGuiCol1_TabUnfocusedActive = "";
  931. std::string GuiCol::ImGuiCol1_PlotLines = "";
  932. std::string GuiCol::ImGuiCol1_PlotLinesHovered = "";
  933. std::string GuiCol::ImGuiCol1_PlotHistogram = "";
  934. std::string GuiCol::ImGuiCol1_PlotHistogramHovered = "";
  935. std::string GuiCol::ImGuiCol1_TextSelectedBg = "";
  936. std::string GuiCol::ImGuiCol1_DragDropTarget = "";
  937. std::string GuiCol::ImGuiCol1_NavHighlight = "";
  938. std::string GuiCol::ImGuiCol1_NavWindowingHighlight = "";
  939. std::string GuiCol::ImGuiCol1_NavWindowingDimBg = "";
  940. std::string GuiCol::ImGuiCol1_ModalWindowDimBg = "";
  941.  
  942. int GuiCol::readstyle()
  943. {
  944. ImGuiStyle& style = ImGui::GetStyle();
  945. auto& colors = style.Colors;
  946. char* _Text = new char[GuiCol::ImGuiCol1_Text.size() + 1];
  947. strcpy(_Text, GuiCol::ImGuiCol1_Text.c_str());
  948. if (_Text != (char*)"")
  949. {
  950. std::stringstream scolorhex;
  951. scolorhex << std::hex << GuiCol::ImGuiCol1_Text;
  952. scolorhex >> GuiCol::ImGuiCol2_Text;
  953. GuiCol::ImGuiCol_Text = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_Text);
  954. colors[ImGuiCol_::ImGuiCol_Text] = GuiCol::ImGuiCol_Text;
  955. }
  956. else
  957. {
  958. GuiCol::COLGUI("Text", ImVec4(1.00f, 1.00f, 1.00f, 1.00f));
  959. }
  960. char* _TextDisabled = new char[GuiCol::ImGuiCol1_TextDisabled.size() + 1];
  961. strcpy(_TextDisabled, GuiCol::ImGuiCol1_TextDisabled.c_str());
  962. if (_TextDisabled != (char*)"")
  963. {
  964. std::stringstream scolorhex;
  965. scolorhex << std::hex << GuiCol::ImGuiCol1_TextDisabled;
  966. scolorhex >> GuiCol::ImGuiCol2_TextDisabled;
  967. GuiCol::ImGuiCol_TextDisabled = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TextDisabled);
  968. colors[ImGuiCol_::ImGuiCol_TextDisabled] = GuiCol::ImGuiCol_TextDisabled;
  969. }
  970. else
  971. {
  972. GuiCol::COLGUI("TextDisabled", ImVec4(1.00f, 0.90f, 0.19f, 1.00f));
  973. }
  974. char* _WindowBg = new char[GuiCol::ImGuiCol1_WindowBg.size() + 1];
  975. strcpy(_WindowBg, GuiCol::ImGuiCol1_WindowBg.c_str());
  976. if (_WindowBg != (char*)"")
  977. {
  978. std::stringstream scolorhex;
  979. scolorhex << std::hex << GuiCol::ImGuiCol1_WindowBg;
  980. scolorhex >> GuiCol::ImGuiCol2_WindowBg;
  981. GuiCol::ImGuiCol_WindowBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_WindowBg);
  982. colors[ImGuiCol_::ImGuiCol_WindowBg] = GuiCol::ImGuiCol_WindowBg;
  983. }
  984. else
  985. {
  986. GuiCol::COLGUI("WindowBg", ImVec4(0.06f, 0.06f, 0.06f, 1.00f));
  987. }
  988. char* _ChildBg = new char[GuiCol::ImGuiCol1_ChildBg.size() + 1];
  989. strcpy(_ChildBg, GuiCol::ImGuiCol1_ChildBg.c_str());
  990. if (_ChildBg != (char*)"")
  991. {
  992. std::stringstream scolorhex;
  993. scolorhex << std::hex << GuiCol::ImGuiCol1_ChildBg;
  994. scolorhex >> GuiCol::ImGuiCol2_ChildBg;
  995. GuiCol::ImGuiCol_ChildBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ChildBg);
  996. colors[ImGuiCol_::ImGuiCol_ChildBg] = GuiCol::ImGuiCol_ChildBg;
  997. }
  998. else
  999. {
  1000. GuiCol::COLGUI("ChildBg", ImVec4(0.00f, 0.00f, 0.00f, 0.00f));
  1001. }
  1002. char* _PopupBg = new char[GuiCol::ImGuiCol1_PopupBg.size() + 1];
  1003. strcpy(_PopupBg, GuiCol::ImGuiCol1_PopupBg.c_str());
  1004. if (_PopupBg != (char*)"")
  1005. {
  1006. std::stringstream scolorhex;
  1007. scolorhex << std::hex << GuiCol::ImGuiCol1_PopupBg;
  1008. scolorhex >> GuiCol::ImGuiCol2_PopupBg;
  1009. GuiCol::ImGuiCol_PopupBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_PopupBg);
  1010. colors[ImGuiCol_::ImGuiCol_PopupBg] = GuiCol::ImGuiCol_PopupBg;
  1011. }
  1012. else
  1013. {
  1014. GuiCol::COLGUI("PopupBg", ImVec4(0.08f, 0.08f, 0.08f, 0.94f));
  1015. }
  1016. char* _Border = new char[GuiCol::ImGuiCol1_Border.size() + 1];
  1017. strcpy(_Border, GuiCol::ImGuiCol1_Border.c_str());
  1018. if (_Border != (char*)"")
  1019. {
  1020. std::stringstream scolorhex;
  1021. scolorhex << std::hex << GuiCol::ImGuiCol1_Border;
  1022. scolorhex >> GuiCol::ImGuiCol2_Border;
  1023. GuiCol::ImGuiCol_Border = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_Border);
  1024. colors[ImGuiCol_::ImGuiCol_Border] = GuiCol::ImGuiCol_Border;
  1025. }
  1026. else
  1027. {
  1028. GuiCol::COLGUI("Border", ImVec4(0.30f, 0.30f, 0.30f, 0.50f));
  1029. }
  1030.  
  1031. char* _BorderShadow = new char[GuiCol::ImGuiCol1_BorderShadow.size() + 1];
  1032. strcpy(_BorderShadow, GuiCol::ImGuiCol1_BorderShadow.c_str());
  1033. if (_BorderShadow != (char*)"")
  1034. {
  1035. std::stringstream scolorhex;
  1036. scolorhex << std::hex << GuiCol::ImGuiCol1_BorderShadow;
  1037. scolorhex >> GuiCol::ImGuiCol2_BorderShadow;
  1038. GuiCol::ImGuiCol_Border = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_BorderShadow);
  1039. colors[ImGuiCol_::ImGuiCol_BorderShadow] = GuiCol::ImGuiCol_BorderShadow;
  1040. }
  1041. else
  1042. {
  1043. GuiCol::COLGUI("BorderShadow", ImVec4(0.00f, 0.00f, 0.00f, 0.00f));
  1044. }
  1045. char* _FrameBg = new char[GuiCol::ImGuiCol1_FrameBg.size() + 1];
  1046. strcpy(_FrameBg, GuiCol::ImGuiCol1_FrameBg.c_str());
  1047. if (_FrameBg != (char*)"")
  1048. {
  1049. std::stringstream scolorhex;
  1050. scolorhex << std::hex << GuiCol::ImGuiCol1_FrameBg;
  1051. scolorhex >> GuiCol::ImGuiCol2_FrameBg;
  1052. GuiCol::ImGuiCol_FrameBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_FrameBg);
  1053. colors[ImGuiCol_::ImGuiCol_FrameBg] = GuiCol::ImGuiCol_FrameBg;
  1054. }
  1055. else
  1056. {
  1057. GuiCol::COLGUI("FrameBg", ImVec4(0.21f, 0.21f, 0.21f, 0.54f));
  1058. }
  1059. char* _FrameBgHovered = new char[GuiCol::ImGuiCol1_FrameBgHovered.size() + 1];
  1060. strcpy(_FrameBgHovered, GuiCol::ImGuiCol1_FrameBgHovered.c_str());
  1061. if (_FrameBgHovered != (char*)"")
  1062. {
  1063. std::stringstream scolorhex;
  1064. scolorhex << std::hex << GuiCol::ImGuiCol1_FrameBgHovered;
  1065. scolorhex >> GuiCol::ImGuiCol2_FrameBgHovered;
  1066. GuiCol::ImGuiCol_FrameBgHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_FrameBgHovered);
  1067. colors[ImGuiCol_::ImGuiCol_FrameBgHovered] = GuiCol::ImGuiCol_FrameBgHovered;
  1068. }
  1069. else
  1070. {
  1071. GuiCol::COLGUI("FrameBgHovered", ImVec4(0.21f, 0.21f, 0.21f, 0.78f));
  1072. }
  1073. char* _FrameBgActive = new char[GuiCol::ImGuiCol1_FrameBgActive.size() + 1];
  1074. strcpy(_FrameBgActive, GuiCol::ImGuiCol1_FrameBgActive.c_str());
  1075. if (_FrameBgActive != (char*)"")
  1076. {
  1077. std::stringstream scolorhex;
  1078. scolorhex << std::hex << GuiCol::ImGuiCol1_FrameBgActive;
  1079. scolorhex >> GuiCol::ImGuiCol2_FrameBgActive;
  1080. GuiCol::ImGuiCol_FrameBgActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_FrameBgActive);
  1081. colors[ImGuiCol_::ImGuiCol_FrameBgActive] = GuiCol::ImGuiCol_FrameBgActive;
  1082. }
  1083. else
  1084. {
  1085. GuiCol::COLGUI("FrameBgActive", ImVec4(0.28f, 0.27f, 0.27f, 0.54f));
  1086. }
  1087. char* _TitleBg = new char[GuiCol::ImGuiCol1_TitleBg.size() + 1];
  1088. strcpy(_TitleBg, GuiCol::ImGuiCol1_TitleBg.c_str());
  1089. if (_TitleBg != (char*)"")
  1090. {
  1091. std::stringstream scolorhex;
  1092. scolorhex << std::hex << GuiCol::ImGuiCol1_TitleBg;
  1093. scolorhex >> GuiCol::ImGuiCol2_FrameBgActive;
  1094. GuiCol::ImGuiCol_TitleBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TitleBg);
  1095. colors[ImGuiCol_::ImGuiCol_TitleBg] = GuiCol::ImGuiCol_TitleBg;
  1096. }
  1097. else
  1098. {
  1099. GuiCol::COLGUI("TitleBg", ImVec4(0.17f, 0.17f, 0.17f, 1.00f));
  1100. }
  1101. char* _TitleBgActive = new char[GuiCol::ImGuiCol1_TitleBgActive.size() + 1];
  1102. strcpy(_TitleBgActive, GuiCol::ImGuiCol1_TitleBgActive.c_str());
  1103. if (_TitleBgActive != (char*)"")
  1104. {
  1105. std::stringstream scolorhex;
  1106. scolorhex << std::hex << GuiCol::ImGuiCol1_TitleBgActive;
  1107. scolorhex >> GuiCol::ImGuiCol2_TitleBgActive;
  1108. GuiCol::ImGuiCol_TitleBgActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TitleBgActive);
  1109. colors[ImGuiCol_::ImGuiCol_TitleBgActive] = GuiCol::ImGuiCol_TitleBgActive;
  1110. }
  1111. else
  1112. {
  1113. GuiCol::COLGUI("TitleBgActive", ImVec4(0.19f, 0.19f, 0.19f, 1.00f));
  1114. }
  1115. char* _TitleBgCollapsed = new char[GuiCol::ImGuiCol1_TitleBgCollapsed.size() + 1];
  1116. strcpy(_TitleBgCollapsed, GuiCol::ImGuiCol1_TitleBgCollapsed.c_str());
  1117. if (_TitleBgCollapsed != (char*)"")
  1118. {
  1119. std::stringstream scolorhex;
  1120. scolorhex << std::hex << GuiCol::ImGuiCol1_TitleBgCollapsed;
  1121. scolorhex >> GuiCol::ImGuiCol2_TitleBgCollapsed;
  1122. GuiCol::ImGuiCol_TitleBgCollapsed = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TitleBgCollapsed);
  1123. colors[ImGuiCol_::ImGuiCol_TitleBgCollapsed] = GuiCol::ImGuiCol_TitleBgCollapsed;
  1124. }
  1125. else
  1126. {
  1127. GuiCol::COLGUI("TitleBgCollapsed", ImVec4(0.00f, 0.00f, 0.00f, 0.51f));
  1128. }
  1129. char* _MenuBarBg = new char[GuiCol::ImGuiCol1_MenuBarBg.size() + 1];
  1130. strcpy(_MenuBarBg, GuiCol::ImGuiCol1_MenuBarBg.c_str());
  1131. if (_MenuBarBg != (char*)"")
  1132. {
  1133. std::stringstream scolorhex;
  1134. scolorhex << std::hex << GuiCol::ImGuiCol1_MenuBarBg;
  1135. scolorhex >> GuiCol::ImGuiCol2_MenuBarBg;
  1136. GuiCol::ImGuiCol_MenuBarBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_MenuBarBg);
  1137. colors[ImGuiCol_::ImGuiCol_MenuBarBg] = GuiCol::ImGuiCol_MenuBarBg;
  1138. }
  1139. else
  1140. {
  1141. GuiCol::COLGUI("MenuBarBg", ImVec4(0.14f, 0.14f, 0.14f, 1.00f));
  1142. }
  1143. char* _ScrollbarBg = new char[GuiCol::ImGuiCol1_ScrollbarBg.size() + 1];
  1144. strcpy(_ScrollbarBg, GuiCol::ImGuiCol1_ScrollbarBg.c_str());
  1145. if (_ScrollbarBg != (char*)"")
  1146. {
  1147. std::stringstream scolorhex;
  1148. scolorhex << std::hex << GuiCol::ImGuiCol1_ScrollbarBg;
  1149. scolorhex >> GuiCol::ImGuiCol2_MenuBarBg;
  1150. GuiCol::ImGuiCol_ScrollbarBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ScrollbarBg);
  1151. colors[ImGuiCol_::ImGuiCol_ScrollbarBg] = GuiCol::ImGuiCol_ScrollbarBg;
  1152. }
  1153. else
  1154. {
  1155. GuiCol::COLGUI("ScrollbarBg", ImVec4(0.02f, 0.02f, 0.02f, 0.53f));
  1156. }
  1157. char* _ScrollbarGrab = new char[GuiCol::ImGuiCol1_ScrollbarGrab.size() + 1];
  1158. strcpy(_ScrollbarGrab, GuiCol::ImGuiCol1_ScrollbarGrab.c_str());
  1159. if (_ScrollbarGrab != (char*)"")
  1160. {
  1161. std::stringstream scolorhex;
  1162. scolorhex << std::hex << GuiCol::ImGuiCol1_ScrollbarGrab;
  1163. scolorhex >> GuiCol::ImGuiCol2_ScrollbarGrab;
  1164. GuiCol::ImGuiCol_ScrollbarGrab = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ScrollbarGrab);
  1165. colors[ImGuiCol_::ImGuiCol_ScrollbarGrab] = GuiCol::ImGuiCol_ScrollbarGrab;
  1166. }
  1167. else
  1168. {
  1169. GuiCol::COLGUI("ScrollbarGrab", ImVec4(0.31f, 0.31f, 0.31f, 1.00f));
  1170. }
  1171. char* _ScrollbarGrabHovered = new char[GuiCol::ImGuiCol1_ScrollbarGrabHovered.size() + 1];
  1172. strcpy(_ScrollbarGrabHovered, GuiCol::ImGuiCol1_ScrollbarGrabHovered.c_str());
  1173. if (_ScrollbarGrabHovered != (char*)"")
  1174. {
  1175. std::stringstream scolorhex;
  1176. scolorhex << std::hex << GuiCol::ImGuiCol1_ScrollbarGrabHovered;
  1177. scolorhex >> GuiCol::ImGuiCol2_ScrollbarGrabHovered;
  1178. GuiCol::ImGuiCol_ScrollbarGrabHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ScrollbarGrabHovered);
  1179. colors[ImGuiCol_::ImGuiCol_ScrollbarGrabHovered] = GuiCol::ImGuiCol_ScrollbarGrabHovered;
  1180. }
  1181. else
  1182. {
  1183. GuiCol::COLGUI("ScrollbarGrabHovered", ImVec4(0.41f, 0.41f, 0.41f, 1.00f));
  1184. }
  1185. char* _ScrollbarGrabActive = new char[GuiCol::ImGuiCol1_ScrollbarGrabActive.size() + 1];
  1186. strcpy(_ScrollbarGrabActive, GuiCol::ImGuiCol1_ScrollbarGrabActive.c_str());
  1187. if (_ScrollbarGrabActive != (char*)"")
  1188. {
  1189. std::stringstream scolorhex;
  1190. scolorhex << std::hex << GuiCol::ImGuiCol1_ScrollbarGrabActive;
  1191. scolorhex >> GuiCol::ImGuiCol2_ScrollbarGrabActive;
  1192. GuiCol::ImGuiCol_ScrollbarGrabActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ScrollbarGrabActive);
  1193. colors[ImGuiCol_::ImGuiCol_ScrollbarGrabActive] = GuiCol::ImGuiCol_ScrollbarGrabActive;
  1194. }
  1195. else
  1196. {
  1197. GuiCol::COLGUI("ScrollbarGrabActive", ImVec4(0.51f, 0.51f, 0.51f, 1.00f));
  1198. }
  1199. char* _CheckMark = new char[GuiCol::ImGuiCol1_CheckMark.size() + 1];
  1200. strcpy(_CheckMark, GuiCol::ImGuiCol1_CheckMark.c_str());
  1201. if (_CheckMark != (char*)"")
  1202. {
  1203. std::stringstream scolorhex;
  1204. scolorhex << std::hex << GuiCol::ImGuiCol1_CheckMark;
  1205. scolorhex >> GuiCol::ImGuiCol2_CheckMark;
  1206. GuiCol::ImGuiCol_CheckMark = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_CheckMark);
  1207. colors[ImGuiCol_::ImGuiCol_CheckMark] = GuiCol::ImGuiCol_CheckMark;
  1208. }
  1209. else
  1210. {
  1211. GuiCol::COLGUI("CheckMark", ImVec4(1.00f, 1.00f, 1.00f, 1.00f));
  1212. }
  1213. char* _SliderGrab = new char[GuiCol::ImGuiCol1_SliderGrab.size() + 1];
  1214. strcpy(_SliderGrab, GuiCol::ImGuiCol1_SliderGrab.c_str());
  1215. if (_SliderGrab != (char*)"")
  1216. {
  1217. std::stringstream scolorhex;
  1218. scolorhex << std::hex << GuiCol::ImGuiCol1_SliderGrab;
  1219. scolorhex >> GuiCol::ImGuiCol2_SliderGrab;
  1220. GuiCol::ImGuiCol_SliderGrab = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_SliderGrab);
  1221. colors[ImGuiCol_::ImGuiCol_SliderGrab] = GuiCol::ImGuiCol_SliderGrab;
  1222. }
  1223. else
  1224. {
  1225. GuiCol::COLGUI("SliderGrab", ImVec4(0.34f, 0.34f, 0.34f, 1.00f));
  1226. }
  1227. char* _SliderGrabActive = new char[GuiCol::ImGuiCol1_SliderGrabActive.size() + 1];
  1228. strcpy(_SliderGrabActive, GuiCol::ImGuiCol1_SliderGrabActive.c_str());
  1229. if (_SliderGrabActive != (char*)"")
  1230. {
  1231. std::stringstream scolorhex;
  1232. scolorhex << std::hex << GuiCol::ImGuiCol1_SliderGrabActive;
  1233. scolorhex >> GuiCol::ImGuiCol2_SliderGrabActive;
  1234. GuiCol::ImGuiCol_SliderGrabActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_SliderGrabActive);
  1235. colors[ImGuiCol_::ImGuiCol_SliderGrabActive] = GuiCol::ImGuiCol_SliderGrabActive;
  1236. }
  1237. else
  1238. {
  1239. GuiCol::COLGUI("SliderGrabActive", ImVec4(0.39f, 0.38f, 0.38f, 1.00f));
  1240. }
  1241. char* _Button = new char[GuiCol::ImGuiCol1_Button.size() + 1];
  1242. strcpy(_Button, GuiCol::ImGuiCol1_Button.c_str());
  1243. if (_Button != (char*)"")
  1244. {
  1245. std::stringstream scolorhex;
  1246. scolorhex << std::hex << GuiCol::ImGuiCol1_Button;
  1247. scolorhex >> GuiCol::ImGuiCol2_Button;
  1248. GuiCol::ImGuiCol_Button = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_Button);
  1249. colors[ImGuiCol_::ImGuiCol_Button] = GuiCol::ImGuiCol_Button;
  1250. }
  1251. else
  1252. {
  1253. GuiCol::COLGUI("Button", ImVec4(0.41f, 0.41f, 0.41f, 0.74f));
  1254. }
  1255. char* _ButtonHovered = new char[GuiCol::ImGuiCol1_ButtonHovered.size() + 1];
  1256. strcpy(_ButtonHovered, GuiCol::ImGuiCol1_ButtonHovered.c_str());
  1257. if (_ButtonHovered != (char*)"")
  1258. {
  1259. std::stringstream scolorhex;
  1260. scolorhex << std::hex << GuiCol::ImGuiCol1_ButtonHovered;
  1261. scolorhex >> GuiCol::ImGuiCol2_ButtonHovered;
  1262. GuiCol::ImGuiCol_ButtonHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ButtonHovered);
  1263. colors[ImGuiCol_::ImGuiCol_ButtonHovered] = GuiCol::ImGuiCol_ButtonHovered;
  1264. }
  1265. else
  1266. {
  1267. GuiCol::COLGUI("ButtonHovered", ImVec4(0.41f, 0.41f, 0.41f, 0.78f));
  1268. }
  1269. char* _ButtonActive = new char[GuiCol::ImGuiCol1_ButtonActive.size() + 1];
  1270. strcpy(_ButtonActive, GuiCol::ImGuiCol1_ButtonActive.c_str());
  1271. if (_ButtonActive != (char*)"")
  1272. {
  1273. std::stringstream scolorhex;
  1274. scolorhex << std::hex << GuiCol::ImGuiCol1_ButtonActive;
  1275. scolorhex >> GuiCol::ImGuiCol2_ButtonActive;
  1276. GuiCol::ImGuiCol_ButtonActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ButtonActive);
  1277. colors[ImGuiCol_::ImGuiCol_ButtonActive] = GuiCol::ImGuiCol_ButtonActive;
  1278. }
  1279. else
  1280. {
  1281. GuiCol::COLGUI("ButtonActive", ImVec4(0.41f, 0.41f, 0.41f, 0.87f));
  1282. }
  1283. char* _Header = new char[GuiCol::ImGuiCol1_Header.size() + 1];
  1284. strcpy(_Header, GuiCol::ImGuiCol1_Header.c_str());
  1285. if (_Header != (char*)"")
  1286. {
  1287. std::stringstream scolorhex;
  1288. scolorhex << std::hex << GuiCol::ImGuiCol1_Header;
  1289. scolorhex >> GuiCol::ImGuiCol2_Header;
  1290. GuiCol::ImGuiCol_Header = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_Header);
  1291. colors[ImGuiCol_::ImGuiCol_Header] = GuiCol::ImGuiCol_Header;
  1292. }
  1293. else
  1294. {
  1295. GuiCol::COLGUI("Header", ImVec4(0.37f, 0.37f, 0.37f, 0.31f));
  1296. }
  1297. char* _HeaderHovered = new char[GuiCol::ImGuiCol1_HeaderHovered.size() + 1];
  1298. strcpy(_HeaderHovered, GuiCol::ImGuiCol1_HeaderHovered.c_str());
  1299. if (_HeaderHovered != (char*)"")
  1300. {
  1301. std::stringstream scolorhex;
  1302. scolorhex << std::hex << GuiCol::ImGuiCol1_HeaderHovered;
  1303. scolorhex >> GuiCol::ImGuiCol2_HeaderHovered;
  1304. GuiCol::ImGuiCol_HeaderHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_HeaderHovered);
  1305. colors[ImGuiCol_::ImGuiCol_HeaderHovered] = GuiCol::ImGuiCol_HeaderHovered;
  1306. }
  1307. else
  1308. {
  1309. GuiCol::COLGUI("HeaderHovered", ImVec4(0.38f, 0.38f, 0.38f, 0.37f));
  1310. }
  1311. char* _HeaderActive = new char[GuiCol::ImGuiCol1_HeaderActive.size() + 1];
  1312. strcpy(_HeaderActive, GuiCol::ImGuiCol1_HeaderActive.c_str());
  1313. if (_HeaderActive != (char*)"")
  1314. {
  1315. std::stringstream scolorhex;
  1316. scolorhex << std::hex << GuiCol::ImGuiCol1_HeaderActive;
  1317. scolorhex >> GuiCol::ImGuiCol2_HeaderActive;
  1318. GuiCol::ImGuiCol_HeaderActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_HeaderActive);
  1319. colors[ImGuiCol_::ImGuiCol_HeaderActive] = GuiCol::ImGuiCol_HeaderActive;
  1320. }
  1321. else
  1322. {
  1323. GuiCol::COLGUI("HeaderActive", ImVec4(0.37f, 0.37f, 0.37f, 0.51f));
  1324. }
  1325. char* _Separator = new char[GuiCol::ImGuiCol1_Separator.size() + 1];
  1326. strcpy(_Separator, GuiCol::ImGuiCol1_Separator.c_str());
  1327. if (_Separator != (char*)"")
  1328. {
  1329. std::stringstream scolorhex;
  1330. scolorhex << std::hex << GuiCol::ImGuiCol1_Separator;
  1331. scolorhex >> GuiCol::ImGuiCol2_Separator;
  1332. GuiCol::ImGuiCol_Separator = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_Separator);
  1333. colors[ImGuiCol_::ImGuiCol_Separator] = GuiCol::ImGuiCol_Separator;
  1334. }
  1335. else
  1336. {
  1337. GuiCol::COLGUI("Separator", ImVec4(0.38f, 0.38f, 0.38f, 0.50f));
  1338. }
  1339. char* _SeparatorHovered = new char[GuiCol::ImGuiCol1_SeparatorHovered.size() + 1];
  1340. strcpy(_SeparatorHovered, GuiCol::ImGuiCol1_SeparatorHovered.c_str());
  1341. if (_SeparatorHovered != (char*)"")
  1342. {
  1343. std::stringstream scolorhex;
  1344. scolorhex << std::hex << GuiCol::ImGuiCol1_SeparatorHovered;
  1345. scolorhex >> GuiCol::ImGuiCol2_SeparatorHovered;
  1346. GuiCol::ImGuiCol_SeparatorHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_SeparatorHovered);
  1347. colors[ImGuiCol_::ImGuiCol_SeparatorHovered] = GuiCol::ImGuiCol_SeparatorHovered;
  1348. }
  1349. else
  1350. {
  1351. GuiCol::COLGUI("SeparatorHovered", ImVec4(0.46f, 0.46f, 0.46f, 0.50f));
  1352. }
  1353. char* _SeparatorActive = new char[GuiCol::ImGuiCol1_SeparatorActive.size() + 1];
  1354. strcpy(_SeparatorActive, GuiCol::ImGuiCol1_SeparatorActive.c_str());
  1355. if (_SeparatorActive != (char*)"")
  1356. {
  1357. std::stringstream scolorhex;
  1358. scolorhex << std::hex << GuiCol::ImGuiCol1_SeparatorActive;
  1359. scolorhex >> GuiCol::ImGuiCol2_SeparatorActive;
  1360. GuiCol::ImGuiCol_SeparatorActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_SeparatorActive);
  1361. colors[ImGuiCol_::ImGuiCol_SeparatorActive] = GuiCol::ImGuiCol_SeparatorActive;
  1362. }
  1363. else
  1364. {
  1365. GuiCol::COLGUI("SeparatorActive", ImVec4(0.46f, 0.46f, 0.46f, 0.64f));
  1366. }
  1367. char* _ResizeGrip = new char[GuiCol::ImGuiCol1_ResizeGrip.size() + 1];
  1368. strcpy(_ResizeGrip, GuiCol::ImGuiCol1_ResizeGrip.c_str());
  1369. if (_ResizeGrip != (char*)"")
  1370. {
  1371. std::stringstream scolorhex;
  1372. scolorhex << std::hex << GuiCol::ImGuiCol1_ResizeGrip;
  1373. scolorhex >> GuiCol::ImGuiCol2_ResizeGrip;
  1374. GuiCol::ImGuiCol_ResizeGrip = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ResizeGrip);
  1375. colors[ImGuiCol_::ImGuiCol_ResizeGrip] = GuiCol::ImGuiCol_ResizeGrip;
  1376. }
  1377. else
  1378. {
  1379. GuiCol::COLGUI("ResizeGrip", ImVec4(0.26f, 0.26f, 0.26f, 1.00f));
  1380. }
  1381. char* _ResizeGripHovered = new char[GuiCol::ImGuiCol1_ResizeGripHovered.size() + 1];
  1382. strcpy(_ResizeGripHovered, GuiCol::ImGuiCol1_ResizeGripHovered.c_str());
  1383. if (_ResizeGripHovered != (char*)"")
  1384. {
  1385. std::stringstream scolorhex;
  1386. scolorhex << std::hex << GuiCol::ImGuiCol1_ResizeGripHovered;
  1387. scolorhex >> GuiCol::ImGuiCol2_ResizeGripHovered;
  1388. GuiCol::ImGuiCol_ResizeGripHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ResizeGripHovered);
  1389. colors[ImGuiCol_::ImGuiCol_ResizeGripHovered] = GuiCol::ImGuiCol_ResizeGripHovered;
  1390. }
  1391. else
  1392. {
  1393. GuiCol::COLGUI("ResizeGripHovered", ImVec4(0.31f, 0.31f, 0.31f, 1.00f));
  1394. }
  1395. char* _ResizeGripActive = new char[GuiCol::ImGuiCol1_ResizeGripActive.size() + 1];
  1396. strcpy(_ResizeGripActive, GuiCol::ImGuiCol1_ResizeGripActive.c_str());
  1397. if (_ResizeGripActive != (char*)"")
  1398. {
  1399. std::stringstream scolorhex;
  1400. scolorhex << std::hex << GuiCol::ImGuiCol1_ResizeGripActive;
  1401. scolorhex >> GuiCol::ImGuiCol2_ResizeGripActive;
  1402. GuiCol::ImGuiCol_ResizeGripActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ResizeGripActive);
  1403. colors[ImGuiCol_::ImGuiCol_ResizeGripActive] = GuiCol::ImGuiCol_ResizeGripActive;
  1404. }
  1405. else
  1406. {
  1407. GuiCol::COLGUI("ResizeGripActive", ImVec4(0.35f, 0.35f, 0.35f, 1.00f));
  1408. }
  1409. char* _Tab = new char[GuiCol::ImGuiCol1_Tab.size() + 1];
  1410. strcpy(_Tab, GuiCol::ImGuiCol1_Tab.c_str());
  1411. if (_Tab != (char*)"")
  1412. {
  1413. std::stringstream scolorhex;
  1414. scolorhex << std::hex << GuiCol::ImGuiCol1_Tab;
  1415. scolorhex >> GuiCol::ImGuiCol2_Tab;
  1416. GuiCol::ImGuiCol_Tab = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_Tab);
  1417. colors[ImGuiCol_::ImGuiCol_Tab] = GuiCol::ImGuiCol_Tab;
  1418. }
  1419. else
  1420. {
  1421. GuiCol::COLGUI("Tab", ImVec4(0.21f, 0.21f, 0.21f, 0.86f));
  1422. }
  1423. char* _TabHovered = new char[GuiCol::ImGuiCol1_TabHovered.size() + 1];
  1424. strcpy(_TabHovered, GuiCol::ImGuiCol1_TabHovered.c_str());
  1425. if (_TabHovered != (char*)"")
  1426. {
  1427. std::stringstream scolorhex;
  1428. scolorhex << std::hex << GuiCol::ImGuiCol1_TabHovered;
  1429. scolorhex >> GuiCol::ImGuiCol2_TabHovered;
  1430. GuiCol::ImGuiCol_TabHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TabHovered);
  1431. colors[ImGuiCol_::ImGuiCol_TabHovered] = GuiCol::ImGuiCol_TabHovered;
  1432. }
  1433. else
  1434. {
  1435. GuiCol::COLGUI("TabHovered", ImVec4(0.27f, 0.27f, 0.27f, 0.86f));
  1436. }
  1437. char* _TabActive = new char[GuiCol::ImGuiCol1_TabActive.size() + 1];
  1438. strcpy(_TabActive, GuiCol::ImGuiCol1_TabActive.c_str());
  1439. if (_TabActive != (char*)"")
  1440. {
  1441. std::stringstream scolorhex;
  1442. scolorhex << std::hex << GuiCol::ImGuiCol1_TabActive;
  1443. scolorhex >> GuiCol::ImGuiCol2_TabActive;
  1444. GuiCol::ImGuiCol_TabActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TabActive);
  1445. colors[ImGuiCol_::ImGuiCol_TabActive] = GuiCol::ImGuiCol_TabActive;
  1446. }
  1447. else
  1448. {
  1449. GuiCol::COLGUI("TabActive", ImVec4(0.34f, 0.34f, 0.34f, 0.86f));
  1450. }
  1451. char* _TabUnfocused = new char[GuiCol::ImGuiCol1_TabUnfocused.size() + 1];
  1452. strcpy(_TabUnfocused, GuiCol::ImGuiCol1_TabUnfocused.c_str());
  1453. if (_TabUnfocused != (char*)"")
  1454. {
  1455. std::stringstream scolorhex;
  1456. scolorhex << std::hex << GuiCol::ImGuiCol1_TabUnfocused;
  1457. scolorhex >> GuiCol::ImGuiCol2_TabUnfocused;
  1458. GuiCol::ImGuiCol_TabUnfocused = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TabUnfocused);
  1459. colors[ImGuiCol_::ImGuiCol_TabUnfocused] = GuiCol::ImGuiCol_TabUnfocused;
  1460. }
  1461. else
  1462. {
  1463. GuiCol::COLGUI("TabUnfocused", ImVec4(0.10f, 0.10f, 0.10f, 0.97f));
  1464. }
  1465. char* _TabUnfocusedActive = new char[GuiCol::ImGuiCol1_TabUnfocusedActive.size() + 1];
  1466. strcpy(_TabUnfocusedActive, GuiCol::ImGuiCol1_TabUnfocusedActive.c_str());
  1467. if (_TabUnfocusedActive != (char*)"")
  1468. {
  1469. std::stringstream scolorhex;
  1470. scolorhex << std::hex << GuiCol::ImGuiCol1_TabUnfocusedActive;
  1471. scolorhex >> GuiCol::ImGuiCol2_TabUnfocusedActive;
  1472. GuiCol::ImGuiCol_TabUnfocusedActive = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TabUnfocusedActive);
  1473. colors[ImGuiCol_::ImGuiCol_TabUnfocusedActive] = GuiCol::ImGuiCol_TabUnfocusedActive;
  1474. }
  1475. else
  1476. {
  1477. GuiCol::COLGUI("TabUnfocusedActive", ImVec4(0.15f, 0.15f, 0.15f, 1.00f));
  1478. }
  1479. char* _PlotLines = new char[GuiCol::ImGuiCol1_PlotLines.size() + 1];
  1480. strcpy(_PlotLines, GuiCol::ImGuiCol1_PlotLines.c_str());
  1481. if (_PlotLines != (char*)"")
  1482. {
  1483. std::stringstream scolorhex;
  1484. scolorhex << std::hex << GuiCol::ImGuiCol1_PlotLines;
  1485. scolorhex >> GuiCol::ImGuiCol2_PlotLines;
  1486. GuiCol::ImGuiCol_PlotLines = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_PlotLines);
  1487. colors[ImGuiCol_::ImGuiCol_PlotLines] = GuiCol::ImGuiCol_PlotLines;
  1488. }
  1489. else
  1490. {
  1491. GuiCol::COLGUI("PlotLines", ImVec4(0.61f, 0.61f, 0.61f, 1.00f));
  1492. }
  1493. char* _PlotLinesHovered = new char[GuiCol::ImGuiCol1_PlotLinesHovered.size() + 1];
  1494. strcpy(_PlotLinesHovered, GuiCol::ImGuiCol1_PlotLinesHovered.c_str());
  1495. if (_PlotLinesHovered != (char*)"")
  1496. {
  1497. std::stringstream scolorhex;
  1498. scolorhex << std::hex << GuiCol::ImGuiCol1_PlotLinesHovered;
  1499. scolorhex >> GuiCol::ImGuiCol2_PlotLinesHovered;
  1500. GuiCol::ImGuiCol_PlotLinesHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_PlotLinesHovered);
  1501. colors[ImGuiCol_::ImGuiCol_PlotLinesHovered] = GuiCol::ImGuiCol_PlotLinesHovered;
  1502. }
  1503. else
  1504. {
  1505. GuiCol::COLGUI("PlotLinesHovered", ImVec4(1.00f, 0.43f, 0.35f, 1.00f));
  1506. }
  1507. char* _PlotHistogram = new char[GuiCol::ImGuiCol1_PlotHistogram.size() + 1];
  1508. strcpy(_PlotHistogram, GuiCol::ImGuiCol1_PlotHistogram.c_str());
  1509. if (_PlotHistogram != (char*)"")
  1510. {
  1511. std::stringstream scolorhex;
  1512. scolorhex << std::hex << GuiCol::ImGuiCol1_PlotHistogram;
  1513. scolorhex >> GuiCol::ImGuiCol2_PlotHistogram;
  1514. GuiCol::ImGuiCol_PlotHistogram = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_PlotHistogram);
  1515. colors[ImGuiCol_::ImGuiCol_PlotHistogram] = GuiCol::ImGuiCol_PlotHistogram;
  1516. }
  1517. else
  1518. {
  1519. GuiCol::COLGUI("PlotHistogram", ImVec4(0.90f, 0.70f, 0.00f, 1.00f));
  1520. }
  1521. char* _PlotHistogramHovered = new char[GuiCol::ImGuiCol1_PlotHistogramHovered.size() + 1];
  1522. strcpy(_PlotHistogramHovered, GuiCol::ImGuiCol1_PlotHistogramHovered.c_str());
  1523. if (_PlotHistogramHovered != (char*)"")
  1524. {
  1525. std::stringstream scolorhex;
  1526. scolorhex << std::hex << GuiCol::ImGuiCol1_PlotHistogramHovered;
  1527. scolorhex >> GuiCol::ImGuiCol2_PlotHistogramHovered;
  1528. GuiCol::ImGuiCol_PlotHistogramHovered = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_PlotHistogramHovered);
  1529. colors[ImGuiCol_::ImGuiCol_PlotHistogramHovered] = GuiCol::ImGuiCol_PlotHistogramHovered;
  1530. }
  1531. else
  1532. {
  1533. GuiCol::COLGUI("PlotHistogramHovered", ImVec4(1.00f, 0.60f, 0.00f, 1.00f));
  1534. }
  1535. char* _TextSelectedBg = new char[GuiCol::ImGuiCol1_TextSelectedBg.size() + 1];
  1536. strcpy(_TextSelectedBg, GuiCol::ImGuiCol1_TextSelectedBg.c_str());
  1537. if (_TextSelectedBg != (char*)"")
  1538. {
  1539. std::stringstream scolorhex;
  1540. scolorhex << std::hex << GuiCol::ImGuiCol1_TextSelectedBg;
  1541. scolorhex >> GuiCol::ImGuiCol2_TextSelectedBg;
  1542. GuiCol::ImGuiCol_TextSelectedBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_TextSelectedBg);
  1543. colors[ImGuiCol_::ImGuiCol_TextSelectedBg] = GuiCol::ImGuiCol_TextSelectedBg;
  1544. }
  1545. else
  1546. {
  1547. GuiCol::COLGUI("TextSelectedBg", ImVec4(0.26f, 0.59f, 0.98f, 0.35f));
  1548. }
  1549. char* _DragDropTarget = new char[GuiCol::ImGuiCol1_DragDropTarget.size() + 1];
  1550. strcpy(_DragDropTarget, GuiCol::ImGuiCol1_DragDropTarget.c_str());
  1551. if (_DragDropTarget != (char*)"")
  1552. {
  1553. std::stringstream scolorhex;
  1554. scolorhex << std::hex << GuiCol::ImGuiCol1_DragDropTarget;
  1555. scolorhex >> GuiCol::ImGuiCol2_DragDropTarget;
  1556. GuiCol::ImGuiCol_DragDropTarget = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_DragDropTarget);
  1557. colors[ImGuiCol_::ImGuiCol_DragDropTarget] = GuiCol::ImGuiCol_DragDropTarget;
  1558. }
  1559. else
  1560. {
  1561. GuiCol::COLGUI("DragDropTarget", ImVec4(1.00f, 1.00f, 0.00f, 0.90f));
  1562. }
  1563. char* _NavHighlight = new char[GuiCol::ImGuiCol1_NavHighlight.size() + 1];
  1564. strcpy(_NavHighlight, GuiCol::ImGuiCol1_NavHighlight.c_str());
  1565. if (_NavHighlight != (char*)"")
  1566. {
  1567. std::stringstream scolorhex;
  1568. scolorhex << std::hex << GuiCol::ImGuiCol1_NavHighlight;
  1569. scolorhex >> GuiCol::ImGuiCol2_NavHighlight;
  1570. GuiCol::ImGuiCol_NavHighlight = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_NavHighlight);
  1571. colors[ImGuiCol_::ImGuiCol_NavHighlight] = GuiCol::ImGuiCol_NavHighlight;
  1572. }
  1573. else
  1574. {
  1575. GuiCol::COLGUI("NavHighlight", ImVec4(0.26f, 0.59f, 0.98f, 1.00f));
  1576. }
  1577. char* _NavWindowingHighlight = new char[GuiCol::ImGuiCol1_NavWindowingHighlight.size() + 1];
  1578. strcpy(_NavWindowingHighlight, GuiCol::ImGuiCol1_NavWindowingHighlight.c_str());
  1579. if (_NavWindowingHighlight != (char*)"")
  1580. {
  1581. std::stringstream scolorhex;
  1582. scolorhex << std::hex << GuiCol::ImGuiCol1_NavWindowingHighlight;
  1583. scolorhex >> GuiCol::ImGuiCol2_NavWindowingHighlight;
  1584. GuiCol::ImGuiCol_NavWindowingHighlight = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_NavWindowingHighlight);
  1585. colors[ImGuiCol_::ImGuiCol_NavWindowingHighlight] = GuiCol::ImGuiCol_NavWindowingHighlight;
  1586. }
  1587. else
  1588. {
  1589. GuiCol::COLGUI("NavWindowingHighlight", ImVec4(1.00f, 1.00f, 1.00f, 0.70f));
  1590. }
  1591. char* _NavWindowingDimBg = new char[GuiCol::ImGuiCol1_NavWindowingDimBg.size() + 1];
  1592. strcpy(_NavWindowingDimBg, GuiCol::ImGuiCol1_NavWindowingDimBg.c_str());
  1593. if (_NavWindowingDimBg != (char*)"")
  1594. {
  1595. std::stringstream scolorhex;
  1596. scolorhex << std::hex << GuiCol::ImGuiCol1_NavWindowingDimBg;
  1597. scolorhex >> GuiCol::ImGuiCol2_NavWindowingDimBg;
  1598. GuiCol::ImGuiCol_NavWindowingDimBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_NavWindowingDimBg);
  1599. colors[ImGuiCol_::ImGuiCol_NavWindowingDimBg] = GuiCol::ImGuiCol_NavWindowingDimBg;
  1600. }
  1601. else
  1602. {
  1603. GuiCol::COLGUI("NavWindowingDimBg", ImVec4(0.80f, 0.80f, 0.80f, 0.20f));
  1604. }
  1605. char* _ModalWindowDimBg = new char[GuiCol::ImGuiCol1_ModalWindowDimBg.size() + 1];
  1606. strcpy(_ModalWindowDimBg, GuiCol::ImGuiCol1_ModalWindowDimBg.c_str());
  1607. if (_ModalWindowDimBg != (char*)"")
  1608. {
  1609. std::stringstream scolorhex;
  1610. scolorhex << std::hex << GuiCol::ImGuiCol1_ModalWindowDimBg;
  1611. scolorhex >> GuiCol::ImGuiCol2_ModalWindowDimBg;
  1612. GuiCol::ImGuiCol_ModalWindowDimBg = ImGui::ColorConvertU32ToFloat42(GuiCol::ImGuiCol2_ModalWindowDimBg);
  1613. colors[ImGuiCol_::ImGuiCol_ModalWindowDimBg] = GuiCol::ImGuiCol_ModalWindowDimBg;
  1614. }
  1615. else
  1616. {
  1617. GuiCol::COLGUI("ModalWindowDimBg", ImVec4(0.80f, 0.80f, 0.80f, 0.35f));
  1618. }
  1619. return 0;
  1620. }
  1621.  
  1622. namespace functions {
  1623. std::wstring s2ws(const std::string& s)
  1624. {
  1625. int len;
  1626. int slength = (int)s.length() + 1;
  1627. len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
  1628. wchar_t* buf = new wchar_t[len];
  1629. MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);
  1630. std::wstring r(buf);
  1631. delete[] buf;
  1632. return r;
  1633. }
  1634. }
  1635. #include <Windows.h>
  1636. #include <urlmon.h>
  1637. #pragma comment(lib, "urlmon.lib")
  1638. int Github::downloading()
  1639. {
  1640. std::string dwnld_URL = "https://github.com/3xploitch3ats/Thunder-Menu/raw/header/Thunder.ytd";
  1641. std::string savepath = Directory::get_current_dir() + "\\ThunderMenu\\Thunder.ytd";
  1642. std::wstring downloadfile = functions::s2ws(dwnld_URL);
  1643. LPCWSTR downloadingfile = downloadfile.c_str();
  1644. std::wstring savefile = functions::s2ws(savepath);
  1645. LPCWSTR savingfile = savefile.c_str();
  1646. /*URLDownloadToFile(NULL, dwnld_URL.c_str(), savepath.c_str(), 0, NULL);*/
  1647. URLDownloadToFile(NULL, downloadingfile, savingfile, 0, NULL);
  1648. return 0;
  1649. }
  1650.  
  1651. H HASH::GET_HASH_KEY(char* value)
  1652. {
  1653. size_t len = strlen(value);
  1654. DWORD hash, i;
  1655. for (hash = i = 0; i < len; ++i)
  1656. {
  1657. hash += tolower(value[i]);
  1658. hash += (hash << 10);
  1659. hash ^= (hash >> 6);
  1660. }
  1661. hash += (hash << 3);
  1662. hash ^= (hash >> 11);
  1663. hash += (hash << 15);
  1664. return hash; // joaat
  1665. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement