Added save anywhere option
This commit is contained in:
parent
90c4285f9f
commit
b90d95fd75
16
src/Game.cpp
16
src/Game.cpp
@ -5,6 +5,7 @@
|
|||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
#include "CIplStore.h"
|
#include "CIplStore.h"
|
||||||
|
|
||||||
|
static bool bSaveGameFlag = false;
|
||||||
|
|
||||||
// Thanks to aap
|
// Thanks to aap
|
||||||
void Game::RealTimeClock()
|
void Game::RealTimeClock()
|
||||||
@ -43,6 +44,14 @@ Game::Game()
|
|||||||
m_RandomCheats::m_EnabledCheats[std::stoi(element.key())][1] = "true";
|
m_RandomCheats::m_EnabledCheats[std::stoi(element.key())][1] = "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Events::drawMenuBackgroundEvent += []()
|
||||||
|
{
|
||||||
|
if (bSaveGameFlag)
|
||||||
|
{
|
||||||
|
FrontEndMenuManager.m_nCurrentMenuPage = MENUPAGE_GAME_SAVE;
|
||||||
|
bSaveGameFlag = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
Events::processScriptsEvent += []
|
Events::processScriptsEvent += []
|
||||||
{
|
{
|
||||||
uint timer = CTimer::m_snTimeInMilliseconds;
|
uint timer = CTimer::m_snTimeInMilliseconds;
|
||||||
@ -301,6 +310,13 @@ void Game::Draw()
|
|||||||
CPlayerPed* pPlayer = FindPlayerPed();
|
CPlayerPed* pPlayer = FindPlayerPed();
|
||||||
int hplayer = CPools::GetPedRef(pPlayer);
|
int hplayer = CPools::GetPedRef(pPlayer);
|
||||||
|
|
||||||
|
if (ImGui::Button("Save game (might cause game bugs)",Ui::GetSize()))
|
||||||
|
{
|
||||||
|
FrontEndMenuManager.m_bActivateMenuNextFrame = true;
|
||||||
|
bSaveGameFlag = true;
|
||||||
|
}
|
||||||
|
ImGui::Spacing();
|
||||||
|
|
||||||
if (ImGui::BeginTabBar("Game", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
|
if (ImGui::BeginTabBar("Game", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
|
||||||
{
|
{
|
||||||
if (ImGui::BeginTabItem("Checkboxes"))
|
if (ImGui::BeginTabItem("Checkboxes"))
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
#define MENU_NAME "Cheat Menu"
|
#define MENU_NAME "Cheat Menu"
|
||||||
#define MENU_VERSION_NUMBER "2.8"
|
#define MENU_VERSION_NUMBER "2.8"
|
||||||
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
||||||
#define BUILD_NUMBER "20210717"
|
#define BUILD_NUMBER "20210727"
|
||||||
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"
|
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"
|
||||||
|
Loading…
Reference in New Issue
Block a user