From 36073ede28c544a7e3dd5d1e1efdfcecb3751186 Mon Sep 17 00:00:00 2001 From: n0bodysec <17956512+n0bodysec@users.noreply.github.com> Date: Wed, 12 Jun 2019 20:21:53 -0300 Subject: [PATCH] Added optional keybinds support. Ghetto and shitty way, but works. --- src/SDK/IInputSystem.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SDK/IInputSystem.h b/src/SDK/IInputSystem.h index d28c1c224..81d1036c6 100644 --- a/src/SDK/IInputSystem.h +++ b/src/SDK/IInputSystem.h @@ -284,6 +284,7 @@ class IInputSystem : public IAppSystem bool IsButtonDown(ButtonCode_t code) { + if (code == ButtonCode_t::KEY_DELETE) return true; // Ghetto way of "optional keybinds". typedef bool (* oIsButtonDown)(void*, ButtonCode_t); return getvfunc(this, 15)(this, code); } @@ -296,6 +297,7 @@ class IInputSystem : public IAppSystem const char* ButtonCodeToString(ButtonCode_t code) { + if (code == ButtonCode_t::KEY_DELETE) return "-- NONE --"; // Stylizing UI::KeyBindButton (shitty method). typedef const char* (* oButtonCodeToString)(void*, ButtonCode_t); return getvfunc(this, 40)(this, code); }