Some more fixes

This commit is contained in:
Grinch_ 2022-09-05 00:36:46 +06:00
parent 6b6139cb2f
commit 279e8a33c0
8 changed files with 11 additions and 15 deletions

View File

@ -135,7 +135,7 @@ CheatMenuMgr::CheatMenuMgr()
return;
}
Log::Print<eLogLevel::None>("Starting " MENU_TITLE " (" BUILD_NUMBER ")\nAuthor: Grinch_\nDiscord: "
Log::Print<eLogLevel::None>("Starting " MENU_TITLE " (" __DATE__ ")\nAuthor: Grinch_\nDiscord: "
DISCORD_INVITE "\nMore Info: " GITHUB_LINK);
// date time

View File

@ -10,7 +10,6 @@
#define MENU_NAME "Cheat Menu"
#define MENU_VERSION_NUMBER "3.3"
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
#define BUILD_NUMBER "20220825"
#define MENU_TITLE MENU_NAME " v" MENU_VERSION
#ifdef GTASA

View File

@ -2,11 +2,11 @@
#include "utils/updater.h"
#include "utils/rpc.h"
LONG WINAPI CrashHandler(PEXCEPTION_POINTERS pExceptionInfo)
LONG WINAPI CrashHandler(PEXCEPTION_POINTERS pInfo)
{
Log::Print<eLogLevel::None>("");
Log::Print<eLogLevel::Error>("Game crashed. Unhandled exception at {} (0x{:x})",
pExceptionInfo->ExceptionRecord->ExceptionAddress, pExceptionInfo->ExceptionRecord->ExceptionCode);
pInfo->ExceptionRecord->ExceptionAddress, pInfo->ExceptionRecord->ExceptionCode);
return EXCEPTION_CONTINUE_SEARCH;
}

View File

@ -7,15 +7,12 @@
void PageHandler::AddPage(PagePtr page, size_t index)
{
static size_t size = static_cast<size_t>(ePageID::None);
if (index <= size)
{
static size_t size = static_cast<size_t>(ePageID::COUNT);
if (m_PageList.size() < size)
{
m_PageList.resize(size);
}
m_PageList[index] = page;
}
}
void PageHandler::SetCurrentPage(PagePtr page)

View File

@ -15,10 +15,10 @@ enum class ePageID
Menu,
// Pages without headers
None,
Anniversary,
Update,
Welcome,
COUNT,
};
/*

View File

@ -324,7 +324,7 @@ void MenuPage::Draw()
ImGui::NextColumn();
ImGui::Text("ImGui: %s", ImGui::GetVersion());
ImGui::Text("%s: %s",TEXT("Menu.Build"), BUILD_NUMBER);
ImGui::Text("%s: %s",TEXT("Menu.Build"), __DATE__);
ImGui::Columns(1);

View File

@ -591,7 +591,7 @@ void PlayerPage::Draw()
state = BY_GAME(pPlayer->m_nPhysicalFlags.bMeleeProof, pPlayer->m_nFlags.bMeleeProof,
pPlayer->m_nFlags.bMeleeProof);
if (Widget::Checkbox(TEXT("Player.MeleeProof"), &state, nullptr, m_bGodMode))
if (Widget::Checkbox(TEXT("Vehicle.MeleeProof"), &state, nullptr, m_bGodMode))
{
BY_GAME(pPlayer->m_nPhysicalFlags.bMeleeProof, pPlayer->m_nFlags.bMeleeProof,
pPlayer->m_nFlags.bMeleeProof) = state;

View File

@ -8,7 +8,7 @@ private:
friend class IFeature;
WelcomePage() : IPage<WelcomePage>(ePageID::Welcome, "Welcome", false)
{
Events::initGameEvent += [this]()
Events::initGameEvent.after += [this]()
{
ePageID pageID = static_cast<ePageID>(gConfig.Get("Window.CurrentPage", static_cast<size_t>(ePageID::Welcome)));
PagePtr ptr = PageHandler::FindPagePtr(pageID);