panel: drag to move or resize, bending like KDE's wobbly windows, also adds oneko cat #172

Closed
github-bot wants to merge 2 commits from github-bot/gh-172 into main AGit
Owner

@⁠nullish-cat on GitHub · 2026-12-02 08:28 UTC · original
nullish-cat:main → main · +1937 −149 · 11 files · 2 commits · closed without merging

the following PR allows for users to drag and resize using the mouse by pressing F4. dragging effect inspired by KDE.

https://github.com/user-attachments/assets/eed857e8-dded-44c9-aeee-4743842a4587

auto generated text, by deepseek v4.1 flash fast freebuff:

The performance panel can now be placed and sized with the mouse, and it bends like jelly while you drag it — KDE's wobbly windows effect.

What it does

  • F4 tap — edit mode. The panel is framed and its four corners bracketed in cyan, and the mouse becomes the panel's: cursor shown and free, no clip or recentre, title mouse look and buttons not fed. F4 again ends it and the title gets the mouse back on the next move.
  • Drag the body to move the panel anywhere in the window, kept inside it; drag a corner to resize, both axes together so the text keeps its shape, with the corner opposite the one dragged standing still. The cursor over the panel names what a drag will do.
  • F4 + arrows / +-- / 0 move, resize and reset from the keyboard (arrows repeat while held); F3 + arrows still snaps to a corner.
  • Wobble. While dragged, the panel is drawn as KWin's cloth (4 x 4 grid, 10 ms steps, bicubic Bézier over a 16 x 10 mesh, whole-window viewport so the bend isn't clipped) and is a little see-through; let go, it glides flat instead of springing past. VICTORY_PANEL_WOBBLE=0 (off, false, no) turns the bend off and leaves the fade.

Why

The panel used to be corner-only and keyboard-only. Dragging it is the way people expect to move an overlay, and the wobble is what KDE users know the gesture looks like — KWin's own cloth is ported rather than approximated, with the pull and damping softened (0.09/0.65 against KWin's 0.16/0.50) and the release eased, because the stock settings read as too fast and too springy on a 216 px tall panel.

Testing

  • cargo check -p victory-gpu --tests, clippy clean for the touched files.
  • Two new unit tests, run against the Windows build under Wine:
  • wobble_bends_and_settles — the cloth bends under a drag and the centre never crosses to the far side of flat while settling (fails on a full-strength spring by ~15 px).
  • wobble_pins_a_still_edge — a resize against a window edge leaves that edge where it is.
  • The HLSL compiles clean (vs_5_1/ps_5_1 via D3DCompile).
  • Not tested on a real GPU/display: motion, fade and edge feel need ./build.sh && ./run.sh play, F4, then a drag and holding the panel against each of the four window edges.

Notes

  • A drag past the window edge used to feed the cloth the unclamped overflow and fling it back; the drag target is now clamped before the cloth sees it, and a pinned panel still eases its cloth.
  • README.md and run.conf.default document the F4 gestures and VICTORY_PANEL_WOBBLE.
**@⁠nullish-cat** on GitHub · 2026-12-02 08:28 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/172) `nullish-cat:main` → `main` · +1937 −149 · 11 files · 2 commits · closed without merging the following PR allows for users to drag and resize using the mouse by pressing `F4`. dragging effect inspired by KDE. https://github.com/user-attachments/assets/eed857e8-dded-44c9-aeee-4743842a4587 auto generated text, by deepseek v4.1 flash fast freebuff: The performance panel can now be placed and sized with the mouse, and it bends like jelly while you drag it — KDE's wobbly windows effect. ## What it does - `F4` **tap — edit mode.** The panel is framed and its four corners bracketed in cyan, and the mouse becomes the panel's: cursor shown and free, no clip or recentre, title mouse look and buttons not fed. `F4` again ends it and the title gets the mouse back on the next move. - **Drag the body** to move the panel anywhere in the window, kept inside it; **drag a corner** to resize, both axes together so the text keeps its shape, with the corner opposite the one dragged standing still. The cursor over the panel names what a drag will do. - `F4` **+ arrows** / `+`-`-` / `0` move, resize and reset from the keyboard (arrows repeat while held); `F3` + arrows still snaps to a corner. - **Wobble**. While dragged, the panel is drawn as KWin's cloth (4 x 4 grid, 10 ms steps, bicubic Bézier over a 16 x 10 mesh, whole-window viewport so the bend isn't clipped) and is a little see-through; let go, it glides flat instead of springing past. `VICTORY_PANEL_WOBBLE=0` (`off`, `false`, `no`) turns the bend off and leaves the fade. ## Why The panel used to be corner-only and keyboard-only. Dragging it is the way people expect to move an overlay, and the wobble is what KDE users know the gesture looks like — KWin's own cloth is ported rather than approximated, with the pull and damping softened (`0.09`/`0.65` against KWin's `0.16`/`0.50`) and the release eased, because the stock settings read as too fast and too springy on a 216 px tall panel. ## Testing - `cargo check -p victory-gpu --tests`, clippy clean for the touched files. - Two new unit tests, run against the Windows build under Wine: - `wobble_bends_and_settles` — the cloth bends under a drag and the centre never crosses to the far side of flat while settling (fails on a full-strength spring by ~15 px). - `wobble_pins_a_still_edge` — a resize against a window edge leaves that edge where it is. - The HLSL compiles clean (`vs_5_1`/`ps_5_1` via `D3DCompile`). - Not tested on a real GPU/display: motion, fade and edge feel need `./build.sh && ./run.sh play`, `F4`, then a drag and holding the panel against each of the four window edges. ## Notes - A drag past the window edge used to feed the cloth the unclamped overflow and fling it back; the drag target is now clamped before the cloth sees it, and a pinned panel still eases its cloth. - `README.md` and `run.conf.default` document the `F4` gestures and `VICTORY_PANEL_WOBBLE`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 08:33:57 +00:00
github-bot changed title from panel: drag to move or resize, bending like KDE's wobbly windows to panel: drag to move or resize, bending like KDE's wobbly windows, also adds oneko cat 2026-12-03 02:57:38 +00:00
Author
Owner

@⁠nullish-cat on GitHub · 2026-12-03 02:54 UTC · original

added oneko :3

https://github.com/user-attachments/assets/37147419-2471-4bb9-a4fd-7205d3b0ccf6

**@⁠nullish-cat** on GitHub · 2026-12-03 02:54 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/172#issuecomment-7365995402) added oneko :3 https://github.com/user-attachments/assets/37147419-2471-4bb9-a4fd-7205d3b0ccf6
Author
Owner

@⁠Luxuride on GitHub · 2026-12-04 12:01 UTC · original

As it stands this cannot be merged, and the reason is mechanical: crates/victory-gpu/src/host/neko.rs:20 is include_bytes!("../../assets/oneko/sprites.bin"), but assets/oneko/ in the PR holds only LICENSE and README.md. .gitignore:45 is *.bin (only bcpack-tables.bin is excepted at :47), so git add silently dropped the sprite. Anyone who checks the branch out gets couldn't read …/assets/oneko/sprites.bin.

Beyond that: wobble is on by default (run.conf.default:24 VICTORY_PANEL_WOBBLE=1), which gives every user cloth physics and transparency nobody asked for, and the scale (+1479 lines in host/panel.rs, 466 in neko.rs) will conflict with every other panel PR in the backlog.

The part worth keeping is small and clean: crates/victory-core/src/panel_edit.rs (31 lines of atomics) plus the four-line cursor_locked() change in gameinput.rs:129. One PR that is only F4 drag/resize, no wobble, no cat, default off, would be a quick yes.

**@⁠Luxuride** on GitHub · 2026-12-04 12:01 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/172#issuecomment-7410869159) As it stands this cannot be merged, and the reason is mechanical: `crates/victory-gpu/src/host/neko.rs:20` is `include_bytes!("../../assets/oneko/sprites.bin")`, but `assets/oneko/` in the PR holds only `LICENSE` and `README.md`. `.gitignore:45` is `*.bin` (only `bcpack-tables.bin` is excepted at `:47`), so `git add` silently dropped the sprite. Anyone who checks the branch out gets `couldn't read …/assets/oneko/sprites.bin`. Beyond that: wobble is on by default (`run.conf.default:24 VICTORY_PANEL_WOBBLE=1`), which gives every user cloth physics and transparency nobody asked for, and the scale (+1479 lines in `host/panel.rs`, 466 in `neko.rs`) will conflict with every other panel PR in the backlog. The part worth keeping is small and clean: `crates/victory-core/src/panel_edit.rs` (31 lines of atomics) plus the four-line `cursor_locked()` change in `gameinput.rs:129`. One PR that is only F4 drag/resize, no wobble, no cat, default off, would be a quick yes.
github-bot closed this pull request 2026-12-05 17:31:56 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.