aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
diff options
context:
space:
mode:
author4win <4winyt@gmail.com>2026-03-02 23:32:26 -0600
committerGitHub <noreply@github.com>2026-03-03 13:32:26 +0800
commit7ce1fa3452a25980fb40311b031fbc67145899b9 (patch)
tree3b598402bc557591ef0086784407dde024507518 /Minecraft.Client/Windows64/Windows64_Minecraft.cpp
parentfad108aaee9178b65f74ac7ab716599dbfb3a14b (diff)
feat: bind F1 to toggle the HUD settings (#244)
Diffstat (limited to 'Minecraft.Client/Windows64/Windows64_Minecraft.cpp')
-rw-r--r--Minecraft.Client/Windows64/Windows64_Minecraft.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
index 48040c66..b49af853 100644
--- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
+++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
@@ -1272,7 +1272,15 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
}
}
- // F3 toggles the debug console overlay, F11 toggles fullscreen
+ // F1 toggles the HUD, F3 toggles the debug console overlay, F11 toggles fullscreen
+ if (KMInput.IsKeyPressed(VK_F1))
+ {
+ int primaryPad = ProfileManager.GetPrimaryPad();
+ unsigned char displayHud = app.GetGameSettings(primaryPad, eGameSetting_DisplayHUD);
+ app.SetGameSettings(primaryPad, eGameSetting_DisplayHUD, displayHud ? 0 : 1);
+ app.SetGameSettings(primaryPad, eGameSetting_DisplayHand, displayHud ? 0 : 1);
+ }
+
if (KMInput.IsKeyPressed(VK_F3))
{
static bool s_debugConsole = false;