Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .vscode/launch.json

This file was deleted.

99 changes: 0 additions & 99 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Terminus (formerly HorseMenu)
# Terminus

A mod menu for Red Dead Redemption 2 and Red Dead Online published by Rockstar Games. Strictly for educational purposes.

Expand All @@ -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://github.com/user-attachments/assets/789fc002-b258-40b1-a482-f188e557e2d8)


3 changes: 2 additions & 1 deletion src/game/backend/PlayerDatabase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ namespace YimMenu
bool is_admin = false;
bool block_join = false;
bool trust = false;
std::string notes = "";
std::unordered_set<uint32_t> infractions;

NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(persistent_player, rid, name, is_modder, is_admin, block_join, trust, infractions);
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(persistent_player, rid, name, is_modder, is_admin, block_join, trust, notes, infractions);
};


Expand Down
87 changes: 87 additions & 0 deletions src/game/frontend/ColorCustomization.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#include "ColorCustomization.hpp"
#include <imgui.h>

namespace YimMenu::ColorCustomization
{
// Default colors from Menu::SetupStyle()
ColorCommand _MenuWindowBg("menu_window_bg", "Window Background", "Changes the window background color", ImVec4{0.13f, 0.14f, 0.15f, 1.00f});
ColorCommand _MenuChildBg("menu_child_bg", "Panel Background", "Changes the panel background color", ImVec4{0.13f, 0.14f, 0.15f, 1.00f});
ColorCommand _MenuTextColor("menu_text_color", "Text Color", "Changes the text color", ImVec4{1.00f, 1.00f, 1.00f, 1.00f});
ColorCommand _MenuButtonColor("menu_button_color", "Button Color", "Changes the button color", ImVec4{0.25f, 0.25f, 0.25f, 1.00f});
ColorCommand _MenuButtonHovered("menu_button_hovered", "Button Hovered", "Changes the button hover color", ImVec4{0.38f, 0.38f, 0.38f, 1.00f});
ColorCommand _MenuButtonActive("menu_button_active", "Button Active", "Changes the button active color", ImVec4{0.67f, 0.67f, 0.67f, 0.39f});
ColorCommand _MenuBorderColor("menu_border_color", "Border Color", "Changes the border color", ImVec4{0.43f, 0.43f, 0.50f, 0.50f});

void ApplyMenuColors()
{
auto& style = ImGui::GetStyle();
style.Colors[ImGuiCol_WindowBg] = _MenuWindowBg.GetState();
style.Colors[ImGuiCol_ChildBg] = _MenuChildBg.GetState();
style.Colors[ImGuiCol_Text] = _MenuTextColor.GetState();
style.Colors[ImGuiCol_Button] = _MenuButtonColor.GetState();
style.Colors[ImGuiCol_ButtonHovered] = _MenuButtonHovered.GetState();
style.Colors[ImGuiCol_ButtonActive] = _MenuButtonActive.GetState();
style.Colors[ImGuiCol_Border] = _MenuBorderColor.GetState();
}

void ResetToDefaultColors()
{
_MenuWindowBg.SetState(ImVec4{0.13f, 0.14f, 0.15f, 1.00f});
_MenuChildBg.SetState(ImVec4{0.13f, 0.14f, 0.15f, 1.00f});
_MenuTextColor.SetState(ImVec4{1.00f, 1.00f, 1.00f, 1.00f});
_MenuButtonColor.SetState(ImVec4{0.25f, 0.25f, 0.25f, 1.00f});
_MenuButtonHovered.SetState(ImVec4{0.38f, 0.38f, 0.38f, 1.00f});
_MenuButtonActive.SetState(ImVec4{0.67f, 0.67f, 0.67f, 0.39f});
_MenuBorderColor.SetState(ImVec4{0.43f, 0.43f, 0.50f, 0.50f});
}

void DrawColorSettings()
{
if (ImGui::Button("Reset to Default Colors", ImVec2(-1, 0)))
{
ResetToDefaultColors();
}

// Create two columns with headers at the same level
ImGui::Columns(2, "ColorColumns", false);

// Left column header
ImGui::Text("Window & Background");

ImVec4 windowBg = _MenuWindowBg.GetState();
if (ImGui::ColorEdit4("Window Background", &windowBg.x, ImGuiColorEditFlags_NoInputs))
_MenuWindowBg.SetState(windowBg);

ImVec4 childBg = _MenuChildBg.GetState();
if (ImGui::ColorEdit4("Panel Background", &childBg.x, ImGuiColorEditFlags_NoInputs))
_MenuChildBg.SetState(childBg);

ImVec4 textColor = _MenuTextColor.GetState();
if (ImGui::ColorEdit4("Text Color", &textColor.x, ImGuiColorEditFlags_NoInputs))
_MenuTextColor.SetState(textColor);

ImVec4 borderColor = _MenuBorderColor.GetState();
if (ImGui::ColorEdit4("Border Color", &borderColor.x, ImGuiColorEditFlags_NoInputs))
_MenuBorderColor.SetState(borderColor);

// Move to right column
ImGui::NextColumn();

// Right column header - this will be at the same level as left header
ImGui::Text("Button Colors");

ImVec4 buttonColor = _MenuButtonColor.GetState();
if (ImGui::ColorEdit4("Button Normal", &buttonColor.x, ImGuiColorEditFlags_NoInputs))
_MenuButtonColor.SetState(buttonColor);

ImVec4 buttonHovered = _MenuButtonHovered.GetState();
if (ImGui::ColorEdit4("Button Hover", &buttonHovered.x, ImGuiColorEditFlags_NoInputs))
_MenuButtonHovered.SetState(buttonHovered);

ImVec4 buttonActive = _MenuButtonActive.GetState();
if (ImGui::ColorEdit4("Button Active", &buttonActive.x, ImGuiColorEditFlags_NoInputs))
_MenuButtonActive.SetState(buttonActive);

ImGui::Columns(1); // Reset to single column
}
}
17 changes: 17 additions & 0 deletions src/game/frontend/ColorCustomization.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
#include "core/commands/ColorCommand.hpp"

namespace YimMenu::ColorCustomization
{
extern ColorCommand _MenuWindowBg;
extern ColorCommand _MenuChildBg;
extern ColorCommand _MenuTextColor;
extern ColorCommand _MenuButtonColor;
extern ColorCommand _MenuButtonHovered;
extern ColorCommand _MenuButtonActive;
extern ColorCommand _MenuBorderColor;

void ApplyMenuColors();
void ResetToDefaultColors();
void DrawColorSettings();
}
7 changes: 6 additions & 1 deletion src/game/frontend/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "game/backend/FiberPool.hpp"
#include "game/backend/ScriptMgr.hpp"
#include "game/frontend/fonts/Fonts.hpp"
#include "game/frontend/ColorCustomization.hpp"
#include "game/pointers/Pointers.hpp"
#include "submenus/Debug.hpp"
#include "submenus/Network.hpp"
Expand Down Expand Up @@ -38,7 +39,9 @@ namespace YimMenu
ImGui::PushFont(Menu::Font::g_DefaultFont);
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImU32(ImColor(15, 15, 15)));

// Think this add HTML&PHP with no CSS. Lol just for testing.
// Apply custom menu colors each frame
YimMenu::ColorCustomization::ApplyMenuColors();

ImGui::SetNextWindowSize(ImVec2((*Pointers.ScreenResX / 2.5), (*Pointers.ScreenResY / 2.5)), ImGuiCond_Once);
if (ImGui::Begin("Terminus", nullptr, ImGuiWindowFlags_NoDecoration))
{
Expand Down Expand Up @@ -122,6 +125,8 @@ namespace YimMenu
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;

YimMenu::ColorCustomization::ApplyMenuColors();
}

void Menu::SetupFonts()
Expand Down
Loading