Skip to main content

Module cursor

Module cursor 

Source
Expand description

Mouse-cursor shape selection (spec: I-beam over text inputs, pointer over clickables, grab/grabbing on scrollbar + slider thumbs).

update_cursor_request derives the wanted CursorShape from the current Hovered entity (plus the scrollbar / drag capture FSMs, which can own the pointer while nothing is hovered) and writes it into the CursorRequest resource - only on change, so the window backend’s per-frame poll is a cheap equality check. lumen-window-winit maps the shape onto winit’s CursorIcon and applies it to the OS window; headless runners never read the resource.

Structs§

CursorPlugin
Plugin: installs CursorRequest and registers update_cursor_request after hit_test so it reads this tick’s hover.

Functions§

update_cursor_request
Pick the cursor shape for this tick and write it into CursorRequest (change-gated):