Improve Menu API to facilitate external control

This commit is contained in:
Héctor Ramón Jiménez 2020-07-23 03:58:59 +02:00
parent bf5eaca2f2
commit aaf5986123
4 changed files with 71 additions and 83 deletions

View file

@ -788,7 +788,7 @@ struct Controls {
next_button: button::State,
clear_button: button::State,
speed_slider: slider::State,
preset_list: pick_list::State,
preset_list: pick_list::State<Preset>,
}
impl Controls {

View file

@ -10,7 +10,7 @@ pub fn main() {
#[derive(Default)]
struct Example {
scroll: scrollable::State,
pick_list: pick_list::State,
pick_list: pick_list::State<Language>,
selected_language: Language,
}