aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean <124172979+jeanmajid@users.noreply.github.com>2026-03-02 14:00:02 +0100
committerGitHub <noreply@github.com>2026-03-02 20:00:02 +0700
commit59339a7afc5d4869c7ba96240da38e2f5657cc8c (patch)
treeaa05153a3f0848b986389acb67b4d5b33e905259
parent73ceca7fc21ba1c3355072995ba331d51c0634ab (diff)
Bound F3 and F4 to open debug menus (#94)
* feat: Added f3 and f4 keys to open debug stuff * fix: only open debug overlay when ingame, to avoid crashes * docs: added keybinds to docs * docs: moved the keybinds to the bottom, as they are less important * fix: add missing # ifdef
-rw-r--r--Minecraft.Client/Windows64/Windows64_Minecraft.cpp27
-rw-r--r--README.md2
2 files changed, 29 insertions, 0 deletions
diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
index 399bf59f..d822e943 100644
--- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
+++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
@@ -1234,6 +1234,33 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
}
}
+#ifdef _DEBUG_MENUS_ENABLED
+ // F3 toggles onscreen debug info
+ if (KMInput.IsKeyPressed(VK_F3))
+ {
+ if (Minecraft* pMinecraft = Minecraft::GetInstance())
+ {
+ if (pMinecraft->options && app.DebugSettingsOn())
+ {
+ pMinecraft->options->renderDebug = !pMinecraft->options->renderDebug;
+ }
+ }
+ }
+
+ // F4 opens debug overlay
+ if (KMInput.IsKeyPressed(VK_F4))
+ {
+ if (Minecraft* pMinecraft = Minecraft::GetInstance())
+ {
+ if (pMinecraft->options && app.DebugSettingsOn() &&
+ app.GetGameStarted() && !ui.GetMenuDisplayed(0) && pMinecraft->screen == NULL)
+ {
+ ui.NavigateToScene(0, eUIScene_DebugOverlay, NULL, eUILayer_Debug);
+ }
+ }
+ }
+#endif
+
#if 0
// has the game defined profile data been changed (by a profile load)
if(app.uiGameDefinedDataChangedBitmask!=0)
diff --git a/README.md b/README.md
index a0f1870d..53323cc0 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,8 @@ This project contains the source code of Minecraft Legacy Console Edition v1.3.0
- **Select Item**: `Mouse Wheel` or keys `1` to `9`
- **Accept or Decline Tutorial hints**: `Enter` to accept and `B` to decline
- **Host Options**: `TAB`
+- **Toggle Debug Info**: `F3`
+- **Open Debug Overlay**: `F4`
## Build & Run