From 626978213f7bce32051080de2405e30bfe2865b7 Mon Sep 17 00:00:00 2001 From: Pfauenauge90 <44173739+Pfauenauge90@users.noreply.github.com> Date: Sat, 29 Jun 2019 02:37:33 +0200 Subject: [PATCH] fixed scaling of the slots --- voxygen/src/hud/bag.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 459b9a3959..8b8cde8d89 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -91,11 +91,7 @@ impl<'a> Widget for Bag<'a> { .thickness(5.0) .rgba(0.33, 0.33, 0.33, 1.0) .set(state.ids.inv_scrollbar, ui); - - // Create available inventory slot widgets - - - + // Create available inventory slot widgets dbg!(self.inventory_space); if state.ids.inv_slot.len() < self.inventory_space { state.update(|s| { s.ids.inv_slot.resize(self.inventory_space, &mut ui.widget_id_generator());});} @@ -103,14 +99,10 @@ impl<'a> Widget for Bag<'a> { let x = i % 5; let y = i / 5; Button::image(self.imgs.inv_slot) - .top_left_with_margins_on(state.ids.inv_alignment, 4.0 + y as f64 * (40.0 + 4.0), 4.0 + x as f64 * (40.0 + 4.0)) + .top_left_with_margins_on(state.ids.inv_grid_1, 4.0 + y as f64 * (40.0 + 4.0), 4.0 + x as f64 * (40.0 + 4.0)) .w_h(40.0, 40.0) .set(state.ids.inv_slot[i], ui); - } - - - - + } // X-button if Button::image(self.imgs.close_button) .w_h(28.0, 28.0)