on_move Event for Pixel-Level Mouse Tracking #141
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expose per-pixel mouse movement to Python via
on_movecallback.Context
Some UI patterns need continuous mouse position updates:
This is opt-in and has performance implications that should be documented.
Definition of Done
drawable.on_movecallback property(x, y)screen coordinates when mouse moves within boundsCallback Signature
Technical Notes
Performance Contract
C++ guarantees:
on_moveis None, no Python calls, no overheadon_moveis set, called at most once per frame per drawableDeveloper responsibility:
on_movehandlers faston_moveon many overlapping elementsInteraction with Enter/Exit
on_enterfires first when mouse enterson_movefires for subsequent movement within boundson_exitfires when mouse leavesGrid Internal Use
Grid cell enter/exit events need to know when mouse moves within the grid to detect cell transitions. This could be:
Recommend option 1 for performance - Grid tracks mouse internally and only calls Python on cell transitions.
Documentation
Should include warnings:
Dependencies
Related Issues