feat: add NumLock auto-run toggle and HUD indicator

NumLock now toggles auto-run alongside the existing tilde key. A cyan
[Auto-Run] indicator appears in the player info area when active.
This commit is contained in:
Kelsi 2026-03-18 11:25:35 -07:00
parent 9368c8a715
commit 0caf945a44
2 changed files with 12 additions and 2 deletions

View file

@ -273,8 +273,9 @@ void CameraController::update(float deltaTime) {
keyW = keyS = keyA = keyD = keyQ = keyE = nowJump = false;
}
// Tilde toggles auto-run; any forward/backward key cancels it
bool tildeDown = !uiWantsKeyboard && input.isKeyPressed(SDL_SCANCODE_GRAVE);
// Tilde or NumLock toggles auto-run; any forward/backward key cancels it
bool tildeDown = !uiWantsKeyboard && (input.isKeyPressed(SDL_SCANCODE_GRAVE) ||
input.isKeyPressed(SDL_SCANCODE_NUMLOCKCLEAR));
if (tildeDown && !tildeWasDown) {
autoRunning = !autoRunning;
}