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.
This commit is contained in:
George V. 2026-04-16 19:40:20 +03:00
parent ad0939acab
commit 56705f0576
2 changed files with 11 additions and 0 deletions

View file

@ -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);

View file

@ -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;
}
}