Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
user-grinch committed Jun 29, 2023
1 parent 95e9de7 commit 79d2874
Show file tree
Hide file tree
Showing 19 changed files with 1,039 additions and 9,582 deletions.
10,088 changes: 776 additions & 9,312 deletions include/fonts.hpp

Large diffs are not rendered by default.

Binary file added resource/common/fonts/icon.ttf
Binary file not shown.
4 changes: 2 additions & 2 deletions src/cheatmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ void CheatMenuMgr::ApplyStyle()
style->Colors[ImGuiCol_Button] = ImColor(33, 34, 45, 255);
style->Colors[ImGuiCol_ButtonActive] = ImColor(240, 50, 66, 255);
style->Colors[ImGuiCol_ButtonHovered] = ImColor(30, 30, 40, 255);
style->Colors[ImGuiCol_FrameBg] = ImColor(31, 30, 31, 255);
style->Colors[ImGuiCol_FrameBgActive] = ImColor(44, 43, 44, 255);
style->Colors[ImGuiCol_FrameBg] = ImColor(33, 34, 45, 255);
style->Colors[ImGuiCol_FrameBgActive] = ImColor(240, 50, 66, 255);
style->Colors[ImGuiCol_FrameBgHovered] = ImColor(30, 30, 40, 255);
style->Colors[ImGuiCol_Text] = ImColor(255, 255, 255, 255);
style->Colors[ImGuiCol_ChildBg] = ImColor(0, 0, 0, 0);
Expand Down
6 changes: 3 additions & 3 deletions src/custom/vehcustmzr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,14 @@ void VehCustmzrMgr::Draw()
ImGui::Columns(2, NULL, false);

bool pulsing = Neon.IsPulsingEnabled(pVeh);
if (Widget::Checkbox(TEXT("Vehicle.PulsingNeon"), &pulsing))
if (Widget::Toggle(TEXT("Vehicle.PulsingNeon"), &pulsing))
{
Neon.SetPulsing(pVeh, pulsing);
}

Widget::Checkbox(TEXT("Vehicle.RainbowNeon"), &m_Neon.m_bRainbowEffect, TEXT("Vehicle.RainbowNeonMSG"));
Widget::Toggle(TEXT("Vehicle.RainbowNeon"), &m_Neon.m_bRainbowEffect, TEXT("Vehicle.RainbowNeonMSG"));
ImGui::NextColumn();
Widget::Checkbox(TEXT("Vehicle.TrafficNeon"), &m_Neon.m_bApplyOnTraffic, TEXT("Vehicle.TrafficNeonMSG"));
Widget::Toggle(TEXT("Vehicle.TrafficNeon"), &m_Neon.m_bApplyOnTraffic, TEXT("Vehicle.TrafficNeonMSG"));
ImGui::Columns(1);

ImGui::Spacing();
Expand Down
2 changes: 1 addition & 1 deletion src/interface/ipage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ bool PageHandler::DrawPages()

// draw close btn
ImGui::PushFont(FontMgr::Get("icon"));
if (ImGui::Button(ICON_FA_TIMES, ImVec2(btn_sz, btn_sz)))
if (ImGui::Button(ICON_FA_XMARK, ImVec2(btn_sz, btn_sz)))
{
rtn = true;
}
Expand Down
38 changes: 19 additions & 19 deletions src/pages/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void GamePage::Draw()
ImGui::BeginChild("##Checkbox");
ImGui::Spacing();
ImGui::Columns(2, nullptr, false);
if (Widget::Checkbox(TEXT("Game.DisableCheats"), &m_bDisableCheats))
if (Widget::Toggle(TEXT("Game.DisableCheats"), &m_bDisableCheats))
{
if (m_bDisableCheats)
{
Expand Down Expand Up @@ -226,7 +226,7 @@ void GamePage::Draw()
#endif
}
}
if (Widget::Checkbox(TEXT("Game.DisableReplay"), &m_bDisableReplay))
if (Widget::Toggle(TEXT("Game.DisableReplay"), &m_bDisableReplay))
{
if (m_bDisableReplay)
{
Expand All @@ -238,22 +238,22 @@ void GamePage::Draw()
}
}

Widget::CheckboxAddr<int8_t>(TEXT("Game.FasterClock"), BY_GAME(0x96913B, 0xA10B87, 0x95CDBB));
Widget::ToggleAddr<int8_t>(TEXT("Game.FasterClock"), BY_GAME(0x96913B, 0xA10B87, 0x95CDBB));
#ifdef GTASA
if (Widget::Checkbox(TEXT("Game.ForbiddenWantedLevel"), &m_bForbiddenArea, TEXT("Game.ForbiddenWantedLevelText")))
if (Widget::Toggle(TEXT("Game.ForbiddenWantedLevel"), &m_bForbiddenArea, TEXT("Game.ForbiddenWantedLevelText")))
{
patch::Set<BYTE>(0x441770, m_bForbiddenArea ? 0x83 : 0xC3);
}
Widget::CheckboxAddr<int8_t>(TEXT("Game.FreePNS"), 0x96C009);
Widget::ToggleAddr<int8_t>(TEXT("Game.FreePNS"), 0x96C009);
#endif

#ifdef GTAVC
ImGui::NextColumn();
#endif
#ifdef GTASA
Widget::CheckboxAddr<int8_t>(TEXT("Game.FreezeGame"), 0xA10B48);
Widget::ToggleAddr<int8_t>(TEXT("Game.FreezeGame"), 0xA10B48);
#endif
if (Widget::Checkbox(TEXT("Game.FreezeGameTime"), &m_bFreezeTime))
if (Widget::Toggle(TEXT("Game.FreezeGameTime"), &m_bFreezeTime))
{
if (m_bFreezeTime)
{
Expand All @@ -268,11 +268,11 @@ void GamePage::Draw()
#ifdef GTASA
ImGui::NextColumn();
#endif
if (Widget::Checkbox("Freeze misson timer", &m_bMissionTimer))
if (Widget::Toggle("Freeze misson timer", &m_bMissionTimer))
{
Command<Commands::FREEZE_ONSCREEN_TIMER>(m_bMissionTimer);
}
if (Widget::Checkbox(TEXT("Game.HardMode"), &m_HardMode.m_bEnabled, TEXT("Game.HardModeText")))
if (Widget::Toggle(TEXT("Game.HardMode"), &m_HardMode.m_bEnabled, TEXT("Game.HardModeText")))
{
CPlayerPed* player = FindPlayerPed();

Expand Down Expand Up @@ -301,7 +301,7 @@ void GamePage::Draw()
}
}
#ifdef GTASA
if (Widget::Checkbox(TEXT("Game.MobileRadio"), &m_bMobileRadio))
if (Widget::Toggle(TEXT("Game.MobileRadio"), &m_bMobileRadio))
{
// AERadioTrackManager.StartRadio(5, 0, 0, 0);
CallMethodAndReturn<int, 0x4EB3C0, int, int, int, int, int>((int)&AERadioTrackManager, 5, 0, 0, 0);
Expand Down Expand Up @@ -340,7 +340,7 @@ void GamePage::Draw()
// Call<0x4E9820, int, int, int>((int)&AERadioTrackManager, 0, 0);
// }
}
if (Widget::Checkbox(TEXT("Game.NoWaterPhysics"), &m_bNoWaterPhysics))
if (Widget::Toggle(TEXT("Game.NoWaterPhysics"), &m_bNoWaterPhysics))
{
if (m_bNoWaterPhysics)
{
Expand All @@ -351,12 +351,12 @@ void GamePage::Draw()
patch::Set<uint8_t>(0x6C2759, 0, true);
}
}
Widget::Checkbox(TEXT("Game.Screenshot"), &m_bScreenShot,
Widget::Toggle(TEXT("Game.Screenshot"), &m_bScreenShot,
std::format("{} {}", TEXT("Game.ScreenshotTip"),
quickSceenShot.GetNameString()).c_str());
Widget::Checkbox(TEXT("Game.SolidWater"), &m_bSolidWater, TEXT("Game.SolidWaterText"));
Widget::Toggle(TEXT("Game.SolidWater"), &m_bSolidWater, TEXT("Game.SolidWaterText"));
#endif
if (Widget::Checkbox(TEXT("Game.SyncSystemTime"), &m_bSyncTime))
if (Widget::Toggle(TEXT("Game.SyncSystemTime"), &m_bSyncTime))
{
if (m_bSyncTime)
{
Expand Down Expand Up @@ -386,7 +386,7 @@ void GamePage::Draw()
}
else
{
if (Widget::Checkbox(TEXT("Game.CameraZoomLock"), &m_bLockCameraZoom))
if (Widget::Toggle(TEXT("Game.CameraZoomLock"), &m_bLockCameraZoom))
{
if (!m_bLockCameraZoom)
{
Expand Down Expand Up @@ -495,7 +495,7 @@ void GamePage::Draw()
if (ImGui::CollapsingHeader(TEXT("Player.TopDownCamera")))
{
bool state = TopDownCam.GetState();
if (Widget::Checkbox(TEXT("Window.Enabled"), &state))
if (Widget::Toggle(TEXT("Window.Enabled"), &state))
{
Command<Commands::RESTORE_CAMERA_JUMPCUT>();
TopDownCam.Toggle();
Expand Down Expand Up @@ -609,7 +609,7 @@ void GamePage::Draw()
{
ImGui::Spacing();
bool state = Freecam.GetState();
if (Widget::Checkbox(TEXT("Game.Enable"), &state))
if (Widget::Toggle(TEXT("Game.Enable"), &state))
{
if (Freecam.Toggle())
{
Expand Down Expand Up @@ -806,12 +806,12 @@ void GamePage::Draw()
ImGui::Columns(2, NULL, false);

bool state = RandomCheats.GetState();
if (Widget::Checkbox(TEXT("Game.Enable"), &state))
if (Widget::Toggle(TEXT("Game.Enable"), &state))
{
RandomCheats.Toggle();
}
ImGui::NextColumn();
Widget::Checkbox(TEXT("Game.ProgressBar"), &RandomCheats.m_bProgressBar);
Widget::Toggle(TEXT("Game.ProgressBar"), &RandomCheats.m_bProgressBar);
ImGui::Columns(1);
ImGui::Spacing();

Expand Down
30 changes: 15 additions & 15 deletions src/pages/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

MenuPage& menuPage = MenuPage::Get();
MenuPage::MenuPage()
: IPage<MenuPage>(ePageID::Menu, ICON_FA_COG, true)
: IPage<MenuPage>(ePageID::Menu, ICON_FA_GEAR, true)
{
// This needs to run before initRwEvent
// Updates are checked in m_bAutoCheckUpdate
Expand Down Expand Up @@ -93,11 +93,11 @@ void MenuPage::Draw()
ImGui::Spacing();

ImGui::Columns(2, NULL, false);
if (Widget::Checkbox(TEXT("Menu.AutoCheckUpdate"), &m_bAutoCheckUpdate))
if (Widget::Toggle(TEXT("Menu.AutoCheckUpdate"), &m_bAutoCheckUpdate))
{
gConfig.Set("Menu.AutoCheckUpdate", m_bAutoCheckUpdate);
}
if (Widget::Checkbox(TEXT("Menu.DiscordRPC"), &m_bDiscordRPC))
if (Widget::Toggle(TEXT("Menu.DiscordRPC"), &m_bDiscordRPC))
{
if (m_bDiscordRPC)
{
Expand All @@ -112,7 +112,7 @@ void MenuPage::Draw()
ImGui::NextColumn();

if (gRenderer == eRenderer::DirectX9
&& Widget::Checkbox(TEXT("Menu.TextOnlyMode"), &m_bTextOnlyMode, TEXT("Menu.TextOnlyModeHint")))
&& Widget::Toggle(TEXT("Menu.TextOnlyMode"), &m_bTextOnlyMode, TEXT("Menu.TextOnlyModeHint")))
{
gConfig.Set("Menu.TextOnlyMode", m_bTextOnlyMode);
}
Expand Down Expand Up @@ -144,61 +144,61 @@ void MenuPage::Draw()
ImGui::Dummy(ImVec2(0, 20));

ImGui::Columns(2, nullptr, false);
if (Widget::Checkbox(TEXT("Menu.NoBG"), &Overlay::m_bTransparent))
if (Widget::Toggle(TEXT("Menu.NoBG"), &Overlay::m_bTransparent))
{
gConfig.Set("Overlay.Transparent", Overlay::m_bTransparent);
}

if (Widget::Checkbox(TEXT("Menu.ShowCoords"), &Overlay::m_bCoord))
if (Widget::Toggle(TEXT("Menu.ShowCoords"), &Overlay::m_bCoord))
{
gConfig.Set("Overlay.ShowCoordinates", Overlay::m_bCoord);
}

if (Widget::Checkbox(TEXT("Menu.ShowCPU"), &Overlay::m_bCpuUsage))
if (Widget::Toggle(TEXT("Menu.ShowCPU"), &Overlay::m_bCpuUsage))
{
gConfig.Set("Overlay.ShowCPUUsage", Overlay::m_bCpuUsage);
}

if (Widget::Checkbox(TEXT("Menu.ShowFPS"), &Overlay::m_bFPS))
if (Widget::Toggle(TEXT("Menu.ShowFPS"), &Overlay::m_bFPS))
{
gConfig.Set("Overlay.ShowFPS", Overlay::m_bFPS);
}

if (Widget::Checkbox(TEXT("Menu.ShowLocation"), &Overlay::m_bLocName))
if (Widget::Toggle(TEXT("Menu.ShowLocation"), &Overlay::m_bLocName))
{
gConfig.Set("Overlay.ShowLocationName", Overlay::m_bLocName);
}

#ifndef GTA3
if (Widget::Checkbox(TEXT("Menu.ShowModelInfo"), &Overlay::m_bModelInfo))
if (Widget::Toggle(TEXT("Menu.ShowModelInfo"), &Overlay::m_bModelInfo))
{
gConfig.Set("Overlay.ShowModelInfo", Overlay::m_bModelInfo);
}
#endif

ImGui::NextColumn();

if (Widget::Checkbox(TEXT("Menu.ShowPlaytime"), &Overlay::m_bPlaytime))
if (Widget::Toggle(TEXT("Menu.ShowPlaytime"), &Overlay::m_bPlaytime))
{
gConfig.Set("Overlay.ShowPlaytime", Overlay::m_bPlaytime);
}

if (Widget::Checkbox(TEXT("Menu.ShowPedTasks"), &Overlay::m_bPedTasks))
if (Widget::Toggle(TEXT("Menu.ShowPedTasks"), &Overlay::m_bPedTasks))
{
gConfig.Set("Overlay.ShowPedTasks", Overlay::m_bPedTasks);
}

if (Widget::Checkbox(TEXT("Menu.ShowRAM"), &Overlay::m_bMemUsage))
if (Widget::Toggle(TEXT("Menu.ShowRAM"), &Overlay::m_bMemUsage))
{
gConfig.Set("Overlay.ShowMemoryUsage", Overlay::m_bMemUsage);
}

if (Widget::Checkbox(TEXT("Menu.ShowVehHealth"), &Overlay::m_bVehHealth))
if (Widget::Toggle(TEXT("Menu.ShowVehHealth"), &Overlay::m_bVehHealth))
{
gConfig.Set("Overlay.ShowVehicleHealth", Overlay::m_bVehHealth);
}

if (Widget::Checkbox(TEXT("Menu.ShowVehSpeed"), &Overlay::m_bVehSpeed))
if (Widget::Toggle(TEXT("Menu.ShowVehSpeed"), &Overlay::m_bVehSpeed))
{
gConfig.Set("Overlay.ShowVehicleSpeed", Overlay::m_bVehSpeed);
}
Expand Down
28 changes: 14 additions & 14 deletions src/pages/ped.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static const char* pedTypeList = "Civ Male\0Civ Female\0Cop\0Leones\0Triads\0Dia
PedPage &pedPage = PedPage::Get();

PedPage::PedPage()
: IPage<PedPage>(ePageID::Ped, ICON_FA_USERS, true)
: IPage<PedPage>(ePageID::Ped, ICON_FA_PEOPLE_ROBBERY, true)
{
/*
Taken from gta chaos mod by Lordmau5 & _AG
Expand Down Expand Up @@ -260,22 +260,22 @@ void PedPage::Draw()
ImGui::Spacing();
ImGui::Columns(2, 0, false);
#ifndef GTAVC
Widget::Checkbox(TEXT("Ped.BigHead"), &m_bBigHead);
Widget::Toggle(TEXT("Ped.BigHead"), &m_bBigHead);
#endif
#ifdef GTASA
Widget::CheckboxAddr<int8_t>(TEXT("Ped.ElvisEverywhere"), 0x969157);
Widget::CheckboxAddr<int8_t>(TEXT("Ped.EveryoneArmed"), 0x969140);
Widget::CheckboxAddr<int8_t>(TEXT("Ped.GangsControl"), 0x96915B);
Widget::CheckboxAddr<int8_t>(TEXT("Ped.GangsEverywhere"), 0x96915A);
Widget::Checkbox(TEXT("Ped.GangWars"), &CGangWars::bGangWarsActive);
Widget::ToggleAddr<int8_t>(TEXT("Ped.ElvisEverywhere"), 0x969157);
Widget::ToggleAddr<int8_t>(TEXT("Ped.EveryoneArmed"), 0x969140);
Widget::ToggleAddr<int8_t>(TEXT("Ped.GangsControl"), 0x96915B);
Widget::ToggleAddr<int8_t>(TEXT("Ped.GangsEverywhere"), 0x96915A);
Widget::Toggle(TEXT("Ped.GangWars"), &CGangWars::bGangWarsActive);

ImGui::NextColumn();

Widget::CheckboxAddr<int8_t>(TEXT("Ped.PedsMayhem"), 0x96913E);
Widget::CheckboxAddr<int8_t>(TEXT("Ped.PedsAtkRocket"), 0x969158);
Widget::CheckboxAddr<int8_t>(TEXT("Ped.PedsRiot"), 0x969175);
Widget::CheckboxAddr<int8_t>(TEXT("Ped.SlutMagnet"), 0x96915D);
Widget::Checkbox(TEXT("Ped.ThinBody"), &m_bThinBody);
Widget::ToggleAddr<int8_t>(TEXT("Ped.PedsMayhem"), 0x96913E);
Widget::ToggleAddr<int8_t>(TEXT("Ped.PedsAtkRocket"), 0x969158);
Widget::ToggleAddr<int8_t>(TEXT("Ped.PedsRiot"), 0x969175);
Widget::ToggleAddr<int8_t>(TEXT("Ped.SlutMagnet"), 0x96915D);
Widget::Toggle(TEXT("Ped.ThinBody"), &m_bThinBody);
#elif GTAVC
Widget::CheckboxAddr<int8_t>(TEXT("Ped.NoProstitutes"), 0xA10B99);
Widget::CheckboxAddr<int8_t>(TEXT("Ped.SlutMagnet"), 0xA10B5F);
Expand Down Expand Up @@ -379,9 +379,9 @@ void PedPage::Draw()
ImGui::BeginChild("PedCOnfig");
ImGui::Spacing();
ImGui::Columns(2, 0, false);
Widget::Checkbox(TEXT("Ped.NoMove"), &m_Spawner.m_bPedMove);
Widget::Toggle(TEXT("Ped.NoMove"), &m_Spawner.m_bPedMove);
ImGui::NextColumn();
Widget::Checkbox(TEXT("Ped.PedBleed"), &m_Spawner.m_bPedBleed);
Widget::Toggle(TEXT("Ped.PedBleed"), &m_Spawner.m_bPedBleed);
ImGui::Columns(1);

ImGui::Spacing();
Expand Down
Loading

0 comments on commit 79d2874

Please sign in to comment.