Add ImGui style from Cheat Menu on the gta trilogy.
Add credits to user-grinch for the style used in readme and in the code. Disable dll test code.
This commit is contained in:
parent
affa0dbe3f
commit
b49dd981e7
@ -40,3 +40,7 @@ Here are some images of what this ImGui test is so far
|
|||||||
 -->
|
 -->
|
||||||
|
|
||||||
|
|
||||||
|
# Credits
|
||||||
|
Credit to user-grinch on github for the ImGui style that I am using.
|
||||||
|
The code for it is in imgui_functions.cpp under 'ImGuiFunctions::Main::ApplyStyle()'
|
||||||
|
* https://github.com/user-grinch/Cheat-Menu/blob/master/src/cheatmenu.cpp#L271-L335
|
@ -69,6 +69,8 @@ int main(int, char**)
|
|||||||
|
|
||||||
// I forgot about making a test DLL for this project.
|
// I forgot about making a test DLL for this project.
|
||||||
// DLL initialize
|
// DLL initialize
|
||||||
|
|
||||||
|
#ifdef DLL_TEST
|
||||||
HINSTANCE hinstDLL;
|
HINSTANCE hinstDLL;
|
||||||
DLLPROC HelloWorld;
|
DLLPROC HelloWorld;
|
||||||
BOOL fFreeDLL;
|
BOOL fFreeDLL;
|
||||||
@ -119,6 +121,9 @@ int main(int, char**)
|
|||||||
|
|
||||||
// End DLL initialize
|
// End DLL initialize
|
||||||
|
|
||||||
|
|
||||||
|
#endif //DLL_TEST
|
||||||
|
|
||||||
#endif //_DIRECTX9
|
#endif //_DIRECTX9
|
||||||
#endif //_TEST1
|
#endif //_TEST1
|
||||||
|
|
||||||
|
@ -107,4 +107,72 @@ static void ImGuiFunctions::Main::HelpMarker(const char* desc)
|
|||||||
ImGui::PopTextWrapPos();
|
ImGui::PopTextWrapPos();
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Credit to user-grinch on github for the style code here.
|
||||||
|
// https://github.com/user-grinch/Cheat-Menu/blob/master/src/cheatmenu.cpp#L271-L335
|
||||||
|
void ImGuiFunctions::Main::ApplyStyle()
|
||||||
|
{
|
||||||
|
ImGuiStyle* style = &ImGui::GetStyle();
|
||||||
|
ImVec4* colors = style->Colors;
|
||||||
|
|
||||||
|
style->WindowPadding = ImVec2(8, 8);
|
||||||
|
style->WindowRounding = 5.0f;
|
||||||
|
style->FramePadding = ImVec2(8, 8);
|
||||||
|
style->FrameRounding = 5.0f;
|
||||||
|
style->PopupRounding = 5.0f;
|
||||||
|
style->ItemSpacing = ImVec2(7, 7);
|
||||||
|
style->ItemInnerSpacing = ImVec2(7, 7);
|
||||||
|
style->IndentSpacing = 25.0f;
|
||||||
|
style->ScrollbarSize = 12.0f;
|
||||||
|
style->ScrollbarRounding = 10.0f;
|
||||||
|
style->GrabMinSize = 5.0f;
|
||||||
|
style->GrabRounding = 3.0f;
|
||||||
|
|
||||||
|
style->ChildBorderSize = 0;
|
||||||
|
style->WindowBorderSize = 0;
|
||||||
|
style->FrameBorderSize = 0;
|
||||||
|
style->TabBorderSize = 0;
|
||||||
|
style->PopupBorderSize = 0;
|
||||||
|
|
||||||
|
style->Colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_TextDisabled] = ImVec4(0.35f, 0.33f, 0.3f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.06f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_ChildBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
style->Colors[ImGuiCol_PopupBg] = ImVec4(0.06f, 0.05f, 0.06f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_Border] = ImVec4(0.12f, 0.12f, 0.12f, 1.0f);
|
||||||
|
style->Colors[ImGuiCol_BorderShadow] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_FrameBg] = ImVec4(0.15f, 0.15f, 0.15f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_FrameBgActive] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_TitleBg] = ImVec4(0.12f, 0.12f, 0.12f, 0.94f);
|
||||||
|
style->Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
|
||||||
|
style->Colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_MenuBarBg] = ImVec4(0.15f, 0.15f, 0.15f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.15f, 0.15f, 0.15f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.5f, 0.5f, 0.5f, 0.3f);
|
||||||
|
style->Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.7f, 0.7f, 0.7f, 0.3f);
|
||||||
|
style->Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.9f, 0.9f, 0.9f, 0.3f);
|
||||||
|
style->Colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
|
||||||
|
style->Colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
|
||||||
|
style->Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
|
||||||
|
style->Colors[ImGuiCol_Separator] = ImVec4(0.15f, 0.15f, 0.15f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_Button] = ImVec4(0.15f, 0.15f, 0.15f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_ButtonHovered] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_ButtonActive] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_Tab] = ImVec4(0.15f, 0.15f, 0.15f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_TabHovered] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_TabActive] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_Header] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
style->Colors[ImGuiCol_HeaderHovered] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_ResizeGrip] = ImVec4(0.12f, 0.12f, 0.12f, 0.00f);
|
||||||
|
style->Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
|
||||||
|
style->Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
|
||||||
|
style->Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
|
||||||
|
style->Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.06f, 0.05f, 0.06f, 0.95f);
|
||||||
|
style->Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.6f);
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ namespace ImGuiFunctions {
|
|||||||
void ShowWindow(HWND hwnd);
|
void ShowWindow(HWND hwnd);
|
||||||
void ShutDown();
|
void ShutDown();
|
||||||
void DestroyWindow(HWND hwnd, WNDCLASSEXW wc);
|
void DestroyWindow(HWND hwnd, WNDCLASSEXW wc);
|
||||||
|
void ApplyStyle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,6 +202,10 @@ void DirectX9Test::directX9Test()
|
|||||||
|
|
||||||
// Setup Dear ImGui style
|
// Setup Dear ImGui style
|
||||||
ImGui::StyleColorsDark();
|
ImGui::StyleColorsDark();
|
||||||
|
// Setup the style from the Cheat Menu
|
||||||
|
// https://github.com/user-grinch/Cheat-Menu
|
||||||
|
ImGuiFunctions::Main::ApplyStyle();
|
||||||
|
|
||||||
//ImGui::StyleColorsLight();
|
//ImGui::StyleColorsLight();
|
||||||
|
|
||||||
// Setup Platform/Renderer backends
|
// Setup Platform/Renderer backends
|
||||||
|
Loading…
Reference in New Issue
Block a user