GWT compilation fixes
This commit is contained in:
@@ -21,6 +21,7 @@ import java.text.DateFormat;
|
|||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class AndroidLauncher extends AndroidApplication{
|
public class AndroidLauncher extends AndroidApplication{
|
||||||
boolean doubleScaleTablets = true;
|
boolean doubleScaleTablets = true;
|
||||||
@@ -60,6 +61,11 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
TextFieldDialogListener.add(field, 0, length);
|
TextFieldDialogListener.add(field, 0, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLocaleName(Locale locale){
|
||||||
|
return locale.getDisplayName(locale);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void openDonations() {
|
public void openDonations() {
|
||||||
showDonations();
|
showDonations();
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 697 B |
@@ -3,6 +3,7 @@ package io.anuke.mindustry.io;
|
|||||||
import io.anuke.ucore.scene.ui.TextField;
|
import io.anuke.ucore.scene.ui.TextField;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public abstract class PlatformFunction{
|
public abstract class PlatformFunction{
|
||||||
public String format(Date date){return "invalid";}
|
public String format(Date date){return "invalid";}
|
||||||
@@ -17,4 +18,5 @@ public abstract class PlatformFunction{
|
|||||||
public void onGameExit(){}
|
public void onGameExit(){}
|
||||||
public void openDonations(){}
|
public void openDonations(){}
|
||||||
public void requestWritePerms(){}
|
public void requestWritePerms(){}
|
||||||
|
public String getLocaleName(Locale locale){return locale.toString();}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.anuke.mindustry.ui.dialogs;
|
package io.anuke.mindustry.ui.dialogs;
|
||||||
|
|
||||||
|
import io.anuke.mindustry.Mindustry;
|
||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.ucore.UCore;
|
import io.anuke.ucore.UCore;
|
||||||
import io.anuke.ucore.core.Settings;
|
import io.anuke.ucore.core.Settings;
|
||||||
@@ -29,8 +30,7 @@ public class LanguageDialog extends FloatingDialog{
|
|||||||
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
||||||
|
|
||||||
for(Locale loc : locales){
|
for(Locale loc : locales){
|
||||||
TextButton button = new TextButton(loc.getDisplayName(loc), "toggle");
|
TextButton button = new TextButton(Mindustry.platforms.getLocaleName(loc), "toggle");
|
||||||
UCore.log(loc.getDisplayName(loc));
|
|
||||||
button.setChecked(Vars.ui.getLocale().equals(loc));
|
button.setChecked(Vars.ui.getLocale().equals(loc));
|
||||||
button.clicked(() -> {
|
button.clicked(() -> {
|
||||||
if(Vars.ui.getLocale().equals(loc)) return;
|
if(Vars.ui.getLocale().equals(loc)) return;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import java.text.DateFormat;
|
|||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class DesktopLauncher {
|
public class DesktopLauncher {
|
||||||
|
|
||||||
@@ -86,6 +87,11 @@ public class DesktopLauncher {
|
|||||||
JOptionPane.showMessageDialog(null, text);
|
JOptionPane.showMessageDialog(null, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLocaleName(Locale locale){
|
||||||
|
return locale.getDisplayName(locale);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateRPC() {
|
public void updateRPC() {
|
||||||
DiscordRichPresence presence = new DiscordRichPresence();
|
DiscordRichPresence presence = new DiscordRichPresence();
|
||||||
|
|||||||
Reference in New Issue
Block a user