diff --git a/code/src/recipe_tab.rs b/code/src/recipe_tab.rs index b10994a..e165017 100644 --- a/code/src/recipe_tab.rs +++ b/code/src/recipe_tab.rs @@ -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,