mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Update bag.rs
This commit is contained in:
@ -8,7 +8,7 @@ use crate::{
|
|||||||
ui::{fonts::ConrodVoxygenFonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
|
ui::{fonts::ConrodVoxygenFonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
|
||||||
};
|
};
|
||||||
use client::Client;
|
use client::Client;
|
||||||
use common::comp::Stats;
|
use common::comp::{item, ItemKind, Stats};
|
||||||
use conrod_core::{
|
use conrod_core::{
|
||||||
color, image,
|
color, image,
|
||||||
widget::{self, Button, Image, Rectangle, Text},
|
widget::{self, Button, Image, Rectangle, Text},
|
||||||
@ -645,6 +645,17 @@ impl<'a> Widget for Bag<'a> {
|
|||||||
}
|
}
|
||||||
// Item
|
// Item
|
||||||
if let Some(kind) = item.as_ref().map(|i| ItemKey::from(i)) {
|
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] {
|
Button::image(match &state.img_id_cache[i] {
|
||||||
Some((cached_kind, id)) if cached_kind == &kind => *id,
|
Some((cached_kind, id)) if cached_kind == &kind => *id,
|
||||||
_ => {
|
_ => {
|
||||||
|
Reference in New Issue
Block a user