diff --git a/CHANGELOG.md b/CHANGELOG.md index 47d8833613..4da2610b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1124,6 +1124,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - Remove heaptrack as it is now deprecated +- Remove coin counter at the bottom of inventories. ## [0.4.0] - 2019-10-10 diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 522cc20e66..4ad354a3b2 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -495,15 +495,16 @@ impl<'a> InventoryScroller<'a> { let space_max = self.inventory.slots().count(); let bag_space = format!("{}/{}", space_used, space_max); let bag_space_percentage = space_used as f32 / space_max as f32; - let coin_itemdef = Arc::::load_expect_cloned("common.items.utility.coins"); - let coin_count = self.inventory.item_count(&coin_itemdef); - // TODO: Reuse this to generally count a stackable item the player selected - //let cheese_itemdef = + //let coin_itemdef = + // Arc::::load_expect_cloned("common.items.utility.coins"); let + // coin_count = self.inventory.item_count(&coin_itemdef); TODO: Reuse + // this to generally count a stackable item the player selected + // let cheese_itemdef = // Arc::::load_expect_cloned("common.items.food.cheese"); // let cheese_count = self.inventory.item_count(&cheese_itemdef); // Coin Icon and Coin Text - Image::new(self.imgs.coin_ico) + /*Image::new(self.imgs.coin_ico) .w_h(16.0, 17.0) .bottom_left_with_margins_on(self.bg_ids.bg_frame, 2.0, 43.0) .set(state.ids.coin_ico, ui); @@ -512,7 +513,7 @@ impl<'a> InventoryScroller<'a> { .font_id(self.fonts.cyri.conrod_id) .font_size(self.fonts.cyri.scale(14)) .color(Color::Rgba(0.871, 0.863, 0.05, 1.0)) - .set(state.ids.coin_txt, ui); + .set(state.ids.coin_txt, ui);*/ // TODO: Add a customizable counter for stackable items here // TODO: Cheese is funny until it's real /*Image::new(self.imgs.cheese_ico) diff --git a/voxygen/src/ui/widgets/slot.rs b/voxygen/src/ui/widgets/slot.rs index 3975bc1a62..9a9656220d 100644 --- a/voxygen/src/ui/widgets/slot.rs +++ b/voxygen/src/ui/widgets/slot.rs @@ -698,7 +698,12 @@ where // Draw amount if let Some(amount) = amount { - let amount = format!("{}", &amount); + let amount = match amount { + amount if amount > 1_000_000_000 => format!("{}G", amount / 1_000_000_000), + amount if amount > 1_000_000 => format!("{}M", amount / 1_000_000), + amount if amount > 1_000 => format!("{}K", amount / 1_000), + amount => format!("{}", amount), + }; // Text shadow Text::new(&amount) .font_id(amount_font)