summaryrefslogtreecommitdiff
path: root/core/src/kz/ilotterytea/maxon/pets
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/kz/ilotterytea/maxon/pets')
-rw-r--r--core/src/kz/ilotterytea/maxon/pets/PetWidget.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/src/kz/ilotterytea/maxon/pets/PetWidget.java b/core/src/kz/ilotterytea/maxon/pets/PetWidget.java
index 70a0e94..c8b56fb 100644
--- a/core/src/kz/ilotterytea/maxon/pets/PetWidget.java
+++ b/core/src/kz/ilotterytea/maxon/pets/PetWidget.java
@@ -17,7 +17,7 @@ import kz.ilotterytea.maxon.utils.formatters.NumberFormatter;
public class PetWidget extends Table {
private double price;
private final Skin skin;
- private final Label priceLabel, nameLabel;
+ private final Label priceLabel, nameLabel, amountLabel;
private TextTooltip priceTooltip;
private final Pet pet;
@@ -98,6 +98,9 @@ public class PetWidget extends Table {
}
}
});
+
+ this.amountLabel = new Label("", skin, "store_item_amount");
+ super.add(amountLabel);
}
public void setPrice(double price) {
@@ -169,6 +172,11 @@ public class PetWidget extends Table {
this.nameLabel.addListener(tooltip);
}
+ public void setAmount(Integer amount) {
+ this.amountLabel.setVisible(amount > 0);
+ this.amountLabel.setText(amount);
+ }
+
public boolean isLocked() {
return isLocked;
}