pub fn update_cursor_request(
req: ResMut<'_, CursorRequest>,
hovered: Query<'_, '_, Entity, With<Hovered>>,
scrollbar_ix: Option<Res<'_, ScrollbarInteraction>>,
drags: Query<'_, '_, (Entity, &DragState)>,
sliders: Query<'_, '_, (), With<SliderValue>>,
thumbs: Query<'_, '_, (), With<SliderThumb>>,
inputs: Query<'_, '_, (), With<TextInput>>,
interactions: Query<'_, '_, (), With<Interaction>>,
toggles: Query<'_, '_, (), With<Toggleable>>,
tab_indices: Query<'_, '_, &TabIndex>,
parents: Query<'_, '_, &ChildOf>,
)Expand description
Pick the cursor shape for this tick and write it into
CursorRequest (change-gated):
- Grabbing while a handle drag is in flight - a scrollbar thumb
drag (
ScrollbarInteraction::drag) or an activeDragStateon a slider or its thumb child. - Grab with the pointer resting on a scrollbar thumb
(
ScrollbarInteraction::hover, thumb part) or a slider thumb. - Text (I-beam) over
TextInputentities. - Pointer over clickable widgets: the hovered entity or an
ancestor carries
Interaction(hover/press feedback - the button class),Toggleable,SliderValue, or a non-negativeTabIndex. - Default otherwise. Disabled widgets are never
Hovered(hit_testskips them), so they fall here automatically.