Commit Graph

7 Commits

Author SHA1 Message Date
hypercross cc796d1e11 feat(framework): support multi-button drag and drop
Adds support for tracking the specific mouse button used during
drag-and-drop operations. This includes a new `ALTBUTTON` event type
to handle cases where a different button is pressed while a drag is
already in progress, and disables the browser context menu by default
in the Phaser configuration to prevent interference.
2026-04-20 20:33:56 +08:00
hypercross 7039938a72 refactor: delegate signal effects to DisposableBag
Introduce `addEffect` to `DisposableBag` to encapsulate Preact
signal effect creation and disposal. Update `ReactiveScene` to use
this method, simplifying effect management and ensuring proper
cleanup.
2026-04-20 18:18:26 +08:00
hypercross 4d34f9fa78 refactor(framework): use callback instead of events in
dragDropEventEffect

Replace Phaser event emissions with a `DragDropCallback` in
`dragDropEventEffect` to provide a more explicit and type-safe API
for handling drag-and-drop interactions.
2026-04-19 13:04:53 +08:00
hypercross 648e801dad Style: enforce 2-space indent and double quotes 2026-04-19 10:48:32 +08:00
hypercross d993d55576 Refactor dnd utility and add drag lifecycle events
Attach pointerup and pointermove listeners to scene.input
for reliable tracking. Emit dragstart, dragmove, and
dragend events alongside drag. Rename relativeX/Y to
deltaX/Y in DragDropEvent and integrate DisposableBag.
2026-04-18 23:33:13 +08:00
hypercross 23575dd516 feat: dnd 2026-04-17 21:55:14 +08:00
hypercross 2984d8b20d refactor: clean up 2026-04-04 13:21:44 +08:00