qweqwe
parent
a1cc8e4e86
commit
903ebaec95
|
|
@ -69,21 +69,23 @@ impl RecipeTabViewer {
|
|||
egui::ComboBox::new("material_select_combobox", "")
|
||||
.selected_text(&self.process_element_status.element.material.name)
|
||||
.show_ui(ui, |ui| {
|
||||
if ui.button("<-").clicked() {
|
||||
if self.mat_page > 0 {
|
||||
self.mat_page -= 1;
|
||||
self.update_materials();
|
||||
ui.horizontal(|ui| {
|
||||
if ui.button("<-").clicked() {
|
||||
if self.mat_page > 0 {
|
||||
self.mat_page -= 1;
|
||||
self.update_materials();
|
||||
}
|
||||
}
|
||||
}
|
||||
ui.monospace(self.mat_page.to_string());
|
||||
if ui.button("->").clicked() {
|
||||
if self.materials.read().len().to_i32().unwrap()
|
||||
== misc::ELEMENTS_PER_PAGE
|
||||
{
|
||||
self.mat_page += 1;
|
||||
self.update_materials();
|
||||
ui.monospace(self.mat_page.to_string());
|
||||
if ui.button("->").clicked() {
|
||||
if self.materials.read().len().to_i32().unwrap()
|
||||
== misc::ELEMENTS_PER_PAGE
|
||||
{
|
||||
self.mat_page += 1;
|
||||
self.update_materials();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
for mat in self.materials.read().clone().iter() {
|
||||
ui.selectable_value(
|
||||
&mut self.process_element_status.element.material,
|
||||
|
|
|
|||
Loading…
Reference in New Issue