Closed MrGibus closed 4 years ago
It is probably outdated. The widget id lists are conrod_core::widget::id::List
, which derefs to a slice, so you would probably need:
for id in ids.toggles.iter() {
// ...
}
Thank you.
using .iter()
and .set(*id, ui)
, works as i'd expect.
Trying to create ids for a variable number of items for the circles 7guis benchmark here I've come across this example and this issue. Both indicate using list ids. But its throwing and error telling me that it's not an iterator.
ids.toggles.resize(5, &mut ui.widget_id_generator()); for id in ids.toggles { widget::Toggle::new(true).set(id, ui); }
I've also tried
ids.toggles.resize(5, &mut ui.widget_id_generator()); for id in ids.toggles.walk() { widget::Toggle::new(true).set(id, ui); }
Is this not meant to be an iterator?