mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 06:00:22 +02:00
steamFrame.dashboard.windowCurvature: the "Toggle Curvature" row of a
window's More Options menu becomes a control (click: curved -> flat,
flat -> stock; drag up/down with the laser: curvature relative to
SteamVR's stock curve, snapping to 0 and 1). The patch moves each frame's
curvature-origin node to stock distance / value in outgoing scene graphs;
per-window values live in the systemui page. Lookups by signature
("window-curvature" in signatures.json, incl. check-only anchors).
Shared method hooks (lib/hooks.js, passed by mkPatch as 4th argument):
one SendMessage wrapper for dashboard-windows (now VERSION 3) and
window-curvature instead of a chain of per-patch wrappers; legacy
wrappers on top are unwound.
13 lines
546 B
JavaScript
13 lines
546 B
JavaScript
// Reverts window-curvature/patch.js: removes the control from open menus,
|
|
// its style, reactions and SendMessage hook (the shared wrapper goes too once
|
|
// no other patch uses it) and resends the scene graph, so windows get the
|
|
// stock curve radius back. Curvature on/off is stock state and stays as it
|
|
// is. window.__sfuiWindowCurvatureState (per-window values) is kept for a
|
|
// re-injection. Safe when not patched.
|
|
(() => {
|
|
const s = window.__sfuiWindowCurvature;
|
|
if (!s) return 'not patched';
|
|
s.teardown();
|
|
return 'unpatched';
|
|
})()
|