mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 05:00:24 +02:00
Add frame-controls: move window controls between bar and ⋯ menu by long press
steamFrame.dashboard.frameControls: a long press (longPressMs, default
1.5 s; a ring shows the progress from half of it) on a control under a
dashboard window or on a More Options (three-dot) menu row opens a popup
with "Show in bar", which moves that control between the window's bottom
bar and the menu, for all windows. Placement is keyed by the control's
action icon, kept in the page and its localStorage (survives SteamVR
restarts); inBar / inMenu set defaults. floatInTheater gives theater
windows the Float control back.
The popup is a scene-graph panel of its own, attached to the pressed
button's (or the menu's) anchor like SteamVR's tooltips and menu, so the
bar and menu panels don't change; the menu's focus auto-close is held back
while its popup is open. Coordinates with window-curvature through its
sfui-curv-* contract. Lookups by signature ("frame-controls" in
lib/signatures.json, check-only anchors for the rest).
This commit is contained in:
1 parent
9993cbd4ab
commit
990ee78fe7
7 files changed
+918
-2
No files matched your search
@@ -0,0 +1,14 @@
|
||||
// Reverts frame-controls/patch.js: ends a running long press, closes the
|
||||
// popup (and removes its scene-graph panel), gives every window its stock
|
||||
// control lists back and removes its wrappers (Frame.prototype
|
||||
// SetControlsItems / SetControlAdditionalOptionsOpen; a wrapper something
|
||||
// else wrapped since stays in the chain but is inert), listeners, style and
|
||||
// the Float actions it added to theater windows.
|
||||
// window.__sfuiFrameControlsState (placements, log) and its localStorage
|
||||
// mirror are kept for a re-injection. Safe when not patched.
|
||||
(() => {
|
||||
const s = window.__sfuiFrameControls;
|
||||
if (!s) return 'not patched';
|
||||
s.teardown();
|
||||
return 'unpatched';
|
||||
})()
|
||||
Reference in new issue
Block a user