Pin to screen
Any option can float outside the panel as a compact widget - watch a value or flip a cheat mid-run without opening anything.
Pinning from the panel
Every option row in the panel carries a pin control. Tap it and the option gets a compact twin in a floating dock on the game screen; the dock stays put when the panel closes. Unpin from the dock itself (each widget has an unpin button) or from the option's row in the panel.
A pinned widget is the same control, not a read-only copy: a toggle still flips, and a number keeps its step arrows and still types and drags, which is what makes the dock usable mid-run without opening the panel at all.
Pinning from code
The handle controls pinning programmatically - for instance, putting a soak test's vitals on screen without anyone touching the device:
using DebugMD;
var handle = DMD.Options.Add(
Option.Info("Enemies Alive", () => _spawner.AliveCount.ToString()));
handle.Pin(); // on screen now, panel closed or not
// ... later ...
handle.Unpin(); // IsPinned tells you the current state
The dock
Pinned widgets stack in a single dock rather than scattering across the screen, so they never bury the game under lost floating windows. The dock:
- Drags by its header and magnet-snaps to screen edges when released within the snap distance (the Pinned Snap Tolerance setting, 24 px by default).
- Scales from 0.25× to 2× via the buttons on its control strip - readable from across a desk, or tucked into a corner.
- Minimizes into a small see-through bar - just the move handle and the restore button - that still drags anywhere, and restores with one tap.
- Resizes by its width grip, the small handle at the bottom of its control strip: drag it sideways (a tap just shows a reminder). Pulled on past the narrowest width, it moves the dock instead. In the multi-column spread the columns are re-dealt to fill the new width, and switching between one column and the spread keeps the width. Widths are measured before zoom, so zooming keeps the columns and only changes their size.
- Switches layout between a single column and a condensed multi-column spread that uses as many columns as the screen width allows - handy in landscape with many pins. In the spread every label sits above its control, so the narrow columns give the control their full width.
- Respects the safe area, staying clear of notches and punch-hole cameras.
- Scrolls when the pinned widgets outgrow the screen.
- Lets the game show through if you want: the Pinned Opacity setting (also a per-device override) thins the widgets' background while their text and controls stay solid.
Inside the dock, options always render one per line - the row layout from the panel does not apply to pinned widgets.
Pins persist on the device
The dock remembers everything between runs on the same device: which options are pinned, plus its position, scale, width, layout and minimized state. Pins are remembered by the option's tab, category and name, which has two practical consequences:
- An option that is currently absent - a scene-scoped cheat, say - keeps its saved pin and re-pins itself automatically the next time it registers. Pin a level's spawn toggle once and it is back on screen whenever that level loads.
- Renaming an option (or moving it to another tab or category) changes its identity, so it loses its pin.
Explicitly unpinning - from the dock, the panel or
Unpin() - forgets the pin.
What stays, what goes
| Event | Effect on pinned widgets |
|---|---|
| Panel closes | Dock stays on screen - that is the point. |
DMD.DestroyPanel() | Dock stays; only the panel's own UI is torn down. |
| Option removed (handle, owner destroyed, scope disposed) | Its widget leaves the dock. The pin is still remembered and returns if the same option registers again. |
| App restarts | Dock and pins restore from the device's saved state. |
The profiler is pinnable too
The profiler can be pinned like any option, giving you a mini frame-time readout in the dock while you play. It rides the same dock, dragging and persistence as everything else.