From 56705f057653cf3a6e3e16d0618229ed9969d1b0 Mon Sep 17 00:00:00 2001 From: "George V." Date: Thu, 16 Apr 2026 19:40:20 +0300 Subject: [PATCH] feat: add version display and copy-to-clipboard functionality Add version string (branch/version) to the debug overlay when F3 is active. Also add a new keyboard shortcut (B key while F3 is held) to copy the version string to the clipboard and show a confirmation message. This improves debugging and support by making version information easily accessible. --- Minecraft.Client/Gui.cpp | 1 + Minecraft.Client/Windows64/Windows64_Minecraft.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Minecraft.Client/Gui.cpp b/Minecraft.Client/Gui.cpp index 88d06e42..c70fac40 100644 --- a/Minecraft.Client/Gui.cpp +++ b/Minecraft.Client/Gui.cpp @@ -1073,6 +1073,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) if (minecraft->options->renderDebug && minecraft->player != nullptr && minecraft->level != nullptr) { + lines.push_back(std::wstring(VER_BRANCHVERSION_STR_W) + L"/" + std::wstring(VER_PRODUCTVERSION_STR_W)); lines.push_back(minecraft->fpsString); lines.push_back(L"E: " + std::to_wstring(minecraft->level->getAllEntities().size())); int renderDistance = app.GetGameSettings(iPad, eGameSetting_RenderDistance); diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index c1b113be..75cc8331 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -2053,6 +2053,16 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, f3ComboUsed = true; } break; + case 'B': + std::wstring version = std::wstring(VER_BRANCHVERSION_STR_W) + L"/" + std::wstring(VER_PRODUCTVERSION_STR_W); + Screen::setClipboard(version); + if (pMinecraft->gui) + { + const int primaryPad = ProfileManager.GetPrimaryPad(); + pMinecraft->gui->addMessage(L"Copied version to clipboard", primaryPad); + } + f3ComboUsed = true; + break; } }