a bit more ui wrangling

main
aprzn 2 years ago
parent 45e741359f
commit f6e1e423e9

@ -194,25 +194,23 @@ impl PipeDash {
egui::SidePanel::left("level_picker")
.default_width(100f32)
.show(ctx, |ui| {
ui.with_layout(egui::Layout::top_down(egui::Align::LEFT).with_main_justify(false), |ui| {
ui.with_layout(egui::Layout::top_down(egui::Align::LEFT).with_main_justify(true), |ui| {
egui::ScrollArea::vertical().show(ui, |ui| {
ui.with_layout(egui::Layout::top_down_justified(egui::Align::Min), |ui| {
for (idx, level) in self.level_list.iter().enumerate() {
if ui
.selectable_label(
self.selected_level == Some(idx),
level.display_name(),
)
.clicked()
{
self.msg_queue.push_back(Message::LevelSelected(idx));
}
ui.with_layout(egui::Layout::top_down(egui::Align::LEFT), |ui| {
ui.button("Load Level");
egui::ScrollArea::vertical().show(ui, |ui| {
ui.with_layout(egui::Layout::top_down_justified(egui::Align::Min), |ui| {
for (idx, level) in self.level_list.iter().enumerate() {
if ui
.selectable_label(
self.selected_level == Some(idx),
level.display_name(),
)
.clicked()
{
self.msg_queue.push_back(Message::LevelSelected(idx));
}
})
});
}
})
});
ui.button("Load Level");
});
});
}

Loading…
Cancel
Save