2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
2021-08-19 16:19:20 -04:00
|
|
|
#include "pch.h"
|
2020-12-02 16:19:16 -05:00
|
|
|
class Visual
|
|
|
|
{
|
|
|
|
private:
|
2021-06-18 12:49:11 -04:00
|
|
|
inline static bool m_bLockWeather;
|
|
|
|
inline static int m_nBacWeatherType;
|
2020-12-02 16:19:16 -05:00
|
|
|
|
|
|
|
// Timecyc
|
2021-06-18 12:49:11 -04:00
|
|
|
inline static int m_nTimecycHour = 8;
|
|
|
|
inline static std::vector<std::string> m_WeatherNames
|
2021-03-02 14:18:37 -05:00
|
|
|
{
|
2021-06-18 12:49:11 -04:00
|
|
|
"EXTRASUNNY LA", "SUNNY LA", "EXTRASUNNY SMOG LA", "SUNNY SMOG LA", "CLOUDY LA", "SUNNY SF", "EXTRASUNNY SF",
|
|
|
|
"CLOUDY SF", "RAINY SF", "FOGGY SF",
|
|
|
|
"SUNNY VEGAS", "EXTRASUNNY VEGAS", "CLOUDY VEGAS", "EXTRASUNNY COUNTRYSIDE", "SUNNY COUNTRYSIDE",
|
|
|
|
"CLOUDY COUNTRYSIDE", "RAINY COUNTRYSIDE",
|
|
|
|
"EXTRASUNNY DESERT", "SUNNY DESERT", "SANDSTORM DESERT", "UNDERWATER", "EXTRACOLOURS 1", "EXTRACOLOURS 2"
|
2021-03-02 14:18:37 -05:00
|
|
|
};
|
2020-12-02 16:19:16 -05:00
|
|
|
|
|
|
|
static void GenerateTimecycFile();
|
2021-08-20 02:09:59 -04:00
|
|
|
static int CalcArrayIndex();
|
2021-02-24 16:54:45 -05:00
|
|
|
static bool TimeCycColorEdit3(const char* label, uchar* r, uchar* g, uchar* b, ImGuiColorEditFlags flags = 0);
|
2021-06-18 12:49:11 -04:00
|
|
|
static bool TimeCycColorEdit4(const char* label, uchar* r, uchar* g, uchar* b, uchar* a,
|
2021-08-06 11:53:18 -04:00
|
|
|
ImGuiColorEditFlags flags = 0);
|
2021-06-18 12:49:11 -04:00
|
|
|
template <typename T>
|
2020-12-02 16:19:16 -05:00
|
|
|
static void TimecycSlider(const char* label, T* data, int min, int max);
|
|
|
|
public:
|
|
|
|
Visual();
|
2021-02-24 16:54:45 -05:00
|
|
|
static void Draw();
|
2020-12-02 16:19:16 -05:00
|
|
|
};
|
|
|
|
|
2021-06-18 12:49:11 -04:00
|
|
|
template <typename T>
|
2021-02-19 12:23:08 -05:00
|
|
|
void Visual::TimecycSlider(const char* label, T* ptr, int min, int max)
|
2020-12-02 16:19:16 -05:00
|
|
|
{
|
2021-08-20 02:09:59 -04:00
|
|
|
int val = CalcArrayIndex();
|
|
|
|
#ifdef GTASA
|
2021-06-18 12:49:11 -04:00
|
|
|
T* arr = static_cast<T*>(patch::GetPointer(int(ptr)));
|
2021-08-20 02:09:59 -04:00
|
|
|
#elif GTAVC
|
|
|
|
T* arr = static_cast<T*>(ptr);
|
|
|
|
#endif
|
2021-02-19 12:23:08 -05:00
|
|
|
int a = arr[val];
|
|
|
|
|
2020-12-02 16:19:16 -05:00
|
|
|
if (ImGui::SliderInt(label, &a, min, max))
|
2021-06-18 12:49:11 -04:00
|
|
|
arr[val] = static_cast<T>(a);
|
|
|
|
}
|