From 147c726a5ce0adedc8713ff32607b66b8abaf289 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 5 Sep 2022 00:34:36 +0600 Subject: я в рот ебал создателей этого фреймворка MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/com/ilotterytea/maxoning/MaxonConstants.java | 5 +++++ core/src/com/ilotterytea/maxoning/ui/OptionsTable.java | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'core/src/com/ilotterytea') diff --git a/core/src/com/ilotterytea/maxoning/MaxonConstants.java b/core/src/com/ilotterytea/maxoning/MaxonConstants.java index fc637df..ee0a375 100644 --- a/core/src/com/ilotterytea/maxoning/MaxonConstants.java +++ b/core/src/com/ilotterytea/maxoning/MaxonConstants.java @@ -1,5 +1,7 @@ package com.ilotterytea.maxoning; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.files.FileHandle; import com.ilotterytea.maxoning.utils.OsUtils; public class MaxonConstants { @@ -11,4 +13,7 @@ public class MaxonConstants { public static final String GAME_MAIN_FOLDER = OsUtils.getUserDataDirectory(".Maxoning"); public static final String GAME_SCREENSHOT_FOLDER = GAME_MAIN_FOLDER + "/screenshots"; public static final String GAME_SAVEGAME_FOLDER = GAME_MAIN_FOLDER + "/savegames"; + + public static final FileHandle FILE_EN_US = Gdx.files.internal("i18n/en_us.json"); + public static final FileHandle FILE_RU_RU = Gdx.files.internal("i18n/ru_ru.json"); } diff --git a/core/src/com/ilotterytea/maxoning/ui/OptionsTable.java b/core/src/com/ilotterytea/maxoning/ui/OptionsTable.java index 5a3b73b..983da5e 100644 --- a/core/src/com/ilotterytea/maxoning/ui/OptionsTable.java +++ b/core/src/com/ilotterytea/maxoning/ui/OptionsTable.java @@ -13,12 +13,12 @@ import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.Align; +import com.ilotterytea.maxoning.MaxonConstants; import com.ilotterytea.maxoning.MaxonGame; import com.ilotterytea.maxoning.screens.SplashScreen; import com.ilotterytea.maxoning.utils.I18N; import java.util.ArrayList; -import java.util.Arrays; import java.util.Locale; public class OptionsTable extends Table { @@ -129,8 +129,9 @@ public class OptionsTable extends Table { @Override public void clicked(InputEvent event, float x, float y) { int index = 0; - FileHandle folder = Gdx.files.internal("i18n"); - ArrayList fhArray = new ArrayList<>(Arrays.asList(folder.list())); + ArrayList fhArray = new ArrayList<>(); + fhArray.add(MaxonConstants.FILE_RU_RU); + fhArray.add(MaxonConstants.FILE_EN_US); if (fhArray.indexOf(game.locale.getFileHandle()) + 1 < fhArray.size()) { index = fhArray.indexOf(game.locale.getFileHandle()) + 1; -- cgit v1.2.3