summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2022-10-15 19:31:52 +0200
committerilotterytea <iltsu@alright.party>2022-10-15 19:31:52 +0200
commitc792b675e340ade7e4fd6bd4e67265ba2b4cb1b5 (patch)
treeb4d769555248415144a51112986387455c1a3a36
parent09ad70d85a80779764268d37df533e446ecd37e6 (diff)
parente2b205209ce7a747f2b41700204da67a6441f9e7 (diff)
Merge pull request #14 from maxoning/dev
Новый формат стиля цены
-rw-r--r--core/src/com/ilotterytea/maxoning/MaxonConstants.java1
-rw-r--r--core/src/com/ilotterytea/maxoning/screens/GameScreen.java2
-rw-r--r--core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java2
3 files changed, 3 insertions, 2 deletions
diff --git a/core/src/com/ilotterytea/maxoning/MaxonConstants.java b/core/src/com/ilotterytea/maxoning/MaxonConstants.java
index 04bc932..42f2892 100644
--- a/core/src/com/ilotterytea/maxoning/MaxonConstants.java
+++ b/core/src/com/ilotterytea/maxoning/MaxonConstants.java
@@ -21,6 +21,7 @@ public class MaxonConstants {
public static final FileHandle FILE_RU_RU = Gdx.files.internal("i18n/ru_ru.json");
public static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("###,###.##");
+ public static final DecimalFormat DECIMAL_FORMAT2 = new DecimalFormat("###,###");
@SuppressWarnings("SimpleDateFormat")
public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/M/yyyy hh:mm:ss");
public static final long startTime = System.currentTimeMillis();
diff --git a/core/src/com/ilotterytea/maxoning/screens/GameScreen.java b/core/src/com/ilotterytea/maxoning/screens/GameScreen.java
index 873ce4e..8e4538d 100644
--- a/core/src/com/ilotterytea/maxoning/screens/GameScreen.java
+++ b/core/src/com/ilotterytea/maxoning/screens/GameScreen.java
@@ -136,7 +136,7 @@ public class GameScreen implements Screen, InputProcessor {
// Adding the pet items in pet table:
for (final MaxonItem item : MaxonItemRegister.getItems()) {
PurchaseItem purchaseItem = new PurchaseItem(
- skin, widgetSkin, item.icon, item.name, item.desc, item.price
+ skin, widgetSkin, item.icon, item.name, item.desc, MaxonConstants.DECIMAL_FORMAT2.format(item.price)
);
purchaseItem.addListener(new ClickListener() {
diff --git a/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java b/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java
index c3778dc..b8c44f9 100644
--- a/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java
+++ b/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java
@@ -10,7 +10,7 @@ public class PurchaseItem extends Stack {
AnimatedImage icon,
CharSequence name,
CharSequence desc,
- float price
+ String price
) {
super(new Image(widgetSkin, "up"));