mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-03 12:53:48 +07:00
GWT compilation fixes
This commit is contained in:
parent
2528438706
commit
1dad6b27c7
@ -21,6 +21,7 @@ import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class AndroidLauncher extends AndroidApplication{
|
||||
boolean doubleScaleTablets = true;
|
||||
@ -60,6 +61,11 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
TextFieldDialogListener.add(field, 0, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLocaleName(Locale locale){
|
||||
return locale.getDisplayName(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openDonations() {
|
||||
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 java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public abstract class PlatformFunction{
|
||||
public String format(Date date){return "invalid";}
|
||||
@ -17,4 +18,5 @@ public abstract class PlatformFunction{
|
||||
public void onGameExit(){}
|
||||
public void openDonations(){}
|
||||
public void requestWritePerms(){}
|
||||
public String getLocaleName(Locale locale){return locale.toString();}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import io.anuke.mindustry.Mindustry;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.ucore.UCore;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
@ -29,8 +30,7 @@ public class LanguageDialog extends FloatingDialog{
|
||||
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
||||
|
||||
for(Locale loc : locales){
|
||||
TextButton button = new TextButton(loc.getDisplayName(loc), "toggle");
|
||||
UCore.log(loc.getDisplayName(loc));
|
||||
TextButton button = new TextButton(Mindustry.platforms.getLocaleName(loc), "toggle");
|
||||
button.setChecked(Vars.ui.getLocale().equals(loc));
|
||||
button.clicked(() -> {
|
||||
if(Vars.ui.getLocale().equals(loc)) return;
|
||||
|
@ -27,6 +27,7 @@ import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class DesktopLauncher {
|
||||
|
||||
@ -86,6 +87,11 @@ public class DesktopLauncher {
|
||||
JOptionPane.showMessageDialog(null, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLocaleName(Locale locale){
|
||||
return locale.getDisplayName(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateRPC() {
|
||||
DiscordRichPresence presence = new DiscordRichPresence();
|
||||
|
Loading…
Reference in New Issue
Block a user