Files
Akebi-GC/cheat-library/src/user/cheat/visuals/NoFog.cpp
RyujinZX c476f90d5d fix 2.7
NoFog - fix
SetFPS - fix
NoCD - fix
2022-05-31 18:27:06 +03:00

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;
}
}
}