diff --git a/assets/voxygen/element/icons/coin.png b/assets/voxygen/element/icons/coin.png new file mode 100644 index 0000000000..4e6dc4f795 Binary files /dev/null and b/assets/voxygen/element/icons/coin.png differ diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 2f0021174e..efe3be5a2b 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -30,7 +30,9 @@ widget_ids! { tooltip[], bg, bg_frame, - char_art, + char_ico, + coin_ico, + currency_txt, inventory_title, inventory_title_bg, scrollbar_bg, @@ -173,6 +175,7 @@ impl<'a> Widget for Bag<'a> { &self.localized_strings.get("hud.bag.exp") ); let level = (self.stats.level.level()).to_string(); + let currency = 100; // Tooltips let item_tooltip = Tooltip::new({ @@ -242,8 +245,18 @@ impl<'a> Widget for Bag<'a> { Image::new(self.imgs.char_art) .w_h(40.0, 37.0) .top_left_with_margins_on(state.ids.bg, 4.0, 2.0) - .set(state.ids.char_art, ui); - + .set(state.ids.char_ico, ui); + // Coin Icon and Currency Text + Image::new(self.imgs.coin_ico) + .w_h(16.0 * 2.0, 17.0 * 2.0) + .bottom_left_with_margins_on(state.ids.bg_frame, 2.0, 43.0) + .set(state.ids.coin_ico, ui); + Text::new(&format!("{}", currency)) + .right_from(state.ids.coin_ico, 4.0) + .font_id(self.fonts.cyri.conrod_id) + .font_size(self.fonts.cyri.scale(10)) + .color(Color::Rgba(0.87, 0.86, 0.55, 1.0)) + .set(state.ids.currency_txt, ui); // Alignment for Grid Rectangle::fill_with([362.0, 200.0], color::TRANSPARENT) .bottom_left_with_margins_on(state.ids.bg_frame, 29.0, 44.0) diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 33f2697a8c..cc4ca58dd4 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -229,6 +229,7 @@ image_ids! { close_btn_press: "voxygen.element.buttons.close_btn_press", // Inventory + coin_ico: "voxygen.element.icons.coin", inv_bg_armor: "voxygen.element.misc_bg.inv_bg_0", inv_bg_stats: "voxygen.element.misc_bg.inv_bg_1", inv_frame: "voxygen.element.misc_bg.inv_frame",