Skip to content
Merged
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
110 changes: 67 additions & 43 deletions src/core/frontend/manager/styles/Classic/Classic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace YimMenu
{
// static BoolCommand menuSnow{"menubgsnow","Menu Snow Background","Toggle snow particles in the menu background"};
static BoolCommand menuHeritage{"menubgheritage","Heritage Day Background","Toggle autumn heritage particles in the menu background"};
static BoolCommand menuPumpkins{"menubgpumpkins", "Menu Pumpkin Background", "Toggle falling pumpkins in the menu background"};

struct SnowParticle
{
Expand Down Expand Up @@ -72,76 +72,100 @@ namespace YimMenu
}
draw->PopClipRect();
}*/

static void RenderHeritageInWindow(ImVec2 winPos, ImVec2 winSize)
static void RenderPumpkin(ImVec2 winPos, ImVec2 winSize)
{
if (!menuHeritage.GetState() || !UIManager::ShowingContentWindow())
if (!menuPumpkins.GetState() || !UIManager::ShowingContentWindow())
{
g_Snow.clear();
g_SnowInit = false;
return;
}

if (winSize.x <= 1.0f || winSize.y <= 1.0f)
return;

ImGuiIO& io = ImGui::GetIO();
ImDrawList* draw = ImGui::GetWindowDrawList();

if (!g_SnowInit)
InitSnow(65, winPos, winSize);
InitSnow(45, winPos, winSize);

const ImVec2 clipMin = winPos;
const ImVec2 clipMax = winPos + winSize;
const float time = static_cast<float>(ImGui::GetTime());

static const ImU32 leafColors[] =
{
IM_COL32(195, 73, 32, 190),
IM_COL32(225, 145, 38, 190),
IM_COL32(45, 155, 148, 180),
IM_COL32(145, 65, 42, 190)};
ImVec2 clipMin = winPos;
ImVec2 clipMax = winPos + winSize;

draw->PushClipRect(clipMin, clipMax, true);

int index = 0;

for (auto& p : g_Snow)
{
p.pos.y += p.speed * 0.55f * io.DeltaTime;
p.pos.y += p.speed * 0.65f * io.DeltaTime;
p.pos.x += sinf(
(float)ImGui::GetTime() * 1.5f + p.pos.y * 0.01f)
* 8.0f * io.DeltaTime;

if (p.pos.y > clipMax.y + 10.0f)
{
p.pos.y = clipMin.y - 10.0f;
p.pos.x = clipMin.x + static_cast<float>(rand() % static_cast<int>(winSize.x));
}

const float sway = sinf(time * 1.25f + index * 0.75f) * 6.0f;
const float rotation = time * 1.4f + index;
const float size = p.size + 2.5f;
const float cosine = cosf(rotation);
const float sine = sinf(rotation);
const ImVec2 center(p.pos.x + sway, p.pos.y);

if (center.x < clipMin.x || center.x > clipMax.x)
{
++index;
if (p.pos.x < clipMin.x || p.pos.x > clipMax.x)
continue;
}

const ImVec2 top(center.x - sine * size, center.y + cosine * size);
const ImVec2 right(center.x + cosine * size * 0.65f, center.y + sine * size * 0.65f);
const ImVec2 bottom(center.x + sine * size, center.y - cosine * size);
const ImVec2 left(center.x - cosine * size * 0.65f, center.y - sine * size * 0.65f);
const ImU32 leafColor = leafColors[index % IM_ARRAYSIZE(leafColors)];
const float size = p.size * 2.3f;

// Pumpkin glow
draw->AddCircleFilled(
p.pos,
size + 3.0f,
IM_COL32(255, 100, 0, 25));

draw->AddCircleFilled(center, size + 3.0f, IM_COL32(225, 145, 38, 18));
draw->AddQuadFilled(top, right, bottom, left, leafColor);
draw->AddLine(top, bottom, IM_COL32(255, 225, 170, 125), 1.0f);
// Pumpkin body
draw->AddEllipseFilled(
p.pos,
ImVec2(size, size * 0.78f),
IM_COL32(235, 90, 15, 210));

++index;
// Pumpkin sections
draw->AddEllipse(
p.pos,
ImVec2(size * 0.50f, size * 0.78f),
IM_COL32(255, 145, 25, 180),
0.0f,
0,
1.0f);

// Stem
draw->AddRectFilled(
ImVec2(p.pos.x - 1.5f, p.pos.y - size * 0.95f),
ImVec2(p.pos.x + 1.5f, p.pos.y - size * 0.60f),
IM_COL32(75, 110, 45, 230),
1.0f);

// Eyes
const float eyeY = p.pos.y - size * 0.15f;

draw->AddTriangleFilled(
ImVec2(p.pos.x - size * 0.50f, eyeY),
ImVec2(p.pos.x - size * 0.15f, eyeY),
ImVec2(p.pos.x - size * 0.32f, eyeY + size * 0.30f),
IM_COL32(35, 20, 10, 230));

draw->AddTriangleFilled(
ImVec2(p.pos.x + size * 0.15f, eyeY),
ImVec2(p.pos.x + size * 0.50f, eyeY),
ImVec2(p.pos.x + size * 0.32f, eyeY + size * 0.30f),
IM_COL32(35, 20, 10, 230));

// Jack-o'-lantern mouth
draw->AddLine(
ImVec2(p.pos.x - size * 0.45f, p.pos.y + size * 0.28f),
ImVec2(p.pos.x, p.pos.y + size * 0.48f),
IM_COL32(35, 20, 10, 230),
1.5f);

draw->AddLine(
ImVec2(p.pos.x, p.pos.y + size * 0.48f),
ImVec2(p.pos.x + size * 0.45f, p.pos.y + size * 0.28f),
IM_COL32(35, 20, 10, 230),
1.5f);
}

draw->PopClipRect();
}

Expand Down Expand Up @@ -179,7 +203,7 @@ namespace YimMenu
}
ImVec2 winPos = ImGui::GetWindowPos();
ImVec2 winSize = ImGui::GetWindowSize();
RenderHeritageInWindow(winPos, winSize);
RenderPumpkin(winPos, winSize);
if (ImGui::BeginChild("##submenus",ImVec2(120, ImGui::GetContentRegionAvail().y),true))
{
const auto& submenus = UIManager::GetSubmenus();
Expand Down
112 changes: 61 additions & 51 deletions src/core/frontend/manager/styles/Themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,64 +58,74 @@ namespace YimMenu
style.GrabRounding = style.FrameRounding = style.ChildRounding = style.WindowRounding = 8.0f;
}

void HeritageDayStyle()
static void ApplyPumpkinTheme()
{
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_Text] = ImVec4(0.96f, 0.91f, 0.78f, 1.00f);
style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.58f, 0.62f, 0.58f, 1.00f);
style.Colors[ImGuiCol_WindowBg] = ImVec4(0.025f, 0.075f, 0.105f, 0.98f);
style.Colors[ImGuiCol_ChildBg] = ImVec4(0.035f, 0.105f, 0.125f, 0.50f);
style.Colors[ImGuiCol_PopupBg] = ImVec4(0.030f, 0.085f, 0.110f, 0.98f);
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.030f, 0.120f, 0.155f, 0.95f);
style.Colors[ImGuiCol_Border] = ImVec4(0.15f, 0.70f, 0.68f, 0.55f);
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
style.Colors[ImGuiCol_FrameBg] = ImVec4(0.055f, 0.20f, 0.22f, 0.75f);
style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.10f, 0.42f, 0.42f, 0.85f);
style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.15f, 0.58f, 0.55f, 1.00f);
style.Colors[ImGuiCol_TitleBg] = ImVec4(0.020f, 0.060f, 0.085f, 1.00f);
style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.60f, 0.22f, 0.10f, 1.00f);
style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.020f, 0.050f, 0.070f, 0.85f);
style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.015f, 0.045f, 0.060f, 0.80f);
style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.15f, 0.55f, 0.55f, 0.85f);
style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.20f, 0.72f, 0.68f, 1.00f);
style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.30f, 0.82f, 0.75f, 1.00f);
style.Colors[ImGuiCol_CheckMark] = ImVec4(0.95f, 0.62f, 0.20f, 1.00f);
style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.75f, 0.32f, 0.14f, 1.00f);
style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.95f, 0.55f, 0.18f, 1.00f);
style.Colors[ImGuiCol_Button] = ImVec4(0.10f, 0.42f, 0.42f, 0.60f);
style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.68f, 0.27f, 0.12f, 0.90f);
style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.90f, 0.43f, 0.15f, 1.00f);
style.Colors[ImGuiCol_Header] = ImVec4(0.08f, 0.34f, 0.36f, 0.65f);
style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.66f, 0.26f, 0.12f, 0.85f);
style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.82f, 0.37f, 0.13f, 1.00f);
style.Colors[ImGuiCol_Separator] = ImVec4(0.15f, 0.64f, 0.62f, 0.55f);
style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.88f, 0.43f, 0.15f, 0.85f);
style.Colors[ImGuiCol_SeparatorActive] = ImVec4(1.00f, 0.58f, 0.20f, 1.00f);
style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.70f, 0.30f, 0.12f, 0.35f);
style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.88f, 0.43f, 0.15f, 0.75f);
style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 0.58f, 0.20f, 1.00f);
style.Colors[ImGuiCol_Tab] = ImVec4(0.035f, 0.17f, 0.20f, 0.95f);
style.Colors[ImGuiCol_TabHovered] = ImVec4(0.68f, 0.27f, 0.12f, 0.90f);
style.Colors[ImGuiCol_TabActive] = ImVec4(0.12f, 0.48f, 0.48f, 1.00f);
style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.025f, 0.10f, 0.13f, 0.95f);
style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.08f, 0.30f, 0.32f, 1.00f);
style.Colors[ImGuiCol_PlotLines] = ImVec4(0.25f, 0.75f, 0.70f, 1.00f);
style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.58f, 0.20f, 1.00f);
style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.78f, 0.34f, 0.13f, 1.00f);
style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.55f, 0.18f, 1.00f);
style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.15f, 0.58f, 0.55f, 0.45f);
style.Colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 0.62f, 0.22f, 0.95f);
style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.95f, 0.50f, 0.16f, 1.00f);
style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.40f, 0.85f, 0.80f, 0.80f);
style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.01f, 0.05f, 0.07f, 0.70f);
style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.01f, 0.04f, 0.05f, 0.82f);
style.GrabRounding = style.FrameRounding = style.ChildRounding = style.WindowRounding = 8.0f;
style.WindowPadding = ImVec2(10.0f, 10.0f);
style.FramePadding = ImVec2(8.0f, 5.0f);
style.ItemSpacing = ImVec2(8.0f, 6.0f);
style.ItemInnerSpacing = ImVec2(6.0f, 6.0f);
style.ScrollbarSize = 10.0f;
style.GrabMinSize = 10.0f;
style.WindowRounding = 8.0f;
style.ChildRounding = 6.0f;
style.FrameRounding = 5.0f;
style.PopupRounding = 6.0f;
style.ScrollbarRounding = 8.0f;
style.GrabRounding = 5.0f;
style.TabRounding = 5.0f;
style.WindowBorderSize = 1.0f;
style.ChildBorderSize = 1.0f;
style.PopupBorderSize = 1.0f;
style.FrameBorderSize = 0.0f;

ImVec4* colors = style.Colors;
colors[ImGuiCol_Text] = ImVec4(0.95f, 0.95f, 0.95f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.48f, 0.45f, 0.42f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.035f, 0.030f, 0.028f, 0.98f);
colors[ImGuiCol_ChildBg] = ImVec4(0.050f, 0.043f, 0.038f, 0.96f);
colors[ImGuiCol_PopupBg] = ImVec4(0.045f, 0.038f, 0.034f, 0.98f);
colors[ImGuiCol_Border] = ImVec4(0.28f, 0.13f, 0.045f, 0.75f);
colors[ImGuiCol_BorderShadow] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
colors[ImGuiCol_FrameBg] = ImVec4(0.095f, 0.075f, 0.060f, 1.00f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.30f, 0.12f, 0.025f, 1.00f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.48f, 0.18f, 0.020f, 1.00f);
colors[ImGuiCol_TitleBg] = ImVec4(0.030f, 0.025f, 0.023f, 1.00f);
colors[ImGuiCol_TitleBgActive] = ImVec4(0.10f, 0.055f, 0.025f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.030f, 0.025f, 0.023f, 1.00f);
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.030f, 0.025f, 0.023f, 1.00f);
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.32f, 0.12f, 0.020f, 1.00f);
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.65f, 0.24f, 0.020f, 1.00f);
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.95f, 0.32f, 0.015f, 1.00f);
colors[ImGuiCol_CheckMark] = ImVec4(1.00f, 0.32f, 0.015f, 1.00f);
colors[ImGuiCol_SliderGrab] = ImVec4(0.90f, 0.27f, 0.010f, 1.00f);
colors[ImGuiCol_SliderGrabActive] = ImVec4(1.00f, 0.40f, 0.020f, 1.00f);
colors[ImGuiCol_Button] = ImVec4(0.14f, 0.075f, 0.035f, 1.00f);
colors[ImGuiCol_ButtonHovered] = ImVec4(0.65f, 0.21f, 0.015f, 1.00f);
colors[ImGuiCol_ButtonActive] = ImVec4(0.95f, 0.30f, 0.010f, 1.00f);
colors[ImGuiCol_Header] = ImVec4(0.20f, 0.09f, 0.025f, 1.00f);
colors[ImGuiCol_HeaderHovered] = ImVec4(0.62f, 0.20f, 0.015f, 1.00f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.90f, 0.28f, 0.010f, 1.00f);
colors[ImGuiCol_Separator] = ImVec4(0.32f, 0.13f, 0.035f, 1.00f);
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.85f, 0.27f, 0.015f, 1.00f);
colors[ImGuiCol_SeparatorActive] = ImVec4(1.00f, 0.34f, 0.015f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.55f, 0.18f, 0.010f, 0.35f);
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.85f, 0.27f, 0.010f, 0.70f);
colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 0.35f, 0.015f, 1.00f);
colors[ImGuiCol_Tab] = ImVec4(0.10f, 0.060f, 0.035f, 1.00f);
colors[ImGuiCol_TabHovered] = ImVec4(0.65f, 0.21f, 0.015f, 1.00f);
colors[ImGuiCol_TabSelected] = ImVec4(0.82f, 0.25f, 0.010f, 1.00f);
colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 0.34f, 0.015f, 1.00f);
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.27f, 0.010f, 1.00f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(1.00f, 0.30f, 0.010f, 0.30f);
colors[ImGuiCol_NavCursor] = ImVec4(1.00f, 0.34f, 0.015f, 1.00f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.70f);
}

void SetupStyle()
{
// Apply default style first
HeritageDayStyle();
ApplyPumpkinTheme();

// Initialize the color/rounding commands and load saved settings
InitializeColorCommands(); // This will call LoadSettings internally
Expand Down
8 changes: 0 additions & 8 deletions src/game/features/self/SuperJump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ namespace YimMenu::Features
virtual void OnTick() override
{
MISC::SET_SUPER_JUMP_THIS_FRAME(Self::GetPlayer().GetId());
Ped ped = Self::GetPed();
int handle = ped.GetHandle();
if (!ENTITY::DOES_ENTITY_EXIST(handle))
return;
if (WEAPON::HAS_PED_GOT_WEAPON(handle, Joaat("GADGET_PARACHUTE"), false))
{
WEAPON::REMOVE_WEAPON_FROM_PED(handle, Joaat("GADGET_PARACHUTE"));
}
}
};

Expand Down
3 changes: 3 additions & 0 deletions src/game/frontend/submenus/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "Debug/ScriptStarter.hpp"
#include "Debug/CutscenesStarter.hpp"
#include "Debug/LuaDownloader.hpp"
#include "Debug/AudioScenesStarter.hpp"

namespace YimMenu::Submenus
{
Debug::Debug() :
Expand All @@ -27,5 +29,6 @@ namespace YimMenu::Submenus
AddCategory(BuildScriptStarterMenu());
AddCategory(BuildCutscenesStarterMenu());
AddCategory(BuildLuaDownloaderMenu());
AddCategory(BuildAudioScenesMenu());
}
}
Loading
Loading