mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 13:21:42 +00:00
frontend_listener: clean-up
This commit is contained in:
parent
1a1754f435
commit
2104f97b81
1 changed files with 4 additions and 7 deletions
|
|
@ -7,28 +7,25 @@ class FrontendListener : public WindowListener
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bool m_isF8KeyDown = false;
|
bool m_isF8KeyDown = false;
|
||||||
bool m_isF9KeyDown = false;
|
|
||||||
bool m_isF10KeyDown = false;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void OnKeyDown(SDL_Keycode key) override
|
void OnKeyDown(SDL_Keycode key) override
|
||||||
{
|
{
|
||||||
if (key == SDLK_F8 && !m_isF8KeyDown)
|
if (key == SDLK_F8 && !m_isF8KeyDown)
|
||||||
{
|
{
|
||||||
m_isF8KeyDown = true;
|
|
||||||
|
|
||||||
// アプリケーション設定 / 開発用 / デバッグ / HUD / 全 HUD 描画
|
// アプリケーション設定 / 開発用 / デバッグ / HUD / 全 HUD 描画
|
||||||
const auto ms_IsRenderHud = (bool*)g_memory.Translate(0x8328BB26);
|
const auto ms_IsRenderHud = (bool*)g_memory.Translate(0x8328BB26);
|
||||||
|
|
||||||
*ms_IsRenderHud = !*ms_IsRenderHud; // Toggle the entire HUD
|
*ms_IsRenderHud = !*ms_IsRenderHud; // Toggle the entire HUD
|
||||||
(void)printf("HUD %s\n", *ms_IsRenderHud ? "On" : "Off");
|
|
||||||
|
printf("[*] HUD %s\n", *ms_IsRenderHud ? "On" : "Off");
|
||||||
|
|
||||||
|
m_isF8KeyDown = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnKeyUp(SDL_Keycode key) override
|
void OnKeyUp(SDL_Keycode key) override
|
||||||
{
|
{
|
||||||
m_isF8KeyDown = key != SDLK_F8;
|
m_isF8KeyDown = key != SDLK_F8;
|
||||||
m_isF9KeyDown = key != SDLK_F9;
|
|
||||||
m_isF10KeyDown = key != SDLK_F10;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue