diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-27 01:13:14 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-27 01:13:14 +0100 |
commit | 0de847bb4832c201233c87fa37867b9d89f0e8c8 (patch) | |
tree | f05add722b788d32aae40663e7748234452a3443 /NorthstarDLL/clientruihooks.cpp | |
parent | 2171d95e1221442081bade7929c05b82ca0f2a08 (diff) | |
download | NorthstarLauncher-0de847bb4832c201233c87fa37867b9d89f0e8c8.tar.gz NorthstarLauncher-0de847bb4832c201233c87fa37867b9d89f0e8c8.zip |
rename project folder (:tf: commit log)
Diffstat (limited to 'NorthstarDLL/clientruihooks.cpp')
-rw-r--r-- | NorthstarDLL/clientruihooks.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/NorthstarDLL/clientruihooks.cpp b/NorthstarDLL/clientruihooks.cpp new file mode 100644 index 00000000..5fb0b348 --- /dev/null +++ b/NorthstarDLL/clientruihooks.cpp @@ -0,0 +1,22 @@ +#include "pch.h" +#include "convar.h" + +AUTOHOOK_INIT() + +ConVar* Cvar_rui_drawEnable; + +AUTOHOOK(DrawRUIFunc, engine.dll + 0xFC500, +bool,, (void* a1, float* a2), +{ + if (!Cvar_rui_drawEnable->GetBool()) + return 0; + + return DrawRUIFunc(a1, a2); +}) + +ON_DLL_LOAD_CLIENT_RELIESON("engine.dll", RUI, ConVar, [](HMODULE baseAddress) +{ + AUTOHOOK_DISPATCH() + + Cvar_rui_drawEnable = new ConVar("rui_drawEnable", "1", FCVAR_CLIENTDLL, "Controls whether RUI should be drawn"); +})
\ No newline at end of file |