bevy/crates/bevy_input_focus/src
Alice Cecile df7aa445e9
Remove SetInputFocus helper trait (#16888)
# Objective

The `SetInputFocus` trait is not very useful: we're just setting a
resource's value.

This is a very common and simple pattern, so we should expose it
directly to users rather than creating confusing indirection.

## Solution

Remove the `SetInputFocus` trait and migrate existing uses to just
modify the `InputFocus` resource. The helper methods on that type make
this nicer than before :)

P.S. This is non-breaking as bevy_input_focus has not yet shipped.

## Testing

Code compiles! CI will check the existing unit tests.
2024-12-19 00:40:10 +00:00
..
autofocus.rs Remove SetInputFocus helper trait (#16888) 2024-12-19 00:40:10 +00:00
lib.rs Remove SetInputFocus helper trait (#16888) 2024-12-19 00:40:10 +00:00
tab_navigation.rs Polish and improve docs for bevy_input_focus (#16887) 2024-12-18 20:29:26 +00:00