Move functions into their own methods, add new features to menu.
This commit is contained in:
parent
b9a832f15d
commit
8f469d1c9e
@ -47,6 +47,7 @@
|
|||||||
//Test
|
//Test
|
||||||
#include "CGame.h"
|
#include "CGame.h"
|
||||||
#include "CWaterLevel.h"
|
#include "CWaterLevel.h"
|
||||||
|
#include "CWeather.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _TEST
|
#define _TEST
|
||||||
@ -65,6 +66,7 @@
|
|||||||
#include "test_vehicle.h"
|
#include "test_vehicle.h"
|
||||||
#include "test_hud.h"
|
#include "test_hud.h"
|
||||||
#include "test_ped.h"
|
#include "test_ped.h"
|
||||||
|
#include "test_world.h"
|
||||||
|
|
||||||
// Well I had this working but then broke it 6-14-2024 @ 3:51PM...
|
// Well I had this working but then broke it 6-14-2024 @ 3:51PM...
|
||||||
// I fixed it 3:53PM.
|
// I fixed it 3:53PM.
|
||||||
@ -122,12 +124,8 @@ void PlayerTestFeatures()
|
|||||||
CVector pos = player->GetPosition();
|
CVector pos = player->GetPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool test = false;
|
bool test = false;
|
||||||
//bool toggleHud = true;
|
|
||||||
//bool toggleRadar = true;
|
|
||||||
bool enterCrane = false;
|
bool enterCrane = false;
|
||||||
//bool playerCanDrown = true;
|
|
||||||
|
|
||||||
void TestPage::Draw()
|
void TestPage::Draw()
|
||||||
{
|
{
|
||||||
@ -147,10 +145,20 @@ void TestPage::Draw()
|
|||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::BeginTabItem(TEXT("Test.TestFeatures")))
|
// TEXT(Test.TestPlayerMenu) - Test Player Menu
|
||||||
|
if (ImGui::BeginTabItem("Player"))
|
||||||
{
|
{
|
||||||
// Incomplete
|
// Incomplete
|
||||||
PedTestPage::PlayerTestMenu();
|
PedTestPage::PlayerTestMenu();
|
||||||
|
|
||||||
|
// This is needed, I think it should fix a crash.
|
||||||
|
ImGui::EndTabItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::BeginTabItem(TEXT("Test.TestFeatures")))
|
||||||
|
{
|
||||||
|
// Incomplete
|
||||||
|
/*PedTestPage::PlayerTestMenu();*/
|
||||||
//
|
//
|
||||||
//if (ImGui::Button("Suicide"))
|
//if (ImGui::Button("Suicide"))
|
||||||
//{
|
//{
|
||||||
@ -205,8 +213,6 @@ void TestPage::Draw()
|
|||||||
//}
|
//}
|
||||||
//ImGui::Columns(2, NULL, false);
|
//ImGui::Columns(2, NULL, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
//ImGui::NextColumn();
|
//ImGui::NextColumn();
|
||||||
// https://github.com/JuniorDjjr/CLEOPlus/blob/main/CLEOPlus/Misc.cpp#L261-L266
|
// https://github.com/JuniorDjjr/CLEOPlus/blob/main/CLEOPlus/Misc.cpp#L261-L266
|
||||||
@ -225,8 +231,6 @@ void TestPage::Draw()
|
|||||||
//CPickup::GiveUsAPickUpObject(CObject::, -1);
|
//CPickup::GiveUsAPickUpObject(CObject::, -1);
|
||||||
//CPickups::CreatePickupCoorsCloseToCoors(playerPos.x, playerPos.y, playerPos.z);
|
//CPickups::CreatePickupCoorsCloseToCoors(playerPos.x, playerPos.y, playerPos.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//ImGui::SameLine();
|
//ImGui::SameLine();
|
||||||
|
|
||||||
ImGui::Text("Spawn 50k near your position");
|
ImGui::Text("Spawn 50k near your position");
|
||||||
@ -242,19 +246,19 @@ void TestPage::Draw()
|
|||||||
|
|
||||||
// Not sure how this one works
|
// Not sure how this one works
|
||||||
//CCheckpoints::PlaceMarker();
|
//CCheckpoints::PlaceMarker();
|
||||||
if (ImGui::Button("Create Checkpoint"))
|
//if (ImGui::Button("Create Checkpoint"))
|
||||||
{
|
//{
|
||||||
|
|
||||||
}
|
//}
|
||||||
ImGui::SameLine();
|
//ImGui::SameLine();
|
||||||
ImGui::Text("Doesn't work!");
|
//ImGui::Text("Doesn't work!");
|
||||||
|
|
||||||
if (ImGui::Button("Remove checkpoint"))
|
//if (ImGui::Button("Remove checkpoint"))
|
||||||
{
|
//{
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
ImGui::SameLine();
|
//ImGui::SameLine();
|
||||||
ImGui::Text("Doesn't work!");
|
//ImGui::Text("Doesn't work!");
|
||||||
|
|
||||||
// Hud functions
|
// Hud functions
|
||||||
HudTestPage::HudTestMenu();
|
HudTestPage::HudTestMenu();
|
||||||
@ -275,22 +279,6 @@ void TestPage::Draw()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This seems to work fine.
|
|
||||||
//if (ImGui::Checkbox("Player drowns", &playerCanDrown))
|
|
||||||
//{
|
|
||||||
// int hPlayer = CPools::GetPedRef(player);
|
|
||||||
// if (!playerCanDrown) {
|
|
||||||
// Command<Commands::SET_CHAR_DROWNS_IN_WATER>(hPlayer, false);
|
|
||||||
// Util::SetMessage("You can no longer drown!");
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// Command<Commands::SET_CHAR_DROWNS_IN_WATER>(hPlayer, true);
|
|
||||||
// Util::SetMessage("You can now drown again!");
|
|
||||||
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// This works
|
// This works
|
||||||
if (ImGui::Button("Play Mission Passed"))
|
if (ImGui::Button("Play Mission Passed"))
|
||||||
{
|
{
|
||||||
@ -299,129 +287,100 @@ void TestPage::Draw()
|
|||||||
//bool isFlyingActive = CCheat::m_aCheatsActive);
|
//bool isFlyingActive = CCheat::m_aCheatsActive);
|
||||||
//Util::SetMessage(std::format("Is Flying Active: {}", isFlyingActive).c_str());
|
//Util::SetMessage(std::format("Is Flying Active: {}", isFlyingActive).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Doesn't work
|
|
||||||
// if (ImGui::Button("Show corona"))
|
|
||||||
// {
|
|
||||||
// I wonder How I would use this?
|
|
||||||
// I would need to define it somehow
|
|
||||||
//CCorona
|
|
||||||
//CCoronas::RegisterCorona();
|
|
||||||
// }
|
|
||||||
|
|
||||||
/*
|
|
||||||
* void PedPage::AddNewPed()
|
|
||||||
Example for what i'm trying to do spawning in a ped.
|
|
||||||
Command<Commands::REQUEST_MODEL>(model);
|
|
||||||
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
|
||||||
if (Command<Commands::IS_MODEL_AVAILABLE>(model))
|
|
||||||
{
|
|
||||||
std::string key = std::format("Custom.{} (Added)", name);
|
|
||||||
m_PedData.m_pData->Set(key.c_str(), std::to_string(model));
|
|
||||||
m_PedData.m_pData->Save();
|
|
||||||
Util::SetMessage(TEXT("Ped.AddPedMSG"));
|
|
||||||
Command<Commands::MARK_MODEL_AS_NO_LONGER_NEEDED>(model);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Util::SetMessage(TEXT("Vehicle.InvalidID"));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// First request the model
|
|
||||||
// Then load all models
|
|
||||||
// Lastly check if the model is available.
|
|
||||||
// If not say "Invalid model"
|
|
||||||
|
|
||||||
//
|
|
||||||
//if (ImGui::Button("Spawn Ped"))
|
|
||||||
//{
|
|
||||||
// //CPed* pPed = new CPed::;
|
|
||||||
// //CWaterLevel::
|
|
||||||
// //CWorld::Add()
|
|
||||||
//}
|
|
||||||
|
|
||||||
// Clothes
|
// Clothes
|
||||||
|
|
||||||
|
// World functions
|
||||||
|
WorldTestPage::WorldTestMenu();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//if (ImGui::Button("Spawn ped to attack vehicle"))
|
//#ifdef GTASA
|
||||||
//{
|
// // Weather
|
||||||
// Util::SetMessage("Not setup!");
|
// // Will these work?
|
||||||
|
//
|
||||||
|
// int defaultWeatherType;
|
||||||
|
// //eWeatherType defaultWeatherType = WEATHER_CLOUDY_COUNTRYSIDE;
|
||||||
|
// //std::string defaultWeatherType = "WEATHER_CLOUDY_COUNTRYSIDE";
|
||||||
|
//
|
||||||
|
// //static std::vector<eWeatherType> cloudyWeatherTypes = {
|
||||||
|
// // WEATHER_CLOUDY_COUNTRYSIDE, WEATHER_CLOUDY_LA, WEATHER_CLOUDY_SF,
|
||||||
|
// // WEATHER_CLOUDY_VEGAS
|
||||||
|
// //};
|
||||||
|
//
|
||||||
|
// static std::vector<std::string> allWeatherTypes = {
|
||||||
|
// "Extra Sunny LA", "Sunny LA", "Smog LA", "Sunny Smog LA",
|
||||||
|
// "Cloudy LA", "Sunny SF", "Extra Sunny SF", "Cloudy SF", "Rainy SF",
|
||||||
|
// "Foggy SF", "Sunny LV", "Cloudy LV", "Extra Sunny Countryside", "Cloudy Countryside",
|
||||||
|
// "Rainy Countryside", "Extra Sunny Desert", "Sunny Desert", "Sandstorm Desert",
|
||||||
|
// "Underwater", "Extra Colors 1", "Extra Colors 2"
|
||||||
|
//
|
||||||
|
// //"WEATHER_EXTRASUNNY_COUNTRYSIDE", "WEATHER_EXTRASUNNY_SMOG_LA", "WEATHER_EXTRASUNNY_SMOG_LA",
|
||||||
|
// //"WEATHER_EXTRASUNNY_VEGAS", "WEATHER_EXTRACOLOURS_1", "WEATHER_EXTRACOLOURS_2",
|
||||||
|
// //"WEATHER_RAINY_COUNTRYSIDE", "WEATHER_RAINY_SF", "WEATHER_FOGGY_SF",
|
||||||
|
// //"WEATHER_REGION_DEFAULT", "WEATHER_REGION_DESERT",
|
||||||
|
// //"WEATHER_REGION_LA", "WEATHER_REGION_LV", "WEATHER_REGION_SF",
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// static std::vector<std::string> cloudyWeatherTypes = {
|
||||||
|
// "WEATHER_CLOUDY_COUNTRYSIDE", "WEATHER_CLOUDY_LA", "WEATHER_CLOUDY_SF",
|
||||||
|
// "WEATHER_CLOUDY_VEGAS", "WEATHER_EXTRASUNNY_LA", "WEATHER_EXTRASUNNY_DESERT", "WEATHER_EXTRASUNNY_LA",
|
||||||
|
// "WEATHER_EXTRASUNNY_COUNTRYSIDE", "WEATHER_EXTRASUNNY_SMOG_LA", "WEATHER_EXTRASUNNY_SMOG_LA",
|
||||||
|
// "WEATHER_EXTRASUNNY_VEGAS", "WEATHER_EXTRACOLOURS_1", "WEATHER_EXTRACOLOURS_2"
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// static std::vector<eWeatherType> sunnyWeatherTypes = {
|
||||||
|
// WEATHER_EXTRASUNNY_LA, WEATHER_EXTRASUNNY_DESERT, WEATHER_EXTRASUNNY_LA,
|
||||||
|
// WEATHER_EXTRASUNNY_COUNTRYSIDE, WEATHER_EXTRASUNNY_SMOG_LA, WEATHER_EXTRASUNNY_SMOG_LA,
|
||||||
|
// WEATHER_EXTRASUNNY_VEGAS, WEATHER_EXTRACOLOURS_1, WEATHER_EXTRACOLOURS_2
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// static std::vector<eWeatherType> rainyWeatherTypes = {
|
||||||
|
// WEATHER_RAINY_COUNTRYSIDE, WEATHER_RAINY_SF,
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// //static std::vector<eWeatherType> otherWeatherTypes = {
|
||||||
|
// // WEATHER_FOGGY_SF, WEATHER_REGION_DEFAULT, WEATHER_REGION_DESERT,
|
||||||
|
// // WEATHER_REGION_LA, WEATHER_REGION_LV, WEATHER_REGION_SF,
|
||||||
|
// //};
|
||||||
|
//
|
||||||
|
// //
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// // TODO Setup to where this sets the Las Venturas weather instaed of the LA weather in the Los Venturas area.
|
||||||
|
// // TODO Setup drop down menu for this.
|
||||||
|
// // Get players current zone if possible, I know it's in the code somewhere.
|
||||||
|
// ImGui::Separator();
|
||||||
|
// ImGui::Text("Weather");
|
||||||
|
//
|
||||||
|
// if (ImGui::Button("Rain")) {
|
||||||
|
// // Will this work?
|
||||||
|
// CWeather::ForceWeatherNow(WEATHER_RAINY_COUNTRYSIDE);
|
||||||
|
// Util::SetMessage("Weather set to rain.");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/*
|
|
||||||
if (ImGui::CollapsingHeader("Spawner"))
|
|
||||||
{
|
|
||||||
// PedPage::AddNewPed
|
|
||||||
// This doesn't work yet.
|
|
||||||
//#define _DISABLED_CODE
|
|
||||||
#ifdef _DISABLED_CODE
|
|
||||||
static char name[8];
|
|
||||||
static int model = 0;
|
|
||||||
ImGui::InputTextWithHint(TEXT("Menu.Name"), "PEDNAME", name, 7);
|
|
||||||
Widget::InputInt(TEXT("Ped.Model"), &model, 0, 999999);
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImVec2 sz = Widget::CalcSize(2);
|
|
||||||
if (ImGui::Button(TEXT("Ped.AddPed"), sz))
|
|
||||||
{
|
|
||||||
Command<Commands::REQUEST_MODEL>(model);
|
|
||||||
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
|
||||||
if (Command<Commands::IS_MODEL_AVAILABLE>(model))
|
|
||||||
{
|
|
||||||
std::string key = std::format("Custom.{} (Added)", name);
|
|
||||||
// This part doesn't want to work.
|
|
||||||
//m_PedData.m_pData->Set(key.c_str(), std::to_string(model));
|
|
||||||
pedPage.m_PedData.m_pData->Set(key.c_str(), std::to_string(model));
|
|
||||||
pedPage.m_PedData.m_pData->Save();
|
|
||||||
//
|
//
|
||||||
Util::SetMessage(TEXT("Ped.AddPedMSG"));
|
// if (ImGui::Button("Clear")) {
|
||||||
Command<Commands::MARK_MODEL_AS_NO_LONGER_NEEDED>(model);
|
// // Will this work?
|
||||||
}
|
// CWeather::ForceWeatherNow(WEATHER_EXTRASUNNY_LA);
|
||||||
else
|
// Util::SetMessage("Weather set to rain.");
|
||||||
{
|
// }
|
||||||
Util::SetMessage(TEXT("Vehicle.InvalidID"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
|
||||||
if (ImGui::Button(TEXT("Ped.GetPlayerModel"), sz))
|
|
||||||
{
|
|
||||||
model = FindPlayerPed()->m_nModelIndex;
|
|
||||||
}
|
|
||||||
#endif //_DISABLED_CODE
|
|
||||||
//
|
//
|
||||||
|
// // This seems to work but the weather types aren't the right ones that I have listed.
|
||||||
|
// // They are out of order.
|
||||||
|
// //if (ImGui::Combo("Cloudy Weather", &defaultWeatherType, cloudyWeatherTypes))
|
||||||
|
// if (Widget::ListBox("Cloudy Weather", allWeatherTypes, defaultWeatherType))
|
||||||
|
// {
|
||||||
|
// CWeather::ForceWeatherNow(defaultWeatherType);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //if (ImGui::Combo("Cloudy Weather", &defaultWeatherType, cloudyWeatherTypes))
|
||||||
|
// {
|
||||||
|
// // How would I store the value for this?
|
||||||
|
// //CWeather::ForceWeatherNow();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//#endif //GTASA
|
||||||
|
|
||||||
// https://library.sannybuilder.com/#/sa/default/0672
|
|
||||||
//Command<Commands::TASK_DESTROY_CAR>(pPed);
|
|
||||||
|
|
||||||
} //End
|
|
||||||
//ImGui::EndChild();
|
|
||||||
|
|
||||||
*
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// This seems to work for printing text, idea came from imgui_demo.cpp line 5819
|
|
||||||
static char text[64] = "text";
|
|
||||||
static int bufTest[2];
|
|
||||||
|
|
||||||
if(ImGui::InputText("Test", text, IM_ARRAYSIZE(text)))
|
|
||||||
|
|
||||||
// Not sure how to get this to work
|
|
||||||
//if (ImGui::InputInt("Clock", bufTest, IM_ARRAYSIZE(bufTest)))
|
|
||||||
{
|
|
||||||
//CClock::ms_nGameClockHours = hours;
|
|
||||||
//CClock::SetGameClock(hours)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button("Print Text"))
|
|
||||||
{
|
|
||||||
Util::SetMessage(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Text("Test Items");
|
|
||||||
//CWorld::
|
|
||||||
*/
|
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,24 +4,9 @@
|
|||||||
bool toggleHud = true;
|
bool toggleHud = true;
|
||||||
bool toggleRadar = true;
|
bool toggleRadar = true;
|
||||||
|
|
||||||
void HudTestPage::HudTestMenu()
|
|
||||||
{
|
|
||||||
|
|
||||||
// GTA SA Specific memory addresses, will most likely crash 3 and vc.
|
static void ToggleRadarMenu()
|
||||||
#ifdef GTASA
|
|
||||||
if (ImGui::Checkbox("Toggle hud", &toggleHud))
|
|
||||||
{
|
{
|
||||||
// hudModeAddress = 0xBA6769;
|
|
||||||
if (!toggleHud)
|
|
||||||
{
|
|
||||||
patch::Set(0xBA6769, 0, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
patch::Set(0xBA6769, 1, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Checkbox("Toggle Radar", &toggleRadar))
|
if (ImGui::Checkbox("Toggle Radar", &toggleRadar))
|
||||||
{
|
{
|
||||||
// radarModeAddress = 0xBA676C
|
// radarModeAddress = 0xBA676C
|
||||||
@ -34,5 +19,41 @@ void HudTestPage::HudTestMenu()
|
|||||||
patch::Set(0xBA676C, 0, true);
|
patch::Set(0xBA676C, 0, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ToggleHudMenu()
|
||||||
|
{
|
||||||
|
if (ImGui::Checkbox("Toggle hud", &toggleHud))
|
||||||
|
{
|
||||||
|
// hudModeAddress = 0xBA6769;
|
||||||
|
if (!toggleHud)
|
||||||
|
{
|
||||||
|
patch::Set(0xBA6769, 0, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
patch::Set(0xBA6769, 1, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HudTestPage::HudTestMenu()
|
||||||
|
{
|
||||||
|
|
||||||
|
// GTA SA Specific memory addresses, will most likely crash 3 and vc.
|
||||||
|
// What are these doing? From scene.cpp on lines 172-177.
|
||||||
|
// Is Nop setting the value to zero? I think that is what it's doing.
|
||||||
|
// patch::Set<DWORD>(0x609A4E, 0x4D48689);
|
||||||
|
// patch::Set<WORD>(0x609A52, 0);
|
||||||
|
// patch::Nop(0x609A4E, 6);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// patch::Set
|
||||||
|
// patch::Set(Address, value, true);
|
||||||
|
|
||||||
|
#ifdef GTASA
|
||||||
|
ToggleHudMenu();
|
||||||
|
ToggleRadarMenu();
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
}
|
}
|
21
src/test/test_markers.cpp
Normal file
21
src/test/test_markers.cpp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "test_markers.h"
|
||||||
|
|
||||||
|
static void CoronasMenu()
|
||||||
|
{
|
||||||
|
// Doesn't work
|
||||||
|
// if (ImGui::Button("Show corona"))
|
||||||
|
// {
|
||||||
|
// I wonder How I would use this?
|
||||||
|
// I would need to define it somehow
|
||||||
|
//CCorona
|
||||||
|
//CCoronas::RegisterCorona();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarkersTestPage::MarkersTestMenu()
|
||||||
|
{
|
||||||
|
#ifdef _TEST
|
||||||
|
CoronasMenu();
|
||||||
|
#endif //_TEST
|
||||||
|
}
|
12
src/test/test_markers.h
Normal file
12
src/test/test_markers.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
//#include "pch.h"
|
||||||
|
|
||||||
|
class MarkersTestPage
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
MarkersTestPage();
|
||||||
|
MarkersTestPage(const MarkersTestPage&);
|
||||||
|
void Draw();
|
||||||
|
public:
|
||||||
|
static void MarkersTestMenu();
|
||||||
|
};
|
@ -6,24 +6,30 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Incomplete.
|
// Incomplete.
|
||||||
|
// https://library.sannybuilder.com/#/sa/default/0672
|
||||||
|
//Command<Commands::TASK_DESTROY_CAR>(pPed);
|
||||||
|
|
||||||
bool playerCanDrown = true;
|
bool playerCanDrown = true;
|
||||||
|
|
||||||
void PedTestPage::PlayerTestMenu()
|
static void SuicideMenu()
|
||||||
{
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
if (ImGui::Button("Suicide"))
|
if (ImGui::Button("Suicide"))
|
||||||
{
|
{
|
||||||
//CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
int hplayer = CPools::GetPedRef(player);
|
int hplayer = CPools::GetPedRef(player);
|
||||||
Command<Commands::EXPLODE_CHAR_HEAD>(hplayer);
|
Command<Commands::EXPLODE_CHAR_HEAD>(hplayer);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
|
}
|
||||||
|
|
||||||
|
static void BombMenu()
|
||||||
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
//TODO Test these in the other games, 3 and vc later!
|
//TODO Test these in the other games, 3 and vc later!
|
||||||
if (ImGui::Button("Bomb")) {
|
if (ImGui::Button("Bomb")) {
|
||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
@ -36,8 +42,12 @@ void PedTestPage::PlayerTestMenu()
|
|||||||
Command<Commands::ADD_EXPLOSION>(playerPos.x, playerPos.y, playerPos.z, EXPLOSION_CAR);
|
Command<Commands::ADD_EXPLOSION>(playerPos.x, playerPos.y, playerPos.z, EXPLOSION_CAR);
|
||||||
}
|
}
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ShowCoordsMenu()
|
||||||
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
if (ImGui::Button("Show coords"))
|
if (ImGui::Button("Show coords"))
|
||||||
{
|
{
|
||||||
CVector playerCoords = player->GetPosition();
|
CVector playerCoords = player->GetPosition();
|
||||||
@ -60,6 +70,12 @@ void PedTestPage::PlayerTestMenu()
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ShowMarkerCoordsMenu()
|
||||||
|
{
|
||||||
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
|
|
||||||
//if (ImGui::Button("Show Marker Coords"))
|
//if (ImGui::Button("Show Marker Coords"))
|
||||||
//{
|
//{
|
||||||
@ -73,9 +89,14 @@ void PedTestPage::PlayerTestMenu()
|
|||||||
// //Command<Commands::BLIP>(playerPos.x, playerPos.y, playerPos.z, EXPLOSION_CAR);
|
// //Command<Commands::BLIP>(playerPos.x, playerPos.y, playerPos.z, EXPLOSION_CAR);
|
||||||
|
|
||||||
//}
|
//}
|
||||||
//ImGui::Columns(2, NULL, false);
|
#endif //GTASA
|
||||||
#ifdef GTASA
|
}
|
||||||
|
|
||||||
|
static void TogglePlayerDrownMenu()
|
||||||
|
{
|
||||||
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
|
// This seems to work fine.
|
||||||
if (ImGui::Checkbox("Player drowns", &playerCanDrown))
|
if (ImGui::Checkbox("Player drowns", &playerCanDrown))
|
||||||
{
|
{
|
||||||
int hPlayer = CPools::GetPedRef(player);
|
int hPlayer = CPools::GetPedRef(player);
|
||||||
@ -90,4 +111,140 @@ void PedTestPage::PlayerTestMenu()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void GravityValuesMenu()
|
||||||
|
{
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
|
#ifdef GTASA
|
||||||
|
ImGui::Separator();
|
||||||
|
ImGui::Text("Gravity Values");
|
||||||
|
//ImGui::Columns(4);
|
||||||
|
|
||||||
|
if (ImGui::Button("Space Gravity")) {
|
||||||
|
GAME_GRAVITY = 0.0;
|
||||||
|
Util::SetMessage("Gravity set to space.");
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button("Moon Gravity")) {
|
||||||
|
GAME_GRAVITY = 0.001;
|
||||||
|
Util::SetMessage("Gravity set to moon.");
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button("Normal Gravity")) {
|
||||||
|
GAME_GRAVITY = 0.008;
|
||||||
|
Util::SetMessage("Gravity set to normal.");
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Separator();
|
||||||
|
if (ImGui::Button("Strong Gravity")) {
|
||||||
|
GAME_GRAVITY = 0.015;
|
||||||
|
Util::SetMessage("Gravity set to strong.");
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button("Maniac Gravity")) {
|
||||||
|
GAME_GRAVITY = 0.9;
|
||||||
|
Util::SetMessage("Gravity set to maniac. Chaos will occur!");
|
||||||
|
}
|
||||||
|
#endif //GTASA
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Very WIP and incomplete.
|
||||||
|
static void SpawnPedMenu()
|
||||||
|
{
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* void PedPage::AddNewPed()
|
||||||
|
Example for what i'm trying to do spawning in a ped.
|
||||||
|
Command<Commands::REQUEST_MODEL>(model);
|
||||||
|
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
||||||
|
if (Command<Commands::IS_MODEL_AVAILABLE>(model))
|
||||||
|
{
|
||||||
|
std::string key = std::format("Custom.{} (Added)", name);
|
||||||
|
m_PedData.m_pData->Set(key.c_str(), std::to_string(model));
|
||||||
|
m_PedData.m_pData->Save();
|
||||||
|
Util::SetMessage(TEXT("Ped.AddPedMSG"));
|
||||||
|
Command<Commands::MARK_MODEL_AS_NO_LONGER_NEEDED>(model);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Util::SetMessage(TEXT("Vehicle.InvalidID"));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// First request the model
|
||||||
|
// Then load all models
|
||||||
|
// Lastly check if the model is available.
|
||||||
|
// If not say "Invalid model"
|
||||||
|
|
||||||
|
//
|
||||||
|
//if (ImGui::Button("Spawn Ped"))
|
||||||
|
//{
|
||||||
|
// //CPed* pPed = new CPed::;
|
||||||
|
// //CWaterLevel::
|
||||||
|
// //CWorld::Add()
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (ImGui::Button("Spawn ped to attack vehicle"))
|
||||||
|
//{
|
||||||
|
// Util::SetMessage("Not setup!");
|
||||||
|
//}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (ImGui::CollapsingHeader("Spawner"))
|
||||||
|
{
|
||||||
|
// PedPage::AddNewPed
|
||||||
|
// This doesn't work yet.
|
||||||
|
//#define _DISABLED_CODE
|
||||||
|
#ifdef _DISABLED_CODE
|
||||||
|
static char name[8];
|
||||||
|
static int model = 0;
|
||||||
|
ImGui::InputTextWithHint(TEXT("Menu.Name"), "PEDNAME", name, 7);
|
||||||
|
Widget::InputInt(TEXT("Ped.Model"), &model, 0, 999999);
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImVec2 sz = Widget::CalcSize(2);
|
||||||
|
if (ImGui::Button(TEXT("Ped.AddPed"), sz))
|
||||||
|
{
|
||||||
|
Command<Commands::REQUEST_MODEL>(model);
|
||||||
|
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
||||||
|
if (Command<Commands::IS_MODEL_AVAILABLE>(model))
|
||||||
|
{
|
||||||
|
std::string key = std::format("Custom.{} (Added)", name);
|
||||||
|
// This part doesn't want to work.
|
||||||
|
//m_PedData.m_pData->Set(key.c_str(), std::to_string(model));
|
||||||
|
pedPage.m_PedData.m_pData->Set(key.c_str(), std::to_string(model));
|
||||||
|
pedPage.m_PedData.m_pData->Save();
|
||||||
|
//
|
||||||
|
Util::SetMessage(TEXT("Ped.AddPedMSG"));
|
||||||
|
Command<Commands::MARK_MODEL_AS_NO_LONGER_NEEDED>(model);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Util::SetMessage(TEXT("Vehicle.InvalidID"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(TEXT("Ped.GetPlayerModel"), sz))
|
||||||
|
{
|
||||||
|
model = FindPlayerPed()->m_nModelIndex;
|
||||||
|
}
|
||||||
|
#endif //_DISABLED_CODE
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PedTestPage::PlayerTestMenu()
|
||||||
|
{
|
||||||
|
SuicideMenu();
|
||||||
|
BombMenu();
|
||||||
|
ShowCoordsMenu();
|
||||||
|
ShowMarkerCoordsMenu();
|
||||||
|
TogglePlayerDrownMenu();
|
||||||
|
GravityValuesMenu();
|
||||||
}
|
}
|
@ -44,7 +44,8 @@ bool bFlyingCars = false;
|
|||||||
bool bSearchLight = false;
|
bool bSearchLight = false;
|
||||||
bool bVehGodMode = false;
|
bool bVehGodMode = false;
|
||||||
|
|
||||||
void VehicleTestPage::VehicleTestMenu() {
|
static void BlowUpAllCarsMenu()
|
||||||
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
int hplayer = CPools::GetPedRef(player);
|
int hplayer = CPools::GetPedRef(player);
|
||||||
@ -57,10 +58,16 @@ void VehicleTestPage::VehicleTestMenu() {
|
|||||||
Util::SetMessage("All cars have been exterminated!");
|
Util::SetMessage("All cars have been exterminated!");
|
||||||
#else
|
#else
|
||||||
Util::SetMessage("Only works for SA!");
|
Util::SetMessage("Only works for SA!");
|
||||||
#endif
|
|
||||||
|
}
|
||||||
|
#endif //GTASA
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SearchLightMenu()
|
||||||
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
// Try to toggle the search lights in police helicopters, is it toggleable in SA? I think I did it in FiveM.
|
// Try to toggle the search lights in police helicopters, is it toggleable in SA? I think I did it in FiveM.
|
||||||
if (ImGui::Checkbox("Search Light", &bSearchLight))
|
if (ImGui::Checkbox("Search Light", &bSearchLight))
|
||||||
{
|
{
|
||||||
@ -76,13 +83,15 @@ void VehicleTestPage::VehicleTestMenu() {
|
|||||||
//CHeli::AddHeliSearchLight();
|
//CHeli::AddHeliSearchLight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Text("Doesn't work!");
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
// https://github.com/JuniorDjjr/CLEOPlus/blob/main/CLEOPlus/Misc.cpp#L261-L266
|
}
|
||||||
/*
|
|
||||||
reinterpret_cast<CRunningScript*>(thread)->UpdateCompareFlag(CCheat::m_aCheatsActive[i]);
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
static void BlowUpVehicleMenu()
|
||||||
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
if (ImGui::Button("Blow up Current Car"))
|
if (ImGui::Button("Blow up Current Car"))
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -101,8 +110,12 @@ void VehicleTestPage::VehicleTestMenu() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CloseDoorsMenu()
|
||||||
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
// Works for closing the doors, not the trunk or hood though.
|
// Works for closing the doors, not the trunk or hood though.
|
||||||
if (ImGui::Button("Close doors"))
|
if (ImGui::Button("Close doors"))
|
||||||
{
|
{
|
||||||
@ -119,9 +132,13 @@ void VehicleTestPage::VehicleTestMenu() {
|
|||||||
Command<Commands::CLOSE_ALL_CAR_DOORS>(hVeh);
|
Command<Commands::CLOSE_ALL_CAR_DOORS>(hVeh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //GTASA
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static void LockDoorsMenu()
|
||||||
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
// This works for locking the car doors.
|
// This works for locking the car doors.
|
||||||
if (ImGui::Button("Lock doors"))
|
if (ImGui::Button("Lock doors"))
|
||||||
{
|
{
|
||||||
@ -159,10 +176,13 @@ void VehicleTestPage::VehicleTestMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
static void FlyingCarsMenu()
|
||||||
|
{
|
||||||
// This works
|
// This works
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
if (ImGui::Checkbox("Flying cars", &bFlyingCars))
|
if (ImGui::Checkbox("Flying cars", &bFlyingCars))
|
||||||
{
|
{
|
||||||
// In cleo redux I can read and write to memory addresses, not sure how on here.
|
// In cleo redux I can read and write to memory addresses, not sure how on here.
|
||||||
@ -192,9 +212,13 @@ void VehicleTestPage::VehicleTestMenu() {
|
|||||||
// Gives an error though
|
// Gives an error though
|
||||||
}
|
}
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
|
}
|
||||||
|
|
||||||
|
static void InvincibleCarsMenu()
|
||||||
|
{
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
// This works, this was a quick test I came up with.
|
// This works, this was a quick test I came up with.
|
||||||
if (ImGui::Checkbox("Invincible car", &bVehGodMode))
|
if (ImGui::Checkbox("Invincible car", &bVehGodMode))
|
||||||
{
|
{
|
||||||
@ -226,8 +250,13 @@ void VehicleTestPage::VehicleTestMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
|
}
|
||||||
|
|
||||||
|
static void IsCarInWaterMenu()
|
||||||
|
{
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
CPlayerPed* player = FindPlayerPed();
|
||||||
// Working
|
// Working
|
||||||
if (ImGui::Button("Is car in water"))
|
if (ImGui::Button("Is car in water"))
|
||||||
{
|
{
|
||||||
@ -258,6 +287,33 @@ void VehicleTestPage::VehicleTestMenu() {
|
|||||||
}
|
}
|
||||||
#endif //GTASA
|
#endif //GTASA
|
||||||
|
|
||||||
|
void VehicleTestPage::VehicleTestMenu() {
|
||||||
|
//#ifdef GTASA
|
||||||
|
// CPlayerPed* player = FindPlayerPed();
|
||||||
|
// int hplayer = CPools::GetPedRef(player);
|
||||||
|
// CVehicle* pVeh = nullptr;
|
||||||
|
// CVector pos = player->GetPosition();
|
||||||
|
//
|
||||||
|
// if (ImGui::Button("Blow up all cars")) {
|
||||||
|
//
|
||||||
|
// CCheat::BlowUpCarsCheat();
|
||||||
|
// Util::SetMessage("All cars have been exterminated!");
|
||||||
|
//#else
|
||||||
|
// Util::SetMessage("Only works for SA!");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//#endif //GTASA
|
||||||
|
|
||||||
|
BlowUpAllCarsMenu();
|
||||||
|
SearchLightMenu();
|
||||||
|
BlowUpVehicleMenu();
|
||||||
|
CloseDoorsMenu();
|
||||||
|
LockDoorsMenu();
|
||||||
|
FlyingCarsMenu();
|
||||||
|
InvincibleCarsMenu();
|
||||||
|
IsCarInWaterMenu();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// void VehiclePage::Draw()
|
// void VehiclePage::Draw()
|
||||||
|
155
src/test/test_world.cpp
Normal file
155
src/test/test_world.cpp
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "test_world.h"
|
||||||
|
#include "utils/widget.h"
|
||||||
|
|
||||||
|
void WeatherMenu()
|
||||||
|
{
|
||||||
|
// Weather
|
||||||
|
// Will these work?
|
||||||
|
|
||||||
|
// Will giving this a default value fix the crashing? I think the weather is crashing it.
|
||||||
|
int defaultWeatherType = 0;
|
||||||
|
//eWeatherType defaultWeatherType = WEATHER_CLOUDY_COUNTRYSIDE;
|
||||||
|
//std::string defaultWeatherType = "WEATHER_CLOUDY_COUNTRYSIDE";
|
||||||
|
|
||||||
|
//static std::vector<eWeatherType> cloudyWeatherTypes = {
|
||||||
|
// WEATHER_CLOUDY_COUNTRYSIDE, WEATHER_CLOUDY_LA, WEATHER_CLOUDY_SF,
|
||||||
|
// WEATHER_CLOUDY_VEGAS
|
||||||
|
//};
|
||||||
|
|
||||||
|
static std::vector<std::string> allWeatherTypes = {
|
||||||
|
"Extra Sunny LA", "Sunny LA", "Smog LA", "Sunny Smog LA",
|
||||||
|
"Cloudy LA", "Sunny SF", "Extra Sunny SF", "Cloudy SF", "Rainy SF",
|
||||||
|
"Foggy SF", "Sunny LV", "Cloudy LV", "Extra Sunny Countryside", "Cloudy Countryside",
|
||||||
|
"Rainy Countryside", "Extra Sunny Desert", "Sunny Desert", "Sandstorm Desert",
|
||||||
|
"Underwater", "Extra Colors 1", "Extra Colors 2"
|
||||||
|
|
||||||
|
//"WEATHER_EXTRASUNNY_COUNTRYSIDE", "WEATHER_EXTRASUNNY_SMOG_LA", "WEATHER_EXTRASUNNY_SMOG_LA",
|
||||||
|
//"WEATHER_EXTRASUNNY_VEGAS", "WEATHER_EXTRACOLOURS_1", "WEATHER_EXTRACOLOURS_2",
|
||||||
|
//"WEATHER_RAINY_COUNTRYSIDE", "WEATHER_RAINY_SF", "WEATHER_FOGGY_SF",
|
||||||
|
//"WEATHER_REGION_DEFAULT", "WEATHER_REGION_DESERT",
|
||||||
|
//"WEATHER_REGION_LA", "WEATHER_REGION_LV", "WEATHER_REGION_SF",
|
||||||
|
};
|
||||||
|
|
||||||
|
static std::vector<std::string> cloudyWeatherTypes = {
|
||||||
|
"WEATHER_CLOUDY_COUNTRYSIDE", "WEATHER_CLOUDY_LA", "WEATHER_CLOUDY_SF",
|
||||||
|
"WEATHER_CLOUDY_VEGAS", "WEATHER_EXTRASUNNY_LA", "WEATHER_EXTRASUNNY_DESERT", "WEATHER_EXTRASUNNY_LA",
|
||||||
|
"WEATHER_EXTRASUNNY_COUNTRYSIDE", "WEATHER_EXTRASUNNY_SMOG_LA", "WEATHER_EXTRASUNNY_SMOG_LA",
|
||||||
|
"WEATHER_EXTRASUNNY_VEGAS", "WEATHER_EXTRACOLOURS_1", "WEATHER_EXTRACOLOURS_2"
|
||||||
|
};
|
||||||
|
|
||||||
|
static std::vector<eWeatherType> sunnyWeatherTypes = {
|
||||||
|
WEATHER_EXTRASUNNY_LA, WEATHER_EXTRASUNNY_DESERT, WEATHER_EXTRASUNNY_LA,
|
||||||
|
WEATHER_EXTRASUNNY_COUNTRYSIDE, WEATHER_EXTRASUNNY_SMOG_LA, WEATHER_EXTRASUNNY_SMOG_LA,
|
||||||
|
WEATHER_EXTRASUNNY_VEGAS, WEATHER_EXTRACOLOURS_1, WEATHER_EXTRACOLOURS_2
|
||||||
|
};
|
||||||
|
|
||||||
|
static std::vector<eWeatherType> rainyWeatherTypes = {
|
||||||
|
WEATHER_RAINY_COUNTRYSIDE, WEATHER_RAINY_SF,
|
||||||
|
};
|
||||||
|
|
||||||
|
//static std::vector<eWeatherType> otherWeatherTypes = {
|
||||||
|
// WEATHER_FOGGY_SF, WEATHER_REGION_DEFAULT, WEATHER_REGION_DESERT,
|
||||||
|
// WEATHER_REGION_LA, WEATHER_REGION_LV, WEATHER_REGION_SF,
|
||||||
|
//};
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TODO Setup to where this sets the Las Venturas weather instaed of the LA weather in the Los Venturas area.
|
||||||
|
// TODO Setup drop down menu for this.
|
||||||
|
// Get players current zone if possible, I know it's in the code somewhere.
|
||||||
|
ImGui::Separator();
|
||||||
|
ImGui::Text("Weather");
|
||||||
|
|
||||||
|
if (ImGui::Button("Rain")) {
|
||||||
|
// Will this work?
|
||||||
|
CWeather::ForceWeatherNow(WEATHER_RAINY_COUNTRYSIDE);
|
||||||
|
Util::SetMessage("Weather set to rain.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::Button("Clear")) {
|
||||||
|
// Will this work?
|
||||||
|
CWeather::ForceWeatherNow(WEATHER_EXTRASUNNY_LA);
|
||||||
|
Util::SetMessage("Weather set to rain.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// This seems to work but the weather types aren't the right ones that I have listed.
|
||||||
|
// They are out of order.
|
||||||
|
//if (ImGui::Combo("Cloudy Weather", &defaultWeatherType, cloudyWeatherTypes))
|
||||||
|
if (Widget::ListBox("Cloudy Weather", allWeatherTypes, defaultWeatherType))
|
||||||
|
{
|
||||||
|
defaultWeatherType = defaultWeatherType;
|
||||||
|
CWeather::ForceWeatherNow(defaultWeatherType);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (ImGui::Combo("Cloudy Weather", &defaultWeatherType, cloudyWeatherTypes))
|
||||||
|
{
|
||||||
|
// How would I store the value for this?
|
||||||
|
//CWeather::ForceWeatherNow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CreateCheckpointMenu()
|
||||||
|
{
|
||||||
|
// Not sure how this one works
|
||||||
|
//CCheckpoints::PlaceMarker();
|
||||||
|
if (ImGui::Button("Create Checkpoint"))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Text("Doesn't work!");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void RemoveCheckpointMenu()
|
||||||
|
{
|
||||||
|
if (ImGui::Button("Remove checkpoint"))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Text("Doesn't work!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void WorldTestPage::WorldTestMenu()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Refactor these to have the tabs in each file instead of in the test.cpp file
|
||||||
|
// TEXT(Test.TestWorldMenu) - Test World Menu
|
||||||
|
if (ImGui::BeginTabItem("World"))
|
||||||
|
{
|
||||||
|
WeatherMenu();
|
||||||
|
ImGui::EndTabItem();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Not sure how this one works
|
||||||
|
//CCheckpoints::PlaceMarker();
|
||||||
|
//if (ImGui::Button("Create Checkpoint"))
|
||||||
|
//{
|
||||||
|
|
||||||
|
//}
|
||||||
|
//ImGui::SameLine();
|
||||||
|
//ImGui::Text("Doesn't work!");
|
||||||
|
|
||||||
|
//if (ImGui::Button("Remove checkpoint"))
|
||||||
|
//{
|
||||||
|
|
||||||
|
//}
|
||||||
|
//ImGui::SameLine();
|
||||||
|
//ImGui::Text("Doesn't work!");
|
||||||
|
|
||||||
|
#ifdef GTASA
|
||||||
|
CreateCheckpointMenu();
|
||||||
|
RemoveCheckpointMenu();
|
||||||
|
// Weather
|
||||||
|
WeatherMenu();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Not implemented yet!
|
||||||
|
|
||||||
|
}
|
12
src/test/test_world.h
Normal file
12
src/test/test_world.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
//#include "pch.h"
|
||||||
|
|
||||||
|
class WorldTestPage
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
WorldTestPage();
|
||||||
|
WorldTestPage(const WorldTestPage&);
|
||||||
|
void Draw();
|
||||||
|
public:
|
||||||
|
static void WorldTestMenu();
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user