Repository navigation
Conversation
The overlay binds Pause/Break, F10, - and Shift+= on the scope it attaches to while wrapping a loop, shows Pause/Resume, Step, Slower and Faster buttons for touch, and registers pause, step [n] and timescale [x] console built-ins. Cave Run and the starter template attach the overlay and console, the template adding a speed tunable and a reset command. Docs and tests cover the step key, console time scale, panel buttons and release stubs.
Bind F8 alongside Pause/Break for pause: NSGo names the Pause/Break key "pause" only in a browser, so the pause binding never fired on native macOS, Windows or Linux; bind "=" alongside "shift+=" for faster because a browser reports Shift+Equal as the "+" key with Shift held, which no binding can express. Add zero-cost release stubs for Overlay.Paused and Overlay.TogglePause so games compile against the same API in release builds. Update the docs, changelog fragment and note, and cover the new defaults and rebinding in tests.
houko
force-pushed
the
feat/issue-1498-debug-overlay-controls
branch
from
December 1, 2026 08:36
51bac56 to
05bcbcf
Compare
…oop state immediately Mark debug-loop-controls and its button row PointerEventsBoxNone and wrap the read-only state text and telemetry/graph/inspector children in PointerEventsNone so clicks and touches over non-button overlay content truly pass through to the game on macOS, Web, iOS and Windows. Also add a reactive loopSig bumped by Overlay pause/time-scale controls so the panel state readout and Pause/Resume label update immediately even on OnDemand loops where Draw does not run while paused, and reset keysBound when Attach moves to a new scope.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pkg/tooling/gamedebug's overlay wrapped agame.Loopbut gave nobody a way to reach the loop's pause, single-step or time-scale controls, and no example or template constructed the overlay or console, so the tools were undiscoverable and untested in a real project. This binds F8 (and Pause/Break in a browser), F10,-and=/Shift+=on the scope the overlay attaches to, adds Pause/Resume, Step, Slower and Faster buttons to the panel for touch and mouse, and registerspause [on|off|toggle],step [n]andtimescale [x]console built-ins when the console is given the loop. Cave Run and the starter template now attach the overlay and console, and the template shows aspeedtunable and aresetcommand. Release builds keep compiling all of it to no-ops, and a release-tag test presses the control keys to prove the loop is untouched there.Related issue
Fixes #1498
Verification
gofmt -l .produces no outputgo tool nsgo checkpasses on the repository root, Cave Run and the starter template, andgo tool nsgo check -target macos,windows,linux,webpasses on the root, throughubuildgo tool nsgo test ./pkg/tooling/gamedebugpasses in development and with-tags release,go tool nsgo test ./internal/gamecli -- -run 'TestTemplatesMatchTemplateModules|TestTemplateDebugConfigs'passes, and the Cave Run andtemplate/templatepackages pass throughubuildgo tool nsgo test ./...was not run in full (the editor suite alone takes about 40 minutes); the affected packages above ran insteadgo tool nsgo check -target ios,ios_simulatorwas not run; the remote build machine has no Xcodebun run buildwas not run;website/is untouched and only Markdown underdocs/changeddocs/en/anddocs/zh/updated (gamedebug.mdandloop.md)Screenshots
Cave Run at 1920x1080 with F3 pressed.
Before, F3 shows no overlay because nothing attaches one:
After, the overlay panel shows
Running · 1xwith the new Pause, Step, Slower and Faster controls, and the console sits below:After, paused, the readout changes to
Paused · 1xand the pause button to Resume: