Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
73f639b
(UI) Modular Theme
Deadlineem Jun 24, 2025
4dabfdd
(UI) Small change
Deadlineem Jun 25, 2025
7c11862
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jun 26, 2025
29363ea
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jun 26, 2025
7b93472
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jun 26, 2025
d8dd63c
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jun 26, 2025
ae9620e
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jun 27, 2025
8908a82
(UI) Implemented Color/Transparency/Rounding for all ImGui Elements.
Deadlineem Jun 27, 2025
d34ec50
Merge branch 'enhanced' of https://github.com/Deadlineem/YimMenuV2 in…
Deadlineem Jun 27, 2025
d672df9
(UI) Added more customization abilities
Deadlineem Jun 27, 2025
668ff19
(UI) Altered category name
Deadlineem Jun 27, 2025
90ddb70
(UI) Added more ImGui customization tabs
Deadlineem Jun 27, 2025
0534719
(UI) Fixed Exceptions in console thanks to Mr-X
Deadlineem Jun 27, 2025
c007456
small fix
Deadlineem Jun 27, 2025
dd06914
(Fix) Font scaling
Deadlineem Jun 27, 2025
e1e7edc
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jun 28, 2025
4dec4f1
Added Helper Functions to utilize FloatCommand and minimize a bulky list
Deadlineem Jun 28, 2025
07bacc8
Ensured all settings save to GUISettings.json
Deadlineem Jun 28, 2025
b06f0bc
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jun 28, 2025
a224d94
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jun 30, 2025
1ea41fe
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jul 1, 2025
a76dd1a
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jul 3, 2025
b3750a1
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jul 8, 2025
fdf126f
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jul 17, 2025
dab549f
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Aug 4, 2025
cc2b821
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Dec 11, 2025
3e33be1
Merge branch 'YimMenu:enhanced' into enhanced
Deadlineem Jan 3, 2026
85e8f0f
UI backend refactors
Deadlineem Jan 3, 2026
b77f9de
Removed unnecessary includes already included in common.hpp
Deadlineem Jan 3, 2026
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
5 changes: 2 additions & 3 deletions src/core/commands/ColorCommand.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once
#include "Command.hpp"
#include "imgui.h"

namespace YimMenu
{
Expand All @@ -9,14 +8,14 @@ namespace YimMenu
protected:
virtual void OnChange() {};
virtual void OnCall() override;
virtual void SaveState(nlohmann::json& value) override;
virtual void LoadState(nlohmann::json& value) override;

ImVec4 m_State = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);

public:
ColorCommand(std::string name, std::string label, std::string description, ImVec4 color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f));
ImVec4 GetState();
void SetState(ImVec4 state);
virtual void SaveState(nlohmann::json& value) override;
virtual void LoadState(nlohmann::json& value) override;
};
}
9 changes: 4 additions & 5 deletions src/core/commands/Command.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ namespace YimMenu
class Command
{
private:
std::string m_Name;
std::string m_Label;
std::string m_Description;
joaat_t m_Hash;

int m_NumArgs = 0; // TODO: currently unused

protected:
virtual void OnCall() = 0;
void MarkDirty();
std::string m_Name;
std::string m_Label;
std::string m_Description;
joaat_t m_Hash;

public:
Command(std::string name, std::string label, std::string description, int num_args = 0);
Expand Down
4 changes: 4 additions & 0 deletions src/core/frontend/manager/UIManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace YimMenu::Features
{0, "Classic"},
{1, "Modern"},
{2, "Modern (Vertical)"},
{3, "Modern (Modular)"},
};

// Expose as global reference so other code can use it
Expand Down Expand Up @@ -51,6 +52,9 @@ namespace YimMenu
case UITheme::ModernV:
RenderModernVTheme();
break;
case UITheme::Modular:
RenderModularTheme();
break;
default:
RenderClassicTheme(); // Default theme
break;
Expand Down
1 change: 1 addition & 0 deletions src/core/frontend/manager/UIManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace YimMenu
Classic = 0,
Modern,
ModernV,
Modular,
};

class UIManager
Expand Down
3 changes: 3 additions & 0 deletions src/core/frontend/manager/styles/Classic/Classic.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#include "game/pointers/Pointers.hpp"
#include "game/frontend/Menu.hpp"
#include "core/frontend/manager/UIManager.hpp"
#include "game/frontend/submenus/Settings/GUISettings.hpp"

namespace YimMenu
{
void RenderClassicTheme()
{
YimMenu::SyncColorCommandsToStyle();

float windowWidth = *YimMenu::Pointers.ScreenResX / 2.5f;
float centerX = (*YimMenu::Pointers.ScreenResX - windowWidth) / 2.0f;
float centerY = *YimMenu::Pointers.ScreenResY / 5.0f;
Expand Down
60 changes: 27 additions & 33 deletions src/core/frontend/manager/styles/Modern/Modern.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#include "game/pointers/Pointers.hpp"
#include "game/frontend/Menu.hpp"
#include "core/frontend/manager/UIManager.hpp"
#include "game/frontend/submenus/Settings/GUISettings.hpp"

namespace YimMenu
{
void RenderModernTheme()
{
YimMenu::SyncColorCommandsToStyle();

ImGuiIO& io = ImGui::GetIO();
ImDrawList* drawList = ImGui::GetBackgroundDrawList();

Expand All @@ -26,6 +29,8 @@ namespace YimMenu
ImGui::Begin("##BubbleInputWindow", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoBringToFrontOnFocus);

const auto& submenus = YimMenu::UIManager::GetSubmenus();
auto activeSubmenu = YimMenu::UIManager::GetActiveSubmenu();

for (size_t i = 0; i < submenus.size(); ++i)
{
auto& submenu = submenus[i];
Expand All @@ -35,62 +40,54 @@ namespace YimMenu
ImGui::SetCursorScreenPos(bubblePos);
ImGui::PushID(static_cast<int>(i));

ImVec2 bgPos(center.x - bgSize / 2.0f, center.y - bgSize / 2.0f);
drawList->AddRectFilled(bgPos, ImVec2(bgPos.x + bgSize, bgPos.y + bgSize), IM_COL32(10, 10, 10, 255), rounding);
drawList->AddRect(bgPos, ImVec2(bgPos.x + bgSize, bgPos.y + bgSize), IM_COL32(192, 192, 192, 32), rounding, ImDrawFlags_None, 1.0f);

ImU32 bubbleColor = IM_COL32(25, 25, 31, 255);
ImU32 hoverColor = IM_COL32(46, 46, 51, 255);
ImGui::InvisibleButton("##Bubble", ImVec2(bubbleSize, bubbleSize));
bool hovered = ImGui::IsItemHovered();
bool clicked = ImGui::IsItemClicked();

drawList->AddRectFilled(bubblePos, ImVec2(bubblePos.x + bubbleSize, bubblePos.y + bubbleSize), hovered ? hoverColor : bubbleColor, rounding);
drawList->AddRect(bubblePos, ImVec2(bubblePos.x + bubbleSize, bubblePos.y + bubbleSize), IM_COL32(192, 192, 192, 16), rounding, ImDrawFlags_None, 1.0f);

auto activeSubmenu = YimMenu::UIManager::GetActiveSubmenu();

if (clicked)
{
if (submenu == activeSubmenu)
{
YimMenu::UIManager::SetShowContentWindow(!YimMenu::UIManager::ShowingContentWindow());
}
else
{
YimMenu::UIManager::SetActiveSubmenu(submenu);
YimMenu::UIManager::SetShowContentWindow(true);
}
}

ImU32 defaultIconColor = IM_COL32(255, 255, 255, 255);
ImU32 activeIconColor = IM_COL32(46, 204, 113, 255);
ImU32 hoveredIconColor = IM_COL32(36, 174, 93, 255);
ImU32 iconColor = submenu == activeSubmenu ? activeIconColor : (hovered ? hoveredIconColor : defaultIconColor);
// Colors
ImU32 buttonColor = ImGui::GetColorU32(ImGuiCol_Button);
ImU32 hoverColor = ImGui::GetColorU32(ImGuiCol_ButtonHovered);
ImU32 activeColor = ImGui::GetColorU32(ImGuiCol_ButtonActive);
ImU32 borderColor = ImGui::GetColorU32(ImGuiCol_Border);
ImU32 iconColor = ImGui::GetColorU32(ImGuiCol_Text);

ImU32 fillColor = (submenu == activeSubmenu) ? activeColor : (hovered ? hoverColor : buttonColor);

// Bubble background and border
drawList->AddRectFilled(bubblePos, bubblePos + ImVec2(bubbleSize, bubbleSize), fillColor, rounding);
drawList->AddRect(bubblePos, bubblePos + ImVec2(bubbleSize, bubbleSize), borderColor, rounding);

// Icon (text color only)
ImGui::PushFont(YimMenu::Menu::Font::g_AwesomeFont);
ImVec2 iconSize = ImGui::CalcTextSize(submenu->m_Icon.c_str());
ImVec2 iconPos(center.x - iconSize.x / 2, center.y - iconSize.y / 2);
drawList->AddText(YimMenu::Menu::Font::g_AwesomeFont, 0.0f, iconPos, iconColor, submenu->m_Icon.c_str());
ImGui::PopFont();

ImU32 defaultTextColor = IM_COL32(255, 255, 255, 255);
ImU32 activeTextColor = IM_COL32(46, 204, 113, 255);
ImU32 hoveredTextColor = IM_COL32(36, 174, 93, 255);
ImU32 textColor = submenu == activeSubmenu ? activeTextColor : (hovered ? hoveredTextColor : defaultTextColor);

// Label
ImVec2 labelSize = ImGui::CalcTextSize(submenu->m_Name.c_str());
ImVec2 labelPos(center.x - labelSize.x / 2, bubblePos.y + bubbleSize + 15.0f);
ImVec2 bgMin = labelPos - ImVec2(6, 2);
ImVec2 bgMax = labelPos + labelSize + ImVec2(6, 2);

drawList->AddRectFilled(bgMin, bgMax, IM_COL32(26, 26, 31, 120));
drawList->AddRect(bgMin, bgMax, IM_COL32(192, 192, 192, 16), 4.0f);
drawList->AddText(labelPos, textColor, submenu->m_Name.c_str());
drawList->AddRectFilled(bgMin, bgMax, ImGui::GetColorU32(ImGuiCol_ChildBg));
drawList->AddRect(bgMin, bgMax, borderColor, 4.0f);
drawList->AddText(labelPos, iconColor, submenu->m_Name.c_str());

ImGui::PopID();
}

// Drag zone
ImVec2 dragZoneMin = ImVec2(basePos.x, basePos.y - 20);
ImVec2 dragZoneMax = ImVec2(basePos.x + bubbleSpacing * submenus.size(), basePos.y + bubbleSize);
ImGui::SetCursorScreenPos(dragZoneMin);
Expand All @@ -106,8 +103,7 @@ namespace YimMenu
else
{
ImVec2 delta = io.MousePos - dragStart;
basePosOffset.x += delta.x;
basePosOffset.y += delta.y;
basePosOffset += delta;
dragStart = io.MousePos;
}
}
Expand All @@ -116,10 +112,9 @@ namespace YimMenu
dragging = false;
}

ImGui::End();

auto activeSubmenu = YimMenu::UIManager::GetActiveSubmenu();
ImGui::End(); // ##BubbleInputWindow

// Content window
if (YimMenu::UIManager::ShowingContentWindow() && activeSubmenu)
{
float windowWidth = *YimMenu::Pointers.ScreenResX / 2.5f;
Expand All @@ -129,14 +124,13 @@ namespace YimMenu

ImGui::SetNextWindowSize(windowSize, ImGuiCond_FirstUseEver);
ImGui::SetNextWindowPos(ImVec2(centerX, centerY), ImGuiCond_FirstUseEver);

ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse;

if (ImGui::Begin("##Categories&Content", nullptr, flags))
{
if (ImGui::BeginChild("##categorySelectors", ImVec2(0, 60), true))
{
activeSubmenu->DrawCategorySelectors();
}
ImGui::EndChild();

if (ImGui::BeginChild("##options", ImVec2(0, 0), true))
Expand Down
64 changes: 29 additions & 35 deletions src/core/frontend/manager/styles/ModernVertical/ModernVertical.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#include "game/pointers/Pointers.hpp"
#include "game/frontend/Menu.hpp"
#include "core/frontend/manager/UIManager.hpp"
#include "game/frontend/submenus/Settings/GUISettings.hpp"

namespace YimMenu
{
void RenderModernVTheme()
{
YimMenu::SyncColorCommandsToStyle();

ImGuiIO& io = ImGui::GetIO();
ImDrawList* drawList = ImGui::GetBackgroundDrawList();

Expand All @@ -26,72 +29,68 @@ namespace YimMenu
ImGui::Begin("##BubbleInputWindow", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoBringToFrontOnFocus);

const auto& submenus = YimMenu::UIManager::GetSubmenus();
auto activeSubmenu = YimMenu::UIManager::GetActiveSubmenu();

for (size_t i = 0; i < submenus.size(); ++i)
{
auto& submenu = submenus[i];
// Changed horizontal to vertical:

ImVec2 bubblePos(basePos.x, basePos.y + i * bubbleSpacing + 2);
ImVec2 center(bubblePos.x + bubbleSize / 2.0f, bubblePos.y + bubbleSize / 2.0f);

ImGui::SetCursorScreenPos(bubblePos);
ImGui::PushID(static_cast<int>(i));

ImVec2 bgPos(center.x - bgSize / 2.0f, center.y - bgSize / 2.0f);
drawList->AddRectFilled(bgPos, ImVec2(bgPos.x + bgSize, bgPos.y + bgSize), IM_COL32(10, 10, 10, 255), rounding);
drawList->AddRect(bgPos, ImVec2(bgPos.x + bgSize, bgPos.y + bgSize), IM_COL32(192, 192, 192, 32), rounding, ImDrawFlags_None, 1.0f);

ImU32 bubbleColor = IM_COL32(25, 25, 31, 255);
ImU32 hoverColor = IM_COL32(46, 46, 51, 255);
// Invisible button logic
ImGui::InvisibleButton("##Bubble", ImVec2(bubbleSize, bubbleSize));
bool hovered = ImGui::IsItemHovered();
bool clicked = ImGui::IsItemClicked();

drawList->AddRectFilled(bubblePos, ImVec2(bubblePos.x + bubbleSize, bubblePos.y + bubbleSize), hovered ? hoverColor : bubbleColor, rounding);
drawList->AddRect(bubblePos, ImVec2(bubblePos.x + bubbleSize, bubblePos.y + bubbleSize), IM_COL32(192, 192, 192, 16), rounding, ImDrawFlags_None, 1.0f);

auto activeSubmenu = YimMenu::UIManager::GetActiveSubmenu();

if (clicked)
{
if (submenu == activeSubmenu)
{
YimMenu::UIManager::SetShowContentWindow(!YimMenu::UIManager::ShowingContentWindow());
}
else
{
YimMenu::UIManager::SetActiveSubmenu(submenu);
YimMenu::UIManager::SetShowContentWindow(true);
}
}

ImU32 defaultIconColor = IM_COL32(255, 255, 255, 255);
ImU32 activeIconColor = IM_COL32(46, 204, 113, 255);
ImU32 hoveredIconColor = IM_COL32(36, 174, 93, 255);
ImU32 iconColor = submenu == activeSubmenu ? activeIconColor : (hovered ? hoveredIconColor : defaultIconColor);
// Colors from ImGui style
ImU32 buttonColor = ImGui::GetColorU32(ImGuiCol_Button);
ImU32 hoverColor = ImGui::GetColorU32(ImGuiCol_ButtonHovered);
ImU32 activeColor = ImGui::GetColorU32(ImGuiCol_ButtonActive);
ImU32 borderColor = ImGui::GetColorU32(ImGuiCol_Border);
ImU32 iconColor = ImGui::GetColorU32(ImGuiCol_Text);

// Final fill color
ImU32 fillColor = (submenu == activeSubmenu) ? activeColor : (hovered ? hoverColor : buttonColor);

// Draw filled button bubble
drawList->AddRectFilled(bubblePos, bubblePos + ImVec2(bubbleSize, bubbleSize), fillColor, rounding);
drawList->AddRect(bubblePos, bubblePos + ImVec2(bubbleSize, bubbleSize), borderColor, rounding, ImDrawFlags_None, 1.0f);

// Draw icon centered (text color always)
ImGui::PushFont(YimMenu::Menu::Font::g_AwesomeFont);
ImVec2 iconSize = ImGui::CalcTextSize(submenu->m_Icon.c_str());
ImVec2 iconPos(center.x - iconSize.x / 2, center.y - iconSize.y / 2);
drawList->AddText(YimMenu::Menu::Font::g_AwesomeFont, 0.0f, iconPos, iconColor, submenu->m_Icon.c_str());
ImGui::PopFont();

ImU32 defaultTextColor = IM_COL32(255, 255, 255, 255);
ImU32 activeTextColor = IM_COL32(46, 204, 113, 255);
ImU32 hoveredTextColor = IM_COL32(36, 174, 93, 255);
ImU32 textColor = submenu == activeSubmenu ? activeTextColor : (hovered ? hoveredTextColor : defaultTextColor);

// Draw label below bubble
ImVec2 labelSize = ImGui::CalcTextSize(submenu->m_Name.c_str());
ImVec2 labelPos(center.x - labelSize.x / 2, bubblePos.y + bubbleSize + 15.0f);
ImVec2 bgMin = labelPos - ImVec2(6, 2);
ImVec2 bgMax = labelPos + labelSize + ImVec2(6, 2);

drawList->AddRectFilled(bgMin, bgMax, IM_COL32(26, 26, 31, 120));
drawList->AddRect(bgMin, bgMax, IM_COL32(192, 192, 192, 16), 4.0f);
drawList->AddText(labelPos, textColor, submenu->m_Name.c_str());
drawList->AddRectFilled(bgMin, bgMax, ImGui::GetColorU32(ImGuiCol_ChildBg));
drawList->AddRect(bgMin, bgMax, borderColor, 4.0f);
drawList->AddText(labelPos, iconColor, submenu->m_Name.c_str());

ImGui::PopID();
}

// Drag zone (optional repositioning)
ImVec2 dragZoneMin = ImVec2(basePos.x + bubbleSize + 10, basePos.y);
ImVec2 dragZoneMax = ImVec2(basePos.x + bubbleSize + 10 + bubbleSpacing, basePos.y + bubbleSpacing * submenus.size());
ImGui::SetCursorScreenPos(dragZoneMin);
Expand All @@ -107,8 +106,7 @@ namespace YimMenu
else
{
ImVec2 delta = io.MousePos - dragStart;
basePosOffset.x += delta.x;
basePosOffset.y += delta.y;
basePosOffset += delta;
dragStart = io.MousePos;
}
}
Expand All @@ -119,8 +117,7 @@ namespace YimMenu

ImGui::End();

auto activeSubmenu = YimMenu::UIManager::GetActiveSubmenu();

// Content window
if (YimMenu::UIManager::ShowingContentWindow() && activeSubmenu)
{
float windowWidth = *YimMenu::Pointers.ScreenResX / 2.5f;
Expand All @@ -130,14 +127,11 @@ namespace YimMenu

ImGui::SetNextWindowSize(windowSize, ImGuiCond_FirstUseEver);
ImGui::SetNextWindowPos(ImVec2(centerX, centerY), ImGuiCond_FirstUseEver);
ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse;

if (ImGui::Begin("##Categories&Content", nullptr, flags))
if (ImGui::Begin("##Categories&Content", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse))
{
if (ImGui::BeginChild("##categorySelectors", ImVec2(0, 60), true))
{
activeSubmenu->DrawCategorySelectors();
}
ImGui::EndChild();

if (ImGui::BeginChild("##options", ImVec2(0, 0), true))
Expand Down
Loading