Improve stats on items
This commit is contained in:
parent
c39e18f631
commit
cdd0959c4c
1 changed files with 8 additions and 3 deletions
|
@ -261,16 +261,21 @@ impl Item {
|
||||||
agility_field.set_text(&format!("{}", self.attributes.agility().raw()))?;
|
agility_field.set_text(&format!("{}", self.attributes.agility().raw()))?;
|
||||||
intelligence_field.set_text(&format!("{}", self.attributes.intelligence().raw()))?;
|
intelligence_field.set_text(&format!("{}", self.attributes.intelligence().raw()))?;
|
||||||
|
|
||||||
|
let too_low_stat_background = FillTypeInfo::Element(
|
||||||
|
ElementDescriptor::new(Color::try_from("#AB7474")?, Color::try_from("#824040")?, 2),
|
||||||
|
DisplayableFillType::Expand,
|
||||||
|
);
|
||||||
|
|
||||||
if attributes.strength().raw() < self.attributes.strength().raw() {
|
if attributes.strength().raw() < self.attributes.strength().raw() {
|
||||||
strength_field.set_background(Color::try_from("#AB7474")?)?;
|
strength_field.set_background(too_low_stat_background.clone())?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if attributes.agility().raw() < self.attributes.agility().raw() {
|
if attributes.agility().raw() < self.attributes.agility().raw() {
|
||||||
agility_field.set_background(Color::try_from("#AB7474")?)?;
|
agility_field.set_background(too_low_stat_background.clone())?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if attributes.intelligence().raw() < self.attributes.intelligence().raw() {
|
if attributes.intelligence().raw() < self.attributes.intelligence().raw() {
|
||||||
intelligence_field.set_background(Color::try_from("#AB7474")?)?;
|
intelligence_field.set_background(too_low_stat_background)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut index = Self::INSPECTOR_OFFSET;
|
let mut index = Self::INSPECTOR_OFFSET;
|
||||||
|
|
Loading…
Reference in a new issue