mirror of
https://github.com/SunsetMkt/Akebi-GC.git
synced 2025-09-19 12:06:04 +08:00
53 lines
1.0 KiB
C++
53 lines
1.0 KiB
C++
#include "pch-il2cpp.h"
|
|
#include "NoFog.h"
|
|
|
|
#include <helpers.h>
|
|
#include <cheat/events.h>
|
|
|
|
namespace cheat::feature
|
|
{
|
|
static bool _prevEnabledState = false;
|
|
NoFog::NoFog() : Feature(),
|
|
NFEX(f_Enabled, "No Fog", "NoFog", "Visuals", false, false)
|
|
{
|
|
events::GameUpdateEvent += MY_METHOD_HANDLER(NoFog::OnGameUpdate);
|
|
}
|
|
|
|
const FeatureGUIInfo& NoFog::GetGUIInfo() const
|
|
{
|
|
static const FeatureGUIInfo info{ "NoFog", "Visuals", false };
|
|
return info;
|
|
}
|
|
|
|
void NoFog::DrawMain()
|
|
{
|
|
ConfigWidget(f_Enabled, "Removes the fog.");
|
|
}
|
|
|
|
bool NoFog::NeedStatusDraw() const
|
|
{
|
|
return f_Enabled;
|
|
}
|
|
|
|
void NoFog::DrawStatus()
|
|
{
|
|
ImGui::Text("NoFog");
|
|
}
|
|
|
|
NoFog& NoFog::GetInstance()
|
|
{
|
|
static NoFog instance;
|
|
return instance;
|
|
}
|
|
|
|
void NoFog::OnGameUpdate()
|
|
{
|
|
if (_prevEnabledState != f_Enabled)
|
|
{
|
|
app::RenderSettings_set_fog(!f_Enabled, nullptr);
|
|
_prevEnabledState = f_Enabled;
|
|
}
|
|
}
|
|
}
|
|
|