From 041277917b94669573527e2dccac5f3990bb31a0 Mon Sep 17 00:00:00 2001 From: Pfauenauge90 <44173739+Pfauenauge90@users.noreply.github.com> Date: Thu, 19 Mar 2020 15:49:32 +0100 Subject: [PATCH] Update bag.rs --- voxygen/src/hud/bag.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 671c19b758..816d242e02 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -8,7 +8,7 @@ use crate::{ ui::{fonts::ConrodVoxygenFonts, ImageFrame, Tooltip, TooltipManager, Tooltipable}, }; use client::Client; -use common::comp::Stats; +use common::comp::{item, ItemKind, Stats}; use conrod_core::{ color, image, widget::{self, Button, Image, Rectangle, Text}, @@ -645,6 +645,17 @@ impl<'a> Widget for Bag<'a> { } // Item if let Some(kind) = item.as_ref().map(|i| ItemKey::from(i)) { + //Stack Size + /*if let Some(item) = item { + if let Some(amount) = match item.kind { + ItemKind::Tool { .. } | ItemKind::Armor { .. } => None, + ItemKind::Utility { amount, .. } + | ItemKind::Consumable { amount, .. } + | ItemKind::Ingredient { amount, .. } => Some(amount), + } { + println!("Amount: {}", amount); + } + }*/ Button::image(match &state.img_id_cache[i] { Some((cached_kind, id)) if cached_kind == &kind => *id, _ => {