Fixed language not switching to english
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="io.anuke.mindustry"
|
package="io.anuke.mindustry"
|
||||||
android:versionCode="67"
|
android:versionCode="68"
|
||||||
android:versionName="3.3b16" >
|
android:versionName="3.3b17" >
|
||||||
|
|
||||||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||||
<uses-permission android:name="com.android.vending.BILLING" />
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import io.anuke.ucore.entities.Entities;
|
|||||||
import io.anuke.ucore.entities.EntityGroup;
|
import io.anuke.ucore.entities.EntityGroup;
|
||||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class Vars{
|
public class Vars{
|
||||||
public static final boolean testAndroid = false;
|
public static final boolean testAndroid = false;
|
||||||
//shorthand for whether or not this is running on android
|
//shorthand for whether or not this is running on android
|
||||||
@@ -83,6 +85,9 @@ public class Vars{
|
|||||||
|
|
||||||
public static final int tilesize = 8;
|
public static final int tilesize = 8;
|
||||||
|
|
||||||
|
public static final Locale[] locales = {new Locale("en"), new Locale("fr", "FR"), new Locale("ru"), new Locale("pl", "PL"),
|
||||||
|
new Locale("es", "LA"), new Locale("pt", "BR"), new Locale("ko"), new Locale("in", "ID")};
|
||||||
|
|
||||||
public static final Color[] playerColors = {
|
public static final Color[] playerColors = {
|
||||||
Color.valueOf("82759a"),
|
Color.valueOf("82759a"),
|
||||||
Color.valueOf("c0c1c5"),
|
Color.valueOf("c0c1c5"),
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public class BundleLoader {
|
|||||||
FileHandle handle = Gdx.files.internal("bundles/bundle");
|
FileHandle handle = Gdx.files.internal("bundles/bundle");
|
||||||
|
|
||||||
Locale locale = getLocale();
|
Locale locale = getLocale();
|
||||||
|
Locale.setDefault(locale);
|
||||||
if(!headless) Log.info("Got locale: {0}", locale);
|
if(!headless) Log.info("Got locale: {0}", locale);
|
||||||
Core.bundle = I18NBundle.createBundle(handle, locale);
|
Core.bundle = I18NBundle.createBundle(handle, locale);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,10 @@ import io.anuke.ucore.util.Log;
|
|||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import static io.anuke.mindustry.Vars.locales;
|
||||||
import static io.anuke.mindustry.Vars.ui;
|
import static io.anuke.mindustry.Vars.ui;
|
||||||
|
|
||||||
public class LanguageDialog extends FloatingDialog{
|
public class LanguageDialog extends FloatingDialog{
|
||||||
private Locale[] locales = {new Locale("en"), new Locale("fr", "FR"), new Locale("ru"), new Locale("pl", "PL"),
|
|
||||||
new Locale("es", "LA"), new Locale("pt", "BR"), new Locale("ko"), new Locale("in", "ID")};
|
|
||||||
|
|
||||||
public LanguageDialog(){
|
public LanguageDialog(){
|
||||||
super("$text.settings.language");
|
super("$text.settings.language");
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ public class Smelter extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(){
|
public void init(){
|
||||||
for(int i = 0; i < inputs.length; i ++){
|
for(Item item : inputs){
|
||||||
final Item item = inputs[i];
|
|
||||||
bars.add(new BlockBar(Color.GREEN, true, tile -> (float)tile.entity.getItem(item)/capacity));
|
bars.add(new BlockBar(Color.GREEN, true, tile -> (float)tile.entity.getItem(item)/capacity));
|
||||||
}
|
}
|
||||||
|
//fuel and output bars, respectively: should these be added, or is it too cluttery?
|
||||||
//bars.add(new BlockBar(Color.ORANGE, true, tile -> (float)tile.entity.getItem(fuel)/capacity));
|
//bars.add(new BlockBar(Color.ORANGE, true, tile -> (float)tile.entity.getItem(fuel)/capacity));
|
||||||
//bars.add(new BlockBar(Color.LIGHT_GRAY, true, tile -> (float)tile.entity.getItem(result)/capacity));
|
//bars.add(new BlockBar(Color.LIGHT_GRAY, true, tile -> (float)tile.entity.getItem(result)/capacity));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user