docs/bevy/release-content/release-notes/bevy_feathers_select.md 978 B · 26 lines · raw · history

1 ---
2 title: FeathersSelect control
3 authors: ["@gagnus"]
4 pull_requests: [24847]
5 ---
6
7 ## Goals
8
9 - Adds a new dropdown select control to feathers, for selecting one of a number of options. It is similar to the existing `FeathersListView` (and indeed is implemented using one), it also uses a `FeathersMenuPopup` to show the selection
10 when opened.
11 - The dropdown scrolls if there are more than `@max_visible` options
12 - Adds a helper `caption(...)` function, similar to `label()` which emits `(Text(...) ThemedText)`
13 - Adds a `SetSelected` event to the underlying `ListBox` bevy_ui_widgets control, which sets its selected value, similar to how `SetChecked` and `SetSliderValue` work.
14
15 ### Usage
16
17 Inside a `bsn!` macro use FeathersSelect scene entity and give it a number of options which contain the `FeathersListRow` component
18
19 ```rust
20 (
21 @FeathersSelect {
22 @options: ... a Box<dyn SceneList> set of rows, see feathers_gallery for an example
23 @max_visible: 6,
24 }
25 ),
26 ```