Skip to content

feat(locker): create cursor packs from your own images - #423

Open
Slush97 wants to merge 1 commit into
mainfrom
feat/cursor-create
Open

Slush97 wants to merge 1 commit into
mainfrom
feat/cursor-create

Conversation

@Slush97

@Slush97 Slush97 commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Adds a Create button to the Locker's Cursor tab that builds a cursor pack from your own images.

Dialog. One tile per stock cursor (Pointer 48x58, Ping 48x58, Shop 60x60, Commend 88x88). Picking an image opens CardCropper in a new cursor mode: the image starts whole and flush top-left, it can zoom out past cover (whatever it doesn't cover stays transparent), and a crosshair marks the click point. Slots left empty keep the game's own cursor. "Create and apply" installs and applies the pack. "Export" writes the same files to a zip that imports back as the same pack.

Hotspot detection (src/lib/cursorHotspot.ts). Guesses the click point from the alpha mask: the sharpest convex-hull corner, biased toward top-left like the stock pointers. Reticles (quarter-turn symmetric) and blunt art aim at the middle. Fully opaque art gets the stock 0, 0. A click in the cropper moves it.

Writing the pack. The renderer encodes 32-bit BI_RGB BMPs with alpha in the fourth byte, the same layout as the stock files (src/lib/cursorBmp.ts). Main validates names and signatures as with imports, then writes a cursor.res that starts from the stock copy and overrides only the cursors you replaced, so the commend cursor keeps its 22, 2 hotspot. Entries are keyed by file stem (cursor, cursor_ping), matching the community packs on GameBanana. installGroups is split so archive imports and created packs share installSets.

New IPC: cursors:create, cursors:export.

Checks: tsc -b, eslint, ui:check, vitest (180 files, 2662 tests), i18n check + manifest, electron-vite build with 0 unresolved imports. Not yet checked in-game.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant