bevy/crates/bevy_core_widgets/src
Talin 4ff595a4bc
New simplified "click to focus" logic for core widgets. (#19736)
Click to focus is now a global observer.

# Objective

Previously, the "click to focus" behavior was implemented in each
individual headless widget, producing redundant logic.

## Solution

The new scheme is to have a global observer which looks for pointer down
events and triggers an `AcquireFocus` event on the target. This event
bubbles until it finds an entity with `TabIndex`, and then focuses it.

## Testing

Tested the changes using the various examples that have focusable
widgets. (This will become easier to test when I add focus ring support
to the examples, but that's for another day. For now you just have to
know which keys to press.)

## Migration

This change is backwards-compatible. People who want the new behavior
will need to install the new plugin.
2025-06-21 18:05:26 +00:00
..
core_button.rs New simplified "click to focus" logic for core widgets. (#19736) 2025-06-21 18:05:26 +00:00
core_checkbox.rs Core Checkbox (#19665) 2025-06-20 16:37:18 +00:00
core_slider.rs New simplified "click to focus" logic for core widgets. (#19736) 2025-06-21 18:05:26 +00:00
lib.rs Core Checkbox (#19665) 2025-06-20 16:37:18 +00:00