commit
dc6c424cf0
@ -52,6 +52,7 @@
|
||||
<ClInclude Include="src\user\cheat\teleport\CustomTeleports.h" />
|
||||
<ClInclude Include="src\user\cheat\visuals\CameraZoom.h" />
|
||||
<ClInclude Include="src\user\cheat\visuals\FPSUnlock.h" />
|
||||
<ClInclude Include="src\user\cheat\visuals\HideUI.h" />
|
||||
<ClInclude Include="src\user\cheat\visuals\NoFog.h" />
|
||||
<ClInclude Include="src\user\cheat\visuals\PaimonFollow.h" />
|
||||
<ClInclude Include="src\user\cheat\visuals\ProfileChanger.h" />
|
||||
@ -164,6 +165,7 @@
|
||||
<ClCompile Include="src\user\cheat\GenshinCM.cpp" />
|
||||
<ClCompile Include="src\user\cheat\visuals\CameraZoom.cpp" />
|
||||
<ClCompile Include="src\user\cheat\visuals\FPSUnlock.cpp" />
|
||||
<ClCompile Include="src\user\cheat\visuals\HideUI.cpp" />
|
||||
<ClCompile Include="src\user\cheat\visuals\NoFog.cpp" />
|
||||
<ClCompile Include="src\user\cheat\visuals\PaimonFollow.cpp" />
|
||||
<ClCompile Include="src\user\cheat\visuals\ProfileChanger.cpp" />
|
||||
|
@ -231,6 +231,9 @@
|
||||
<ClInclude Include="src\user\cheat\visuals\PaimonFollow.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\user\cheat\visuals\HideUI.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Font Include="res\Ruda-Bold.ttf" />
|
||||
@ -420,6 +423,9 @@
|
||||
<ClCompile Include="src\user\cheat\visuals\PaimonFollow.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\user\cheat\visuals\HideUI.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="res\res.rc">
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <cheat/visuals/ShowChestIndicator.h>
|
||||
#include <cheat/visuals/ProfileChanger.h>
|
||||
#include <cheat/visuals/PaimonFollow.h>
|
||||
#include <cheat/visuals/HideUI.h>
|
||||
|
||||
#include "GenshinCM.h"
|
||||
|
||||
@ -99,7 +100,8 @@ namespace cheat
|
||||
FEAT_INST(CameraZoom),
|
||||
FEAT_INST(ChestIndicator),
|
||||
FEAT_INST(ProfileChanger),
|
||||
FEAT_INST(PaimonFollow)
|
||||
FEAT_INST(PaimonFollow),
|
||||
FEAT_INST(HideUI)
|
||||
|
||||
});
|
||||
#undef FEAT_INST
|
||||
|
61
cheat-library/src/user/cheat/visuals/HideUI.cpp
Normal file
61
cheat-library/src/user/cheat/visuals/HideUI.cpp
Normal file
@ -0,0 +1,61 @@
|
||||
#include "pch-il2cpp.h"
|
||||
#include "HideUI.h"
|
||||
|
||||
#include <helpers.h>
|
||||
#include <cheat/events.h>
|
||||
|
||||
namespace cheat::feature
|
||||
{
|
||||
app::GameObject* ui_camera{};
|
||||
|
||||
HideUI::HideUI() : Feature(),
|
||||
NF(f_Enabled, "Hide UI", "Hide UI", false)
|
||||
{
|
||||
events::GameUpdateEvent += MY_METHOD_HANDLER(HideUI::OnGameUpdate);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& HideUI::GetGUIInfo() const
|
||||
{
|
||||
static const FeatureGUIInfo info{ "HideUI", "Visuals", false };
|
||||
return info;
|
||||
}
|
||||
|
||||
void HideUI::DrawMain()
|
||||
{
|
||||
ConfigWidget(f_Enabled, "Hide in-game UI.");
|
||||
}
|
||||
|
||||
bool HideUI::NeedStatusDraw() const
|
||||
{
|
||||
return f_Enabled;
|
||||
}
|
||||
|
||||
void HideUI::DrawStatus()
|
||||
{
|
||||
ImGui::Text("HideUI");
|
||||
}
|
||||
|
||||
HideUI& HideUI::GetInstance()
|
||||
{
|
||||
static HideUI instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
void HideUI::OnGameUpdate()
|
||||
{
|
||||
if (f_Enabled)
|
||||
{
|
||||
if (ui_camera == nullptr)
|
||||
ui_camera = app::GameObject_Find(string_to_il2cppi("/UICamera"), nullptr);
|
||||
|
||||
|
||||
if (ui_camera)
|
||||
app::GameObject_SetActive(ui_camera, false, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ui_camera)
|
||||
app::GameObject_SetActive(ui_camera, true, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
26
cheat-library/src/user/cheat/visuals/HideUI.h
Normal file
26
cheat-library/src/user/cheat/visuals/HideUI.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include <cheat-base/cheat/Feature.h>
|
||||
#include <cheat-base/config/config.h>
|
||||
|
||||
namespace cheat::feature
|
||||
{
|
||||
|
||||
class HideUI : public Feature
|
||||
{
|
||||
public:
|
||||
config::Field<bool> f_Enabled;
|
||||
|
||||
static HideUI& GetInstance();
|
||||
|
||||
const FeatureGUIInfo& GetGUIInfo() const override;
|
||||
void DrawMain() override;
|
||||
|
||||
virtual bool NeedStatusDraw() const override;
|
||||
void DrawStatus() override;
|
||||
void OnGameUpdate();
|
||||
|
||||
private:
|
||||
HideUI();
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user