aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/clientruihooks.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-27 01:13:14 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-27 01:13:14 +0100
commit0de847bb4832c201233c87fa37867b9d89f0e8c8 (patch)
treef05add722b788d32aae40663e7748234452a3443 /NorthstarDLL/clientruihooks.cpp
parent2171d95e1221442081bade7929c05b82ca0f2a08 (diff)
downloadNorthstarLauncher-0de847bb4832c201233c87fa37867b9d89f0e8c8.tar.gz
NorthstarLauncher-0de847bb4832c201233c87fa37867b9d89f0e8c8.zip
rename project folder (:tf: commit log)
Diffstat (limited to 'NorthstarDLL/clientruihooks.cpp')
-rw-r--r--NorthstarDLL/clientruihooks.cpp22
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