[SA] Fix remove tunes & add play timer in overlay
This commit is contained in:
parent
fb42ebaaea
commit
58ba06673e
@ -192,6 +192,7 @@ Favourites = "Add to favourites"
|
|||||||
FavouritesNone = "You don't have any favourites!"
|
FavouritesNone = "You don't have any favourites!"
|
||||||
FavouritesRemove = "Remove from favourites"
|
FavouritesRemove = "Remove from favourites"
|
||||||
Close = "Close"
|
Close = "Close"
|
||||||
|
Playtime = "Playtime: "
|
||||||
QuickSSKey = "Quick screenshot"
|
QuickSSKey = "Quick screenshot"
|
||||||
QuickTPKey = "Toggle quick teleport"
|
QuickTPKey = "Toggle quick teleport"
|
||||||
QuickVehSpawnerCMD = "Quick vehicle spawner"
|
QuickVehSpawnerCMD = "Quick vehicle spawner"
|
||||||
@ -227,6 +228,7 @@ ShowFPS = "Show FPS"
|
|||||||
ShowLocation = "Show location"
|
ShowLocation = "Show location"
|
||||||
ShowModelInfo = "Show model info"
|
ShowModelInfo = "Show model info"
|
||||||
ShowPedTasks = "Show ped tasks"
|
ShowPedTasks = "Show ped tasks"
|
||||||
|
ShowPlaytime = "Show playtime"
|
||||||
ShowRAM = "Show RAM usage"
|
ShowRAM = "Show RAM usage"
|
||||||
ShowVehHealth = "Show veh health"
|
ShowVehHealth = "Show veh health"
|
||||||
ShowVehSpeed = "Show veh speed"
|
ShowVehSpeed = "Show veh speed"
|
||||||
|
@ -527,6 +527,18 @@ void VehCustmzrMgr::Draw()
|
|||||||
pVeh->RemoveVehicleUpgrade(compID);
|
pVeh->RemoveVehicleUpgrade(compID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Remove leftover comps
|
||||||
|
Nitro, wheels, hydralics
|
||||||
|
*/
|
||||||
|
int comps[] = {1008, 1009, 1010, 1025, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087};
|
||||||
|
int maxSize = sizeof(comps)/sizeof(comps[0]);
|
||||||
|
for (int i = 0; i < maxSize; ++i)
|
||||||
|
{
|
||||||
|
pVeh->RemoveVehicleUpgrade(comps[i]);
|
||||||
|
}
|
||||||
|
|
||||||
Util::SetMessage(TEXT("Vehicle.RemoveTuneMSG"));
|
Util::SetMessage(TEXT("Vehicle.RemoveTuneMSG"));
|
||||||
}
|
}
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
@ -166,13 +166,18 @@ void MenuPage::Draw()
|
|||||||
gConfig.Set("Overlay.ShowLocationName", Overlay::m_bLocName);
|
gConfig.Set("Overlay.ShowLocationName", Overlay::m_bLocName);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::NextColumn();
|
|
||||||
|
|
||||||
if (ImGui::Checkbox(TEXT("Menu.ShowModelInfo"), &Overlay::m_bModelInfo))
|
if (ImGui::Checkbox(TEXT("Menu.ShowModelInfo"), &Overlay::m_bModelInfo))
|
||||||
{
|
{
|
||||||
gConfig.Set("Overlay.ShowModelInfo", Overlay::m_bModelInfo);
|
gConfig.Set("Overlay.ShowModelInfo", Overlay::m_bModelInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::NextColumn();
|
||||||
|
|
||||||
|
if (ImGui::Checkbox(TEXT("Menu.ShowPlaytime"), &Overlay::m_bPlaytime))
|
||||||
|
{
|
||||||
|
gConfig.Set("Overlay.ShowPlaytime", Overlay::m_bPlaytime);
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::Checkbox(TEXT("Menu.ShowPedTasks"), &Overlay::m_bPedTasks))
|
if (ImGui::Checkbox(TEXT("Menu.ShowPedTasks"), &Overlay::m_bPedTasks))
|
||||||
{
|
{
|
||||||
gConfig.Set("Overlay.ShowPedTasks", Overlay::m_bPedTasks);
|
gConfig.Set("Overlay.ShowPedTasks", Overlay::m_bPedTasks);
|
||||||
|
@ -15,6 +15,7 @@ void Overlay::Init()
|
|||||||
m_bFPS = gConfig.Get("Overlay.ShowFPS", false);
|
m_bFPS = gConfig.Get("Overlay.ShowFPS", false);
|
||||||
m_bLocName = gConfig.Get("Overlay.ShowLocationName", false);
|
m_bLocName = gConfig.Get("Overlay.ShowLocationName", false);
|
||||||
m_bModelInfo = gConfig.Get("Overlay.ShowModelInfo", false);
|
m_bModelInfo = gConfig.Get("Overlay.ShowModelInfo", false);
|
||||||
|
m_bPlaytime = gConfig.Get("Overlay.ShowPlaytime", false);
|
||||||
m_bPedTasks = gConfig.Get("Overlay.ShowPedTasks", false);
|
m_bPedTasks = gConfig.Get("Overlay.ShowPedTasks", false);
|
||||||
m_bTransparent = gConfig.Get("Overlay.Transparent", false);
|
m_bTransparent = gConfig.Get("Overlay.Transparent", false);
|
||||||
m_bMemUsage = gConfig.Get("Overlay.ShowMemoryUsage", false);
|
m_bMemUsage = gConfig.Get("Overlay.ShowMemoryUsage", false);
|
||||||
@ -462,6 +463,30 @@ void Overlay::ProcessInfoBox()
|
|||||||
ImGui::Text(TEXT("Menu.Location"), Util::GetLocationName(&pos).c_str());
|
ImGui::Text(TEXT("Menu.Location"), Util::GetLocationName(&pos).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_bPlaytime)
|
||||||
|
{
|
||||||
|
int timer = CTimer::m_snTimeInMilliseconds / 1000;
|
||||||
|
int h = timer / 3600;
|
||||||
|
int m = timer / 60 - h*60;
|
||||||
|
int s = timer - m*60;
|
||||||
|
|
||||||
|
if (h == 0)
|
||||||
|
{
|
||||||
|
if (m == 0)
|
||||||
|
{
|
||||||
|
ImGui::Text((TEXT_S("Menu.Playtime") + "%d seconds").c_str(), s);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ImGui::Text((TEXT_S("Menu.Playtime") + "%d min %d sec").c_str(), m, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ImGui::Text((TEXT_S("Menu.Playtime") + "%d hour %d min %d sec").c_str(), h, m, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_bMemUsage)
|
if (m_bMemUsage)
|
||||||
{
|
{
|
||||||
ImGui::Text(TEXT("Menu.RAMUsage"), memUsage);
|
ImGui::Text(TEXT("Menu.RAMUsage"), memUsage);
|
||||||
|
@ -48,6 +48,7 @@ public:
|
|||||||
static inline bool m_bLocName;
|
static inline bool m_bLocName;
|
||||||
static inline bool m_bMemUsage;
|
static inline bool m_bMemUsage;
|
||||||
static inline bool m_bModelInfo;
|
static inline bool m_bModelInfo;
|
||||||
|
static inline bool m_bPlaytime;
|
||||||
static inline bool m_bPedTasks;
|
static inline bool m_bPedTasks;
|
||||||
static inline bool m_bTransparent;
|
static inline bool m_bTransparent;
|
||||||
static inline bool m_bVehHealth;
|
static inline bool m_bVehHealth;
|
||||||
|
Loading…
Reference in New Issue
Block a user