master
Алексей Алексей 2026-06-26 10:44:57 +10:00
parent a1cc8e4e86
commit 903ebaec95
1 changed files with 15 additions and 13 deletions

View File

@ -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,