From f64565f74e1a9ee9c510c5f2e49c49d860472445 Mon Sep 17 00:00:00 2001 From: GreDDySS <97845769+GreDDySS@users.noreply.github.com> Date: Tue, 11 Oct 2022 14:04:53 +0800 Subject: add new format --- core/src/com/ilotterytea/maxoning/MaxonConstants.java | 1 + 1 file changed, 1 insertion(+) (limited to 'core/src/com') 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(); -- cgit v1.2.3 From 72f0873b112a27ae01508af9ffc911261b3a564d Mon Sep 17 00:00:00 2001 From: GreDDySS <97845769+GreDDySS@users.noreply.github.com> Date: Tue, 11 Oct 2022 14:07:05 +0800 Subject: Применил новый формат для цены в магазине MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/com/ilotterytea/maxoning/screens/GameScreen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/com') diff --git a/core/src/com/ilotterytea/maxoning/screens/GameScreen.java b/core/src/com/ilotterytea/maxoning/screens/GameScreen.java index b3d5fdc..a3a551b 100644 --- a/core/src/com/ilotterytea/maxoning/screens/GameScreen.java +++ b/core/src/com/ilotterytea/maxoning/screens/GameScreen.java @@ -132,7 +132,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() { -- cgit v1.2.3 From 40b947902a1aff04404d5338227eefdca5c30325 Mon Sep 17 00:00:00 2001 From: GreDDySS <97845769+GreDDySS@users.noreply.github.com> Date: Tue, 11 Oct 2022 14:10:03 +0800 Subject: Подкорректировал чуток, чтоб работал новый формат MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/src/com') diff --git a/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java b/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java index c3778dc..367dfb9 100644 --- a/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java +++ b/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java @@ -10,14 +10,14 @@ public class PurchaseItem extends Stack { AnimatedImage icon, CharSequence name, CharSequence desc, - float price + String price ) { super(new Image(widgetSkin, "up")); Table summary = new Table(); summary.setHeight(super.getHeight()); - Label title = new Label(String.format("%s\n(%s)", name, price), skin, "purchaseitem_title"); + Label title = new Label(String.format("%s\n(%s)", name, string), skin, "purchaseitem_title"); summary.add(title).fillX().row(); -- cgit v1.2.3 From e2b205209ce7a747f2b41700204da67a6441f9e7 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 15 Oct 2022 18:46:07 +0200 Subject: Исправлено использование несуществующей переменной MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/com') diff --git a/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java b/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java index 367dfb9..b8c44f9 100644 --- a/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java +++ b/core/src/com/ilotterytea/maxoning/ui/PurchaseItem.java @@ -17,7 +17,7 @@ public class PurchaseItem extends Stack { Table summary = new Table(); summary.setHeight(super.getHeight()); - Label title = new Label(String.format("%s\n(%s)", name, string), skin, "purchaseitem_title"); + Label title = new Label(String.format("%s\n(%s)", name, price), skin, "purchaseitem_title"); summary.add(title).fillX().row(); -- cgit v1.2.3