From 3d7c622efa8748198ff534fb0c9d78e474acd88c Mon Sep 17 00:00:00 2001 From: DeadlineEm Date: Wed, 5 Feb 2025 03:13:40 -0500 Subject: [PATCH 1/4] UI Restyling for Terminus Altered APPDATA path from HorseMenu to Terminus --- CMakeLists.txt | 1 - src/game/frontend/Menu.cpp | 99 +++++++++++++++++--------------------- src/main.cpp | 2 +- 3 files changed, 44 insertions(+), 58 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 638694a0..61fb8513 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,6 @@ include(cmake/json.cmake) include(cmake/minhook.cmake) include(cmake/rdr-classes.cmake) - # source set(SRC_DIR "${PROJECT_SOURCE_DIR}/src") file(GLOB_RECURSE SRC_FILES diff --git a/src/game/frontend/Menu.cpp b/src/game/frontend/Menu.cpp index e9937676..9ba25c8b 100644 --- a/src/game/frontend/Menu.cpp +++ b/src/game/frontend/Menu.cpp @@ -16,10 +16,12 @@ #include "submenus/World.hpp" #include "submenus/Recovery.hpp" + namespace YimMenu { void Menu::Init() { + // Arguably the only place this file should be edited at for more menus UIManager::AddSubmenu(std::make_shared()); UIManager::AddSubmenu(std::make_shared()); @@ -36,13 +38,12 @@ namespace YimMenu return; ImGui::PushFont(Menu::Font::g_DefaultFont); - ImGui::PushStyleColor(ImGuiCol_WindowBg, ImU32(ImColor(15, 15, 15))); + ImGui::PushStyleColor(ImGuiCol_WindowBg, ImU32(ImColor(25, 25, 35))); + + ImGui::SetNextWindowSize(ImVec2((*Pointers.ScreenResX / 3.1), (*Pointers.ScreenResY / 1.5)), ImGuiCond_Once); - // Think this add HTML&PHP with no CSS. Lol just for testing. - ImGui::SetNextWindowSize(ImVec2((*Pointers.ScreenResX / 2.5), (*Pointers.ScreenResY / 2.5)), ImGuiCond_Once); if (ImGui::Begin("Terminus", nullptr, ImGuiWindowFlags_NoDecoration)) { - //ImGui::BeginDisabled(*Pointers.IsSessionStarted); if (ImGui::Button("Unload", ImVec2(120, 0))) { if (ScriptMgr::CanTick()) @@ -57,7 +58,6 @@ namespace YimMenu g_Running = false; } } - //ImGui::EndDisabled(); UIManager::Draw(); @@ -69,59 +69,44 @@ namespace YimMenu }, -1); } - void Menu::SetupStyle() { - ImGuiStyle& style = ImGui::GetStyle(); - style.Colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); - style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f); - style.Colors[ImGuiCol_WindowBg] = ImVec4(0.13f, 0.14f, 0.15f, 1.00f); - style.Colors[ImGuiCol_ChildBg] = ImVec4(0.13f, 0.14f, 0.15f, 1.00f); - style.Colors[ImGuiCol_PopupBg] = ImVec4(0.13f, 0.14f, 0.15f, 1.00f); - style.Colors[ImGuiCol_Border] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f); - style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); - style.Colors[ImGuiCol_FrameBg] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f); - style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.38f, 0.38f, 0.38f, 1.00f); - style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.67f, 0.67f, 0.67f, 0.39f); - style.Colors[ImGuiCol_TitleBg] = ImVec4(0.08f, 0.08f, 0.09f, 1.00f); - style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.08f, 0.08f, 0.09f, 1.00f); - style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f); - style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f); - style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.53f); - style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f); - style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f); - style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.51f, 0.51f, 0.51f, 1.00f); - style.Colors[ImGuiCol_CheckMark] = ImVec4(0.11f, 0.64f, 0.92f, 1.00f); - style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.11f, 0.64f, 0.92f, 1.00f); - style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.08f, 0.50f, 0.72f, 1.00f); - style.Colors[ImGuiCol_Button] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f); - style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.38f, 0.38f, 0.38f, 1.00f); - style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.67f, 0.67f, 0.67f, 0.39f); - style.Colors[ImGuiCol_Header] = ImVec4(0.22f, 0.22f, 0.22f, 1.00f); - style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f); - style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.67f, 0.67f, 0.67f, 0.39f); - style.Colors[ImGuiCol_Separator] = style.Colors[ImGuiCol_Border]; - style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.41f, 0.42f, 0.44f, 1.00f); - style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); - style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); - style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.29f, 0.30f, 0.31f, 0.67f); - style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); - style.Colors[ImGuiCol_Tab] = ImVec4(0.08f, 0.08f, 0.09f, 0.83f); - style.Colors[ImGuiCol_TabHovered] = ImVec4(0.33f, 0.34f, 0.36f, 0.83f); - style.Colors[ImGuiCol_TabActive] = ImVec4(0.23f, 0.23f, 0.24f, 1.00f); - style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.08f, 0.08f, 0.09f, 1.00f); - style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.13f, 0.14f, 0.15f, 1.00f); - style.Colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f); - style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f); - style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); - style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f); - style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f); - style.Colors[ImGuiCol_DragDropTarget] = ImVec4(0.11f, 0.64f, 0.92f, 1.00f); - style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); - style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f); - style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f); - style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f); - style.GrabRounding = style.FrameRounding = style.ChildRounding = style.WindowRounding = 2.3f; + ImGuiStyle& style = ImGui::GetStyle(); + + style.Colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f); + style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f); + + style.Colors[ImGuiCol_WindowBg] = ImVec4(0.10f, 0.10f, 0.12f, 1.00f); + style.Colors[ImGuiCol_ChildBg] = ImVec4(0.12f, 0.12f, 0.14f, 1.00f); + style.Colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.10f, 0.95f); + + style.Colors[ImGuiCol_Border] = ImVec4(0.28f, 0.28f, 0.28f, 0.25f); + style.Colors[ImGuiCol_FrameBg] = ImVec4(0.18f, 0.18f, 0.20f, 1.00f); + style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.35f, 0.40f, 0.50f, 0.75f); + style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.45f, 0.50f, 0.60f, 0.85f); + + style.Colors[ImGuiCol_Button] = ImVec4(0.40f, 0.25f, 0.50f, 1.00f); + style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.50f, 0.35f, 0.60f, 1.00f); + style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.60f, 0.45f, 0.75f, 1.00f); + + style.Colors[ImGuiCol_TitleBg] = ImVec4(0.08f, 0.08f, 0.10f, 1.00f); + style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.10f, 0.12f, 0.14f, 1.00f); + style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.05f, 0.05f, 0.06f, 1.00f); + + style.Colors[ImGuiCol_Tab] = ImVec4(0.25f, 0.20f, 0.45f, 0.85f); + style.Colors[ImGuiCol_TabHovered] = ImVec4(0.35f, 0.30f, 0.65f, 0.85f); + style.Colors[ImGuiCol_TabActive] = ImVec4(0.40f, 0.35f, 0.75f, 1.00f); + + style.Colors[ImGuiCol_Header] = ImVec4(0.20f, 0.25f, 0.35f, 1.00f); + style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.35f, 0.40f, 0.50f, 1.00f); + style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.45f, 0.50f, 0.60f, 1.00f); + + style.Colors[ImGuiCol_PlotLines] = ImVec4(0.80f, 0.80f, 0.00f, 0.00f); + style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.85f, 0.00f, 1.00f); + style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.20f, 1.00f); + style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.80f, 0.40f, 1.00f); + + style.GrabRounding = style.FrameRounding = style.ChildRounding = style.WindowRounding = 8.0f; g } void Menu::SetupFonts() @@ -135,6 +120,8 @@ namespace YimMenu Menu::Font::g_ChildTitleFont = IO.Fonts->AddFontFromMemoryTTF(const_cast(Fonts::MainFont), sizeof(Fonts::MainFont), Menu::Font::g_ChildTitleFontSize, &FontCfg); Menu::Font::g_ChatFont = IO.Fonts->AddFontFromMemoryTTF(const_cast(Fonts::MainFont), sizeof(Fonts::MainFont), Menu::Font::g_ChatFontSize, &FontCfg); Menu::Font::g_OverlayFont = IO.Fonts->AddFontFromMemoryTTF(const_cast(Fonts::MainFont), sizeof(Fonts::MainFont), Menu::Font::g_OverlayFontSize, &FontCfg); + UIManager::SetOptionsFont(Menu::Font::g_OptionsFont); } + } diff --git a/src/main.cpp b/src/main.cpp index 027b784f..c89e941e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,7 +21,7 @@ namespace YimMenu { static DWORD Main(void*) { - const auto documents = std::filesystem::path(std::getenv("appdata")) / "HorseMenu"; + const auto documents = std::filesystem::path(std::getenv("appdata")) / "Terminus"; FileMgr::Init(documents); LogHelper::Init("Terminus", FileMgr::GetProjectFile("./cout.log")); From 5d615919b559ff06f9db3875e63235cc913a2a1d Mon Sep 17 00:00:00 2001 From: DeadlineEm Date: Wed, 5 Feb 2025 00:15:54 -0800 Subject: [PATCH 2/4] Update README.md Updated Screenshot --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6bfa1617..e1a5806c 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,6 @@ Use a popular injector (Xenos/Extreme Injector/Etc.) and inject into rdr2.exe ## Screenshots / UI Design -![image](https://github.com/YimMenu/HorseMenu/assets/24372625/e1395e75-7feb-4c4a-9286-bd774e2aaeca) +![image](https://ibb.co/gZnK0xDf) From 5fc7344d556ea8cf756fa8cac844ce9ba62896f3 Mon Sep 17 00:00:00 2001 From: DeadlineEm Date: Wed, 5 Feb 2025 00:16:27 -0800 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e1a5806c..1e51c294 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,6 @@ Use a popular injector (Xenos/Extreme Injector/Etc.) and inject into rdr2.exe ## Screenshots / UI Design -![image](https://ibb.co/gZnK0xDf) +![image]([https://ibb.co/gZnK0xDf](https://i.ibb.co/WvTJrLcM/Screenshot-190.png)) From de0d275f62d2521dd73af69b2e33afd1e2782de4 Mon Sep 17 00:00:00 2001 From: DeadlineEm Date: Wed, 5 Feb 2025 00:17:05 -0800 Subject: [PATCH 4/4] Update README.md Updated Screenshot --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e51c294..7d42d63a 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,6 @@ Use a popular injector (Xenos/Extreme Injector/Etc.) and inject into rdr2.exe ## Screenshots / UI Design -![image]([https://ibb.co/gZnK0xDf](https://i.ibb.co/WvTJrLcM/Screenshot-190.png)) +![image](https://i.ibb.co/WvTJrLcM/Screenshot-190.png)