Skip to content

Commit

Permalink
Added optional keybinds support.
Browse files Browse the repository at this point in the history
Ghetto and shitty way, but works.
  • Loading branch information
n0bodysec committed Aug 18, 2019
1 parent ad80ee6 commit 36073ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SDK/IInputSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<oIsButtonDown>(this, 15)(this, code);
}
Expand All @@ -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<oButtonCodeToString>(this, 40)(this, code);
}
Expand Down

0 comments on commit 36073ed

Please sign in to comment.