Replaced '$' formatting with '@'
This commit is contained in:
@@ -108,7 +108,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
});
|
});
|
||||||
}else if(VERSION.SDK_INT >= VERSION_CODES.M && !(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED &&
|
}else if(VERSION.SDK_INT >= VERSION_CODES.M && !(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED &&
|
||||||
checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){
|
checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){
|
||||||
chooser = new FileChooser(open ? "$open" : "$save", file -> file.extension().equalsIgnoreCase(extension), open, file -> {
|
chooser = new FileChooser(open ? "@open" : "@save", file -> file.extension().equalsIgnoreCase(extension), open, file -> {
|
||||||
if(!open){
|
if(!open){
|
||||||
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
||||||
}else{
|
}else{
|
||||||
@@ -216,10 +216,10 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
SaveSlot slot = control.saves.importSave(file);
|
SaveSlot slot = control.saves.importSave(file);
|
||||||
ui.load.runLoadSave(slot);
|
ui.load.runLoadSave(slot);
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
ui.showException("$save.import.fail", e);
|
ui.showException("@save.import.fail", e);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("$save.import.invalid");
|
ui.showErrorMessage("@save.import.invalid");
|
||||||
}
|
}
|
||||||
}else if(map){ //open map
|
}else if(map){ //open map
|
||||||
Fi file = Core.files.local("temp-map." + mapExtension);
|
Fi file = Core.files.local("temp-map." + mapExtension);
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
net.host(port);
|
net.host(port);
|
||||||
player.admin(true);
|
player.admin(true);
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
ui.showException("$server.error", e);
|
ui.showException("@server.error", e);
|
||||||
state.set(State.menu);
|
state.set(State.menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -312,7 +312,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
}catch(SaveException e){
|
}catch(SaveException e){
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
sector.save = null;
|
sector.save = null;
|
||||||
Time.runTask(10f, () -> ui.showErrorMessage("$save.corrupted"));
|
Time.runTask(10f, () -> ui.showErrorMessage("@save.corrupted"));
|
||||||
slot.delete();
|
slot.delete();
|
||||||
playSector(origin, sector);
|
playSector(origin, sector);
|
||||||
}
|
}
|
||||||
@@ -451,7 +451,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
//display UI scale changed dialog
|
//display UI scale changed dialog
|
||||||
if(Core.settings.getBool("uiscalechanged", false)){
|
if(Core.settings.getBool("uiscalechanged", false)){
|
||||||
Core.app.post(() -> Core.app.post(() -> {
|
Core.app.post(() -> Core.app.post(() -> {
|
||||||
BaseDialog dialog = new BaseDialog("$confirm");
|
BaseDialog dialog = new BaseDialog("@confirm");
|
||||||
dialog.setFillParent(true);
|
dialog.setFillParent(true);
|
||||||
|
|
||||||
float[] countdown = {60 * 11};
|
float[] countdown = {60 * 11};
|
||||||
@@ -470,9 +470,9 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
}).pad(10f).expand().center();
|
}).pad(10f).expand().center();
|
||||||
|
|
||||||
dialog.buttons.defaults().size(200f, 60f);
|
dialog.buttons.defaults().size(200f, 60f);
|
||||||
dialog.buttons.button("$uiscale.cancel", exit);
|
dialog.buttons.button("@uiscale.cancel", exit);
|
||||||
|
|
||||||
dialog.buttons.button("$ok", () -> {
|
dialog.buttons.button("@ok", () -> {
|
||||||
Core.settings.put("uiscalechanged", false);
|
Core.settings.put("uiscalechanged", false);
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
reset();
|
reset();
|
||||||
|
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
ui.loadfrag.show("$connecting.data");
|
ui.loadfrag.show("@connecting.data");
|
||||||
|
|
||||||
ui.loadfrag.setButton(() -> {
|
ui.loadfrag.setButton(() -> {
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
@@ -80,7 +80,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
c.uuid = platform.getUUID();
|
c.uuid = platform.getUUID();
|
||||||
|
|
||||||
if(c.uuid == null){
|
if(c.uuid == null){
|
||||||
ui.showErrorMessage("$invalidid");
|
ui.showErrorMessage("@invalidid");
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
disconnectQuietly();
|
disconnectQuietly();
|
||||||
return;
|
return;
|
||||||
@@ -104,14 +104,14 @@ public class NetClient implements ApplicationListener{
|
|||||||
|
|
||||||
if(packet.reason != null){
|
if(packet.reason != null){
|
||||||
if(packet.reason.equals("closed")){
|
if(packet.reason.equals("closed")){
|
||||||
ui.showSmall("$disconnect", "$disconnect.closed");
|
ui.showSmall("@disconnect", "@disconnect.closed");
|
||||||
}else if(packet.reason.equals("timeout")){
|
}else if(packet.reason.equals("timeout")){
|
||||||
ui.showSmall("$disconnect", "$disconnect.timeout");
|
ui.showSmall("@disconnect", "@disconnect.timeout");
|
||||||
}else if(packet.reason.equals("error")){
|
}else if(packet.reason.equals("error")){
|
||||||
ui.showSmall("$disconnect", "$disconnect.error");
|
ui.showSmall("@disconnect", "@disconnect.error");
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("$disconnect");
|
ui.showErrorMessage("@disconnect");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
if(reason.extraText() != null){
|
if(reason.extraText() != null){
|
||||||
ui.showText(reason.toString(), reason.extraText());
|
ui.showText(reason.toString(), reason.extraText());
|
||||||
}else{
|
}else{
|
||||||
ui.showText("$disconnect", reason.toString());
|
ui.showText("@disconnect", reason.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
@@ -271,7 +271,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
public static void kick(String reason){
|
public static void kick(String reason){
|
||||||
netClient.disconnectQuietly();
|
netClient.disconnectQuietly();
|
||||||
logic.reset();
|
logic.reset();
|
||||||
ui.showText("$disconnect", reason, Align.left);
|
ui.showText("@disconnect", reason, Align.left);
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,7 +347,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
|
|
||||||
net.setClientLoaded(false);
|
net.setClientLoaded(false);
|
||||||
|
|
||||||
ui.loadfrag.show("$connecting.data");
|
ui.loadfrag.show("@connecting.data");
|
||||||
|
|
||||||
ui.loadfrag.setButton(() -> {
|
ui.loadfrag.setButton(() -> {
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
@@ -481,7 +481,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
Log.err("Failed to load data!");
|
Log.err("Failed to load data!");
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
quiet = true;
|
quiet = true;
|
||||||
ui.showErrorMessage("$disconnect.data");
|
ui.showErrorMessage("@disconnect.data");
|
||||||
net.disconnect();
|
net.disconnect();
|
||||||
timeoutTime = 0f;
|
timeoutTime = 0f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -740,7 +740,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
|
|
||||||
if(!headless && !closing && net.server() && state.isMenu()){
|
if(!headless && !closing && net.server() && state.isMenu()){
|
||||||
closing = true;
|
closing = true;
|
||||||
ui.loadfrag.show("$server.closing");
|
ui.loadfrag.show("@server.closing");
|
||||||
Time.runTask(5f, () -> {
|
Time.runTask(5f, () -> {
|
||||||
net.closeServer();
|
net.closeServer();
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public interface Platform{
|
|||||||
* @param extension File extension to filter
|
* @param extension File extension to filter
|
||||||
*/
|
*/
|
||||||
default void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
default void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
||||||
new FileChooser(open ? "$open" : "$save", file -> file.extEquals(extension), open, file -> {
|
new FileChooser(open ? "@open" : "@save", file -> file.extEquals(extension), open, file -> {
|
||||||
if(!open){
|
if(!open){
|
||||||
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
||||||
}else{
|
}else{
|
||||||
@@ -129,7 +129,7 @@ public interface Platform{
|
|||||||
if(mobile){
|
if(mobile){
|
||||||
showFileChooser(true, extensions[0], cons);
|
showFileChooser(true, extensions[0], cons);
|
||||||
}else{
|
}else{
|
||||||
new FileChooser("$open", file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
new FileChooser("@open", file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
settings.put("bloom", false);
|
settings.put("bloom", false);
|
||||||
ui.showErrorMessage("$error.bloom");
|
ui.showErrorMessage("@error.bloom");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,7 +318,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
int memory = w * h * 4 / 1024 / 1024;
|
int memory = w * h * 4 / 1024 / 1024;
|
||||||
|
|
||||||
if(memory >= 65){
|
if(memory >= 65){
|
||||||
ui.showInfo("$screenshot.invalid");
|
ui.showInfo("@screenshot.invalid");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loadAnd(Runnable call){
|
public void loadAnd(Runnable call){
|
||||||
loadAnd("$loading", call);
|
loadAnd("@loading", call);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadAnd(String text, Runnable call){
|
public void loadAnd(String text, Runnable call){
|
||||||
@@ -239,7 +239,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
public void showTextInput(String titleText, String dtext, int textLength, String def, boolean inumeric, Cons<String> confirmed){
|
public void showTextInput(String titleText, String dtext, int textLength, String def, boolean inumeric, Cons<String> confirmed){
|
||||||
if(mobile){
|
if(mobile){
|
||||||
Core.input.getTextInput(new TextInput(){{
|
Core.input.getTextInput(new TextInput(){{
|
||||||
this.title = (titleText.startsWith("$") ? Core.bundle.get(titleText.substring(1)) : titleText);
|
this.title = (titleText.startsWith("@") ? Core.bundle.get(titleText.substring(1)) : titleText);
|
||||||
this.text = def;
|
this.text = def;
|
||||||
this.numeric = inumeric;
|
this.numeric = inumeric;
|
||||||
this.maxLength = textLength;
|
this.maxLength = textLength;
|
||||||
@@ -252,11 +252,11 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
TextField field = cont.field(def, t -> {}).size(330f, 50f).get();
|
TextField field = cont.field(def, t -> {}).size(330f, 50f).get();
|
||||||
field.setFilter((f, c) -> field.getText().length() < textLength && filter.acceptChar(f, c));
|
field.setFilter((f, c) -> field.getText().length() < textLength && filter.acceptChar(f, c));
|
||||||
buttons.defaults().size(120, 54).pad(4);
|
buttons.defaults().size(120, 54).pad(4);
|
||||||
buttons.button("$ok", () -> {
|
buttons.button("@ok", () -> {
|
||||||
confirmed.get(field.getText());
|
confirmed.get(field.getText());
|
||||||
hide();
|
hide();
|
||||||
}).disabled(b -> field.getText().isEmpty());
|
}).disabled(b -> field.getText().isEmpty());
|
||||||
buttons.button("$cancel", this::hide);
|
buttons.button("@cancel", this::hide);
|
||||||
keyDown(KeyCode.enter, () -> {
|
keyDown(KeyCode.enter, () -> {
|
||||||
String text = field.getText();
|
String text = field.getText();
|
||||||
if(!text.isEmpty()){
|
if(!text.isEmpty()){
|
||||||
@@ -341,7 +341,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
getCell(cont).growX();
|
getCell(cont).growX();
|
||||||
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.center, Align.center);
|
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.center, Align.center);
|
||||||
buttons.button("$ok", () -> {
|
buttons.button("@ok", () -> {
|
||||||
hide();
|
hide();
|
||||||
listener.run();
|
listener.run();
|
||||||
}).size(110, 50).pad(4);
|
}).size(110, 50).pad(4);
|
||||||
@@ -352,7 +352,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
getCell(cont).growX();
|
getCell(cont).growX();
|
||||||
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.left);
|
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.left);
|
||||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,13 +360,13 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
cont.margin(15f);
|
cont.margin(15f);
|
||||||
cont.add("$error.title");
|
cont.add("@error.title");
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.image().width(300f).pad(2).height(4f).color(Color.scarlet);
|
cont.image().width(300f).pad(2).height(4f).color(Color.scarlet);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add(text).pad(2f).growX().wrap().get().setAlignment(Align.center);
|
cont.add(text).pad(2f).growX().wrap().get().setAlignment(Align.center);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.button("$ok", this::hide).size(120, 50).pad(4);
|
cont.button("@ok", this::hide).size(120, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,17 +381,17 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
|
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
cont.margin(15);
|
cont.margin(15);
|
||||||
cont.add("$error.title").colspan(2);
|
cont.add("@error.title").colspan(2);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add((text.startsWith("$") ? Core.bundle.get(text.substring(1)) : text) + (message == null ? "" : "\n[lightgray](" + message + ")")).colspan(2).wrap().growX().center().get().setAlignment(Align.center);
|
cont.add((text.startsWith("@") ? Core.bundle.get(text.substring(1)) : text) + (message == null ? "" : "\n[lightgray](" + message + ")")).colspan(2).wrap().growX().center().get().setAlignment(Align.center);
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(Strings.neatError(exc)).color(Color.lightGray).left()), true);
|
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(Strings.neatError(exc)).color(Color.lightGray).left()), true);
|
||||||
|
|
||||||
cont.button("$details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
|
cont.button("@details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
|
||||||
cont.button("$ok", this::hide).size(110, 50).fillX().left();
|
cont.button("@ok", this::hide).size(110, 50).fillX().left();
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add(col).colspan(2).pad(2);
|
cont.add(col).colspan(2).pad(2);
|
||||||
}}.show();
|
}}.show();
|
||||||
@@ -408,14 +408,14 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
cont.row();
|
cont.row();
|
||||||
cont.add(text).width(400f).wrap().get().setAlignment(align, align);
|
cont.add(text).width(400f).wrap().get().setAlignment(align, align);
|
||||||
cont.row();
|
cont.row();
|
||||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showInfoText(String titleText, String text){
|
public void showInfoText(String titleText, String text){
|
||||||
new Dialog(titleText){{
|
new Dialog(titleText){{
|
||||||
cont.margin(15).add(text).width(400f).wrap().left().get().setAlignment(Align.left, Align.left);
|
cont.margin(15).add(text).width(400f).wrap().left().get().setAlignment(Align.left, Align.left);
|
||||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,7 +424,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
cont.margin(10).add(text);
|
cont.margin(10).add(text);
|
||||||
titleTable.row();
|
titleTable.row();
|
||||||
titleTable.image().color(Pal.accent).height(3f).growX().pad(2f);
|
titleTable.image().color(Pal.accent).height(3f).growX().pad(2f);
|
||||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,8 +437,8 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
dialog.cont.add(text).width(mobile ? 400f : 500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
dialog.cont.add(text).width(mobile ? 400f : 500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.buttons.button("$cancel", dialog::hide);
|
dialog.buttons.button("@cancel", dialog::hide);
|
||||||
dialog.buttons.button("$ok", () -> {
|
dialog.buttons.button("@ok", () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
confirmed.run();
|
confirmed.run();
|
||||||
});
|
});
|
||||||
@@ -490,7 +490,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
dialog.cont.add(text).width(500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
dialog.cont.add(text).width(500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.buttons.button("$ok", () -> {
|
dialog.buttons.button("@ok", () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
confirmed.run();
|
confirmed.run();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ public class World{
|
|||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
if(!headless){
|
if(!headless){
|
||||||
ui.showErrorMessage("$map.invalid");
|
ui.showErrorMessage("@map.invalid");
|
||||||
Core.app.post(() -> state.set(State.menu));
|
Core.app.post(() -> state.set(State.menu));
|
||||||
invalidMap = true;
|
invalidMap = true;
|
||||||
}
|
}
|
||||||
@@ -291,17 +291,17 @@ public class World{
|
|||||||
|
|
||||||
if(!headless){
|
if(!headless){
|
||||||
if(state.teams.playerCores().size == 0 && !checkRules.pvp){
|
if(state.teams.playerCores().size == 0 && !checkRules.pvp){
|
||||||
ui.showErrorMessage("$map.nospawn");
|
ui.showErrorMessage("@map.nospawn");
|
||||||
invalidMap = true;
|
invalidMap = true;
|
||||||
}else if(checkRules.pvp){ //pvp maps need two cores to be valid
|
}else if(checkRules.pvp){ //pvp maps need two cores to be valid
|
||||||
if(state.teams.getActive().count(TeamData::hasCore) < 2){
|
if(state.teams.getActive().count(TeamData::hasCore) < 2){
|
||||||
invalidMap = true;
|
invalidMap = true;
|
||||||
ui.showErrorMessage("$map.nospawn.pvp");
|
ui.showErrorMessage("@map.nospawn.pvp");
|
||||||
}
|
}
|
||||||
}else if(checkRules.attackMode){ //attack maps need two cores to be valid
|
}else if(checkRules.attackMode){ //attack maps need two cores to be valid
|
||||||
invalidMap = state.teams.get(state.rules.waveTeam).noCores();
|
invalidMap = state.teams.get(state.rules.waveTeam).noCores();
|
||||||
if(invalidMap){
|
if(invalidMap){
|
||||||
ui.showErrorMessage("$map.nospawn.attack");
|
ui.showErrorMessage("@map.nospawn.attack");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
infoDialog = new MapInfoDialog(editor);
|
infoDialog = new MapInfoDialog(editor);
|
||||||
generateDialog = new MapGenerateDialog(editor, true);
|
generateDialog = new MapGenerateDialog(editor, true);
|
||||||
|
|
||||||
menu = new BaseDialog("$menu");
|
menu = new BaseDialog("@menu");
|
||||||
menu.addCloseButton();
|
menu.addCloseButton();
|
||||||
|
|
||||||
float swidth = 180f;
|
float swidth = 180f;
|
||||||
@@ -66,41 +66,41 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
menu.cont.table(t -> {
|
menu.cont.table(t -> {
|
||||||
t.defaults().size(swidth, 60f).padBottom(5).padRight(5).padLeft(5);
|
t.defaults().size(swidth, 60f).padBottom(5).padRight(5).padLeft(5);
|
||||||
|
|
||||||
t.button("$editor.savemap", Icon.save, this::save);
|
t.button("@editor.savemap", Icon.save, this::save);
|
||||||
|
|
||||||
t.button("$editor.mapinfo", Icon.pencil, () -> {
|
t.button("@editor.mapinfo", Icon.pencil, () -> {
|
||||||
infoDialog.show();
|
infoDialog.show();
|
||||||
menu.hide();
|
menu.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.button("$editor.generate", Icon.terrain, () -> {
|
t.button("@editor.generate", Icon.terrain, () -> {
|
||||||
generateDialog.show(generateDialog::applyToEditor);
|
generateDialog.show(generateDialog::applyToEditor);
|
||||||
menu.hide();
|
menu.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
t.button("$editor.resize", Icon.resize, () -> {
|
t.button("@editor.resize", Icon.resize, () -> {
|
||||||
resizeDialog.show();
|
resizeDialog.show();
|
||||||
menu.hide();
|
menu.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.button("$editor.import", Icon.download, () -> createDialog("$editor.import",
|
t.button("@editor.import", Icon.download, () -> createDialog("@editor.import",
|
||||||
"$editor.importmap", "$editor.importmap.description", Icon.download, (Runnable)loadDialog::show,
|
"@editor.importmap", "@editor.importmap.description", Icon.download, (Runnable)loadDialog::show,
|
||||||
"$editor.importfile", "$editor.importfile.description", Icon.file, (Runnable)() ->
|
"@editor.importfile", "@editor.importfile.description", Icon.file, (Runnable)() ->
|
||||||
platform.showFileChooser(true, mapExtension, file -> ui.loadAnd(() -> {
|
platform.showFileChooser(true, mapExtension, file -> ui.loadAnd(() -> {
|
||||||
maps.tryCatchMapError(() -> {
|
maps.tryCatchMapError(() -> {
|
||||||
if(MapIO.isImage(file)){
|
if(MapIO.isImage(file)){
|
||||||
ui.showInfo("$editor.errorimage");
|
ui.showInfo("@editor.errorimage");
|
||||||
}else{
|
}else{
|
||||||
editor.beginEdit(MapIO.createMap(file, true));
|
editor.beginEdit(MapIO.createMap(file, true));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
|
|
||||||
"$editor.importimage", "$editor.importimage.description", Icon.fileImage, (Runnable)() ->
|
"@editor.importimage", "@editor.importimage.description", Icon.fileImage, (Runnable)() ->
|
||||||
platform.showFileChooser(true, "png", file ->
|
platform.showFileChooser(true, "png", file ->
|
||||||
ui.loadAnd(() -> {
|
ui.loadAnd(() -> {
|
||||||
try{
|
try{
|
||||||
@@ -108,16 +108,16 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
editor.beginEdit(pixmap);
|
editor.beginEdit(pixmap);
|
||||||
pixmap.dispose();
|
pixmap.dispose();
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
ui.showException("$editor.errorload", e);
|
ui.showException("@editor.errorload", e);
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
}
|
}
|
||||||
})))
|
})))
|
||||||
);
|
);
|
||||||
|
|
||||||
t.button("$editor.export", Icon.upload, () -> createDialog("$editor.export",
|
t.button("@editor.export", Icon.upload, () -> createDialog("@editor.export",
|
||||||
"$editor.exportfile", "$editor.exportfile.description", Icon.file,
|
"@editor.exportfile", "@editor.exportfile.description", Icon.file,
|
||||||
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), mapExtension, file -> MapIO.writeMap(file, editor.createMap(file))),
|
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), mapExtension, file -> MapIO.writeMap(file, editor.createMap(file))),
|
||||||
"$editor.exportimage", "$editor.exportimage.description", Icon.fileImage,
|
"@editor.exportimage", "@editor.exportimage.description", Icon.fileImage,
|
||||||
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), "png", file -> {
|
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), "png", file -> {
|
||||||
Pixmap out = MapIO.writeImage(editor.tiles());
|
Pixmap out = MapIO.writeImage(editor.tiles());
|
||||||
file.writePNG(out);
|
file.writePNG(out);
|
||||||
@@ -128,7 +128,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
menu.cont.row();
|
menu.cont.row();
|
||||||
|
|
||||||
if(steam){
|
if(steam){
|
||||||
menu.cont.button("$editor.publish.workshop", Icon.link, () -> {
|
menu.cont.button("@editor.publish.workshop", Icon.link, () -> {
|
||||||
Map builtin = maps.all().find(m -> m.name().equals(editor.getTags().get("name", "").trim()));
|
Map builtin = maps.all().find(m -> m.name().equals(editor.getTags().get("name", "").trim()));
|
||||||
|
|
||||||
if(editor.getTags().containsKey("steamid") && builtin != null && !builtin.custom){
|
if(editor.getTags().containsKey("steamid") && builtin != null && !builtin.custom){
|
||||||
@@ -146,26 +146,26 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
if(map == null) return;
|
if(map == null) return;
|
||||||
|
|
||||||
if(map.tags.get("description", "").length() < 4){
|
if(map.tags.get("description", "").length() < 4){
|
||||||
ui.showErrorMessage("$editor.nodescription");
|
ui.showErrorMessage("@editor.nodescription");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Structs.contains(Gamemode.all, g -> g.valid(map))){
|
if(!Structs.contains(Gamemode.all, g -> g.valid(map))){
|
||||||
ui.showErrorMessage("$map.nospawn");
|
ui.showErrorMessage("@map.nospawn");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
platform.publish(map);
|
platform.publish(map);
|
||||||
}).padTop(-3).size(swidth * 2f + 10, 60f).update(b -> b.setText(editor.getTags().containsKey("steamid") ? editor.getTags().get("author").equals(player.name) ? "$workshop.listing" : "$view.workshop" : "$editor.publish.workshop"));
|
}).padTop(-3).size(swidth * 2f + 10, 60f).update(b -> b.setText(editor.getTags().containsKey("steamid") ? editor.getTags().get("author").equals(player.name) ? "@workshop.listing" : "@view.workshop" : "@editor.publish.workshop"));
|
||||||
|
|
||||||
menu.cont.row();
|
menu.cont.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.cont.button("$editor.ingame", Icon.right, this::playtest).padTop(!steam ? -3 : 1).size(swidth * 2f + 10, 60f);
|
menu.cont.button("@editor.ingame", Icon.right, this::playtest).padTop(!steam ? -3 : 1).size(swidth * 2f + 10, 60f);
|
||||||
|
|
||||||
menu.cont.row();
|
menu.cont.row();
|
||||||
|
|
||||||
menu.cont.button("$quit", Icon.exit, () -> {
|
menu.cont.button("@quit", Icon.exit, () -> {
|
||||||
tryExit();
|
tryExit();
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}).size(swidth * 2f + 10, 60f);
|
}).size(swidth * 2f + 10, 60f);
|
||||||
@@ -182,7 +182,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
try{
|
try{
|
||||||
editor.beginEdit(map);
|
editor.beginEdit(map);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
ui.showException("$editor.errorload", e);
|
ui.showException("@editor.errorload", e);
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -280,14 +280,14 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
if(name.isEmpty()){
|
if(name.isEmpty()){
|
||||||
infoDialog.show();
|
infoDialog.show();
|
||||||
Core.app.post(() -> ui.showErrorMessage("$editor.save.noname"));
|
Core.app.post(() -> ui.showErrorMessage("@editor.save.noname"));
|
||||||
}else{
|
}else{
|
||||||
Map map = maps.all().find(m -> m.name().equals(name));
|
Map map = maps.all().find(m -> m.name().equals(name));
|
||||||
if(map != null && !map.custom){
|
if(map != null && !map.custom){
|
||||||
handleSaveBuiltin(map);
|
handleSaveBuiltin(map);
|
||||||
}else{
|
}else{
|
||||||
returned = maps.saveMap(editor.getTags());
|
returned = maps.saveMap(editor.getTags());
|
||||||
ui.showInfoFade("$editor.saved");
|
ui.showInfoFade("@editor.saved");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
/** Called when a built-in map save is attempted.*/
|
/** Called when a built-in map save is attempted.*/
|
||||||
protected void handleSaveBuiltin(Map map){
|
protected void handleSaveBuiltin(Map map){
|
||||||
ui.showErrorMessage("$editor.save.overwrite");
|
ui.showErrorMessage("@editor.save.overwrite");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -368,7 +368,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
show();
|
show();
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
ui.showException("$editor.errorload", e);
|
ui.showException("@editor.errorload", e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -521,7 +521,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
tools.row();
|
tools.row();
|
||||||
|
|
||||||
tools.table(Tex.underline, t -> t.add("$editor.teams"))
|
tools.table(Tex.underline, t -> t.add("@editor.teams"))
|
||||||
.colspan(3).height(40).width(size * 3f + 3f).padBottom(3);
|
.colspan(3).height(40).width(size * 3f + 3f).padBottom(3);
|
||||||
|
|
||||||
tools.row();
|
tools.row();
|
||||||
@@ -557,7 +557,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
t.top();
|
t.top();
|
||||||
t.add("$editor.brush");
|
t.add("@editor.brush");
|
||||||
t.row();
|
t.row();
|
||||||
t.add(slider).width(size * 3f - 20).padTop(4f);
|
t.add(slider).width(size * 3f - 20).padTop(4f);
|
||||||
}).padTop(5).growX().top();
|
}).padTop(5).growX().top();
|
||||||
@@ -650,7 +650,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
private void tryExit(){
|
private void tryExit(){
|
||||||
if(!saved){
|
if(!saved){
|
||||||
ui.showConfirm("$confirm", "$editor.unsaved", this::hide);
|
ui.showConfirm("@confirm", "@editor.unsaved", this::hide);
|
||||||
}else{
|
}else{
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,34 +58,34 @@ public class MapGenerateDialog extends BaseDialog{
|
|||||||
|
|
||||||
/** @param applied whether or not to use the applied in-game mode. */
|
/** @param applied whether or not to use the applied in-game mode. */
|
||||||
public MapGenerateDialog(MapEditor editor, boolean applied){
|
public MapGenerateDialog(MapEditor editor, boolean applied){
|
||||||
super("$editor.generate");
|
super("@editor.generate");
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
this.applied = applied;
|
this.applied = applied;
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
if(applied){
|
if(applied){
|
||||||
buttons.button("$editor.apply", () -> {
|
buttons.button("@editor.apply", () -> {
|
||||||
ui.loadAnd(() -> {
|
ui.loadAnd(() -> {
|
||||||
apply();
|
apply();
|
||||||
hide();
|
hide();
|
||||||
});
|
});
|
||||||
}).size(160f, 64f);
|
}).size(160f, 64f);
|
||||||
}else{
|
}else{
|
||||||
buttons.button("$settings.reset", () -> {
|
buttons.button("@settings.reset", () -> {
|
||||||
filters.set(maps.readFilters(""));
|
filters.set(maps.readFilters(""));
|
||||||
rebuildFilters();
|
rebuildFilters();
|
||||||
update();
|
update();
|
||||||
}).size(160f, 64f);
|
}).size(160f, 64f);
|
||||||
}
|
}
|
||||||
buttons.button("$editor.randomize", () -> {
|
buttons.button("@editor.randomize", () -> {
|
||||||
for(GenerateFilter filter : filters){
|
for(GenerateFilter filter : filters){
|
||||||
filter.randomize();
|
filter.randomize();
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
}).size(160f, 64f);
|
}).size(160f, 64f);
|
||||||
|
|
||||||
buttons.button("$add", Icon.add, this::showAdd).height(64f).width(140f);
|
buttons.button("@add", Icon.add, this::showAdd).height(64f).width(140f);
|
||||||
|
|
||||||
if(!applied){
|
if(!applied){
|
||||||
hidden(this::apply);
|
hidden(this::apply);
|
||||||
@@ -277,12 +277,12 @@ public class MapGenerateDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(filters.isEmpty()){
|
if(filters.isEmpty()){
|
||||||
filterTable.add("$filters.empty").wrap().width(200f);
|
filterTable.add("@filters.empty").wrap().width(200f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showAdd(){
|
void showAdd(){
|
||||||
BaseDialog selection = new BaseDialog("$add");
|
BaseDialog selection = new BaseDialog("@add");
|
||||||
selection.setFillParent(false);
|
selection.setFillParent(false);
|
||||||
selection.cont.defaults().size(210f, 60f);
|
selection.cont.defaults().size(210f, 60f);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -300,7 +300,7 @@ public class MapGenerateDialog extends BaseDialog{
|
|||||||
if(++i % 2 == 0) selection.cont.row();
|
if(++i % 2 == 0) selection.cont.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
selection.cont.button("$filter.defaultores", () -> {
|
selection.cont.button("@filter.defaultores", () -> {
|
||||||
maps.addDefaultOres(filters);
|
maps.addDefaultOres(filters);
|
||||||
rebuildFilters();
|
rebuildFilters();
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class MapInfoDialog extends BaseDialog{
|
|||||||
private final CustomRulesDialog ruleInfo = new CustomRulesDialog();
|
private final CustomRulesDialog ruleInfo = new CustomRulesDialog();
|
||||||
|
|
||||||
public MapInfoDialog(MapEditor editor){
|
public MapInfoDialog(MapEditor editor){
|
||||||
super("$editor.mapinfo");
|
super("@editor.mapinfo");
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
this.waveInfo = new WaveInfoDialog(editor);
|
this.waveInfo = new WaveInfoDialog(editor);
|
||||||
this.generate = new MapGenerateDialog(editor, false);
|
this.generate = new MapGenerateDialog(editor, false);
|
||||||
@@ -32,47 +32,47 @@ public class MapInfoDialog extends BaseDialog{
|
|||||||
ObjectMap<String, String> tags = editor.getTags();
|
ObjectMap<String, String> tags = editor.getTags();
|
||||||
|
|
||||||
cont.pane(t -> {
|
cont.pane(t -> {
|
||||||
t.add("$editor.mapname").padRight(8).left();
|
t.add("@editor.mapname").padRight(8).left();
|
||||||
t.defaults().padTop(15);
|
t.defaults().padTop(15);
|
||||||
|
|
||||||
TextField name = t.field(tags.get("name", ""), text -> {
|
TextField name = t.field(tags.get("name", ""), text -> {
|
||||||
tags.put("name", text);
|
tags.put("name", text);
|
||||||
}).size(400, 55f).addInputDialog(50).get();
|
}).size(400, 55f).addInputDialog(50).get();
|
||||||
name.setMessageText("$unknown");
|
name.setMessageText("@unknown");
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.description").padRight(8).left();
|
t.add("@editor.description").padRight(8).left();
|
||||||
|
|
||||||
TextArea description = t.area(tags.get("description", ""), Styles.areaField, text -> {
|
TextArea description = t.area(tags.get("description", ""), Styles.areaField, text -> {
|
||||||
tags.put("description", text);
|
tags.put("description", text);
|
||||||
}).size(400f, 140f).addInputDialog(1000).get();
|
}).size(400f, 140f).addInputDialog(1000).get();
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.author").padRight(8).left();
|
t.add("@editor.author").padRight(8).left();
|
||||||
|
|
||||||
TextField author = t.field(tags.get("author", Core.settings.getString("mapAuthor", "")), text -> {
|
TextField author = t.field(tags.get("author", Core.settings.getString("mapAuthor", "")), text -> {
|
||||||
tags.put("author", text);
|
tags.put("author", text);
|
||||||
Core.settings.put("mapAuthor", text);
|
Core.settings.put("mapAuthor", text);
|
||||||
}).size(400, 55f).addInputDialog(50).get();
|
}).size(400, 55f).addInputDialog(50).get();
|
||||||
author.setMessageText("$unknown");
|
author.setMessageText("@unknown");
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.rules").padRight(8).left();
|
t.add("@editor.rules").padRight(8).left();
|
||||||
t.button("$edit", () -> {
|
t.button("@edit", () -> {
|
||||||
ruleInfo.show(Vars.state.rules, () -> Vars.state.rules = new Rules());
|
ruleInfo.show(Vars.state.rules, () -> Vars.state.rules = new Rules());
|
||||||
hide();
|
hide();
|
||||||
}).left().width(200f);
|
}).left().width(200f);
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.waves").padRight(8).left();
|
t.add("@editor.waves").padRight(8).left();
|
||||||
t.button("$edit", () -> {
|
t.button("@edit", () -> {
|
||||||
waveInfo.show();
|
waveInfo.show();
|
||||||
hide();
|
hide();
|
||||||
}).left().width(200f);
|
}).left().width(200f);
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.generation").padRight(8).left();
|
t.add("@editor.generation").padRight(8).left();
|
||||||
t.button("$edit", () -> {
|
t.button("@edit", () -> {
|
||||||
generate.show(Vars.maps.readFilters(editor.getTags().get("genfilters", "")),
|
generate.show(Vars.maps.readFilters(editor.getTags().get("genfilters", "")),
|
||||||
filters -> editor.getTags().put("genfilters", JsonIO.write(filters)));
|
filters -> editor.getTags().put("genfilters", JsonIO.write(filters)));
|
||||||
hide();
|
hide();
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ public class MapLoadDialog extends BaseDialog{
|
|||||||
private Map selected = null;
|
private Map selected = null;
|
||||||
|
|
||||||
public MapLoadDialog(Cons<Map> loader){
|
public MapLoadDialog(Cons<Map> loader){
|
||||||
super("$editor.loadmap");
|
super("@editor.loadmap");
|
||||||
|
|
||||||
shown(this::rebuild);
|
shown(this::rebuild);
|
||||||
|
|
||||||
TextButton button = new TextButton("$load");
|
TextButton button = new TextButton("@load");
|
||||||
button.setDisabled(() -> selected == null);
|
button.setDisabled(() -> selected == null);
|
||||||
button.clicked(() -> {
|
button.clicked(() -> {
|
||||||
if(selected != null){
|
if(selected != null){
|
||||||
@@ -28,7 +28,7 @@ public class MapLoadDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
|
|
||||||
buttons.defaults().size(200f, 50f);
|
buttons.defaults().size(200f, 50f);
|
||||||
buttons.button("$cancel", this::hide);
|
buttons.button("@cancel", this::hide);
|
||||||
buttons.add(button);
|
buttons.add(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,9 +64,9 @@ public class MapLoadDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(maps.all().size == 0){
|
if(maps.all().size == 0){
|
||||||
table.add("$maps.none").center();
|
table.add("@maps.none").center();
|
||||||
}else{
|
}else{
|
||||||
cont.add("$editor.loadmap");
|
cont.add("@editor.loadmap");
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class MapResizeDialog extends BaseDialog{
|
|||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
public MapResizeDialog(MapEditor editor, Intc2 cons){
|
public MapResizeDialog(MapEditor editor, Intc2 cons){
|
||||||
super("$editor.resizemap");
|
super("@editor.resizemap");
|
||||||
shown(() -> {
|
shown(() -> {
|
||||||
cont.clear();
|
cont.clear();
|
||||||
width = editor.width();
|
width = editor.width();
|
||||||
@@ -21,7 +21,7 @@ public class MapResizeDialog extends BaseDialog{
|
|||||||
Table table = new Table();
|
Table table = new Table();
|
||||||
|
|
||||||
for(boolean w : Mathf.booleans){
|
for(boolean w : Mathf.booleans){
|
||||||
table.add(w ? "$width" : "$height").padRight(8f);
|
table.add(w ? "@width" : "@height").padRight(8f);
|
||||||
table.defaults().height(60f).padTop(8);
|
table.defaults().height(60f).padTop(8);
|
||||||
|
|
||||||
table.field((w ? width : height) + "", TextFieldFilter.digitsOnly, value -> {
|
table.field((w ? width : height) + "", TextFieldFilter.digitsOnly, value -> {
|
||||||
@@ -37,8 +37,8 @@ public class MapResizeDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
|
|
||||||
buttons.defaults().size(200f, 50f);
|
buttons.defaults().size(200f, 50f);
|
||||||
buttons.button("$cancel", this::hide);
|
buttons.button("@cancel", this::hide);
|
||||||
buttons.button("$ok", () -> {
|
buttons.button("@ok", () -> {
|
||||||
cons.get(width, height);
|
cons.get(width, height);
|
||||||
hide();
|
hide();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class WaveGraph extends Table{
|
|||||||
ButtonGroup<Button> group = new ButtonGroup<>();
|
ButtonGroup<Button> group = new ButtonGroup<>();
|
||||||
|
|
||||||
for(Mode m : Mode.all){
|
for(Mode m : Mode.all){
|
||||||
t.button("$wavemode." + m.name(), Styles.fullTogglet, () -> {
|
t.button("@wavemode." + m.name(), Styles.fullTogglet, () -> {
|
||||||
mode = m;
|
mode = m;
|
||||||
}).group(group).height(35f).update(b -> b.setChecked(m == mode)).width(130f);
|
}).group(group).height(35f).update(b -> b.setChecked(m == mode)).width(130f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
private WaveGraph graph = new WaveGraph();
|
private WaveGraph graph = new WaveGraph();
|
||||||
|
|
||||||
public WaveInfoDialog(MapEditor editor){
|
public WaveInfoDialog(MapEditor editor){
|
||||||
super("$waves.title");
|
super("@waves.title");
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
hidden(() -> {
|
hidden(() -> {
|
||||||
@@ -48,29 +48,29 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
onResize(this::setup);
|
onResize(this::setup);
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
buttons.button("$waves.edit", () -> {
|
buttons.button("@waves.edit", () -> {
|
||||||
BaseDialog dialog = new BaseDialog("$waves.edit");
|
BaseDialog dialog = new BaseDialog("@waves.edit");
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.cont.defaults().size(210f, 64f);
|
dialog.cont.defaults().size(210f, 64f);
|
||||||
dialog.cont.button("$waves.copy", () -> {
|
dialog.cont.button("@waves.copy", () -> {
|
||||||
ui.showInfoFade("$waves.copied");
|
ui.showInfoFade("@waves.copied");
|
||||||
Core.app.setClipboardText(maps.writeWaves(groups));
|
Core.app.setClipboardText(maps.writeWaves(groups));
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).disabled(b -> groups == null);
|
}).disabled(b -> groups == null);
|
||||||
dialog.cont.row();
|
dialog.cont.row();
|
||||||
dialog.cont.button("$waves.load", () -> {
|
dialog.cont.button("@waves.load", () -> {
|
||||||
try{
|
try{
|
||||||
groups = maps.readWaves(Core.app.getClipboardText());
|
groups = maps.readWaves(Core.app.getClipboardText());
|
||||||
buildGroups();
|
buildGroups();
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ui.showErrorMessage("$waves.invalid");
|
ui.showErrorMessage("@waves.invalid");
|
||||||
}
|
}
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).disabled(b -> Core.app.getClipboardText() == null || Core.app.getClipboardText().isEmpty());
|
}).disabled(b -> Core.app.getClipboardText() == null || Core.app.getClipboardText().isEmpty());
|
||||||
dialog.cont.row();
|
dialog.cont.row();
|
||||||
dialog.cont.button("$settings.reset", () -> ui.showConfirm("$confirm", "$settings.clear.confirm", () -> {
|
dialog.cont.button("@settings.reset", () -> ui.showConfirm("@confirm", "@settings.clear.confirm", () -> {
|
||||||
groups = JsonIO.copy(defaultWaves.get());
|
groups = JsonIO.copy(defaultWaves.get());
|
||||||
buildGroups();
|
buildGroups();
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
@@ -130,12 +130,12 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
cont.stack(new Table(Tex.clear, main -> {
|
cont.stack(new Table(Tex.clear, main -> {
|
||||||
main.pane(t -> table = t).growX().growY().padRight(8f).get().setScrollingDisabled(true, false);
|
main.pane(t -> table = t).growX().growY().padRight(8f).get().setScrollingDisabled(true, false);
|
||||||
main.row();
|
main.row();
|
||||||
main.button("$add", () -> {
|
main.button("@add", () -> {
|
||||||
if(groups == null) groups = new Seq<>();
|
if(groups == null) groups = new Seq<>();
|
||||||
groups.add(new SpawnGroup(lastType));
|
groups.add(new SpawnGroup(lastType));
|
||||||
buildGroups();
|
buildGroups();
|
||||||
}).growX().height(70f);
|
}).growX().height(70f);
|
||||||
}), new Label("$waves.none"){{
|
}), new Label("@waves.none"){{
|
||||||
visible(() -> groups.isEmpty());
|
visible(() -> groups.isEmpty());
|
||||||
this.touchable = Touchable.disabled;
|
this.touchable = Touchable.disabled;
|
||||||
setWrap(true);
|
setWrap(true);
|
||||||
@@ -180,7 +180,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(100f);
|
}).width(100f);
|
||||||
spawns.add("$waves.to").padLeft(4).padRight(4);
|
spawns.add("@waves.to").padLeft(4).padRight(4);
|
||||||
spawns.field(group.end == never ? "" : (group.end + 1) + "", TextFieldFilter.digitsOnly, text -> {
|
spawns.field(group.end == never ? "" : (group.end + 1) + "", TextFieldFilter.digitsOnly, text -> {
|
||||||
if(Strings.canParsePositiveInt(text)){
|
if(Strings.canParsePositiveInt(text)){
|
||||||
group.end = Strings.parseInt(text) - 1;
|
group.end = Strings.parseInt(text) - 1;
|
||||||
@@ -193,14 +193,14 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
t.row();
|
t.row();
|
||||||
t.table(p -> {
|
t.table(p -> {
|
||||||
p.add("$waves.every").padRight(4);
|
p.add("@waves.every").padRight(4);
|
||||||
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
||||||
if(Strings.canParsePositiveInt(text) && Strings.parseInt(text) > 0){
|
if(Strings.canParsePositiveInt(text) && Strings.parseInt(text) > 0){
|
||||||
group.spacing = Strings.parseInt(text);
|
group.spacing = Strings.parseInt(text);
|
||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(100f);
|
}).width(100f);
|
||||||
p.add("$waves.waves").padLeft(4);
|
p.add("@waves.waves").padLeft(4);
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
@@ -219,7 +219,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(80f);
|
}).width(80f);
|
||||||
a.add("$waves.perspawn").padLeft(4);
|
a.add("@waves.perspawn").padLeft(4);
|
||||||
});
|
});
|
||||||
t.row();
|
t.row();
|
||||||
t.table(a -> {
|
t.table(a -> {
|
||||||
@@ -237,17 +237,17 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(80f);
|
}).width(80f);
|
||||||
a.add("$waves.shields").padLeft(4);
|
a.add("@waves.shields").padLeft(4);
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.check("$waves.guardian", b -> group.effect = (b ? StatusEffects.boss : null)).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss)).padBottom(8f);
|
t.check("@waves.guardian", b -> group.effect = (b ? StatusEffects.boss : null)).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss)).padBottom(8f);
|
||||||
}).width(340f).pad(8);
|
}).width(340f).pad(8);
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
table.add("$editor.default");
|
table.add("@editor.default");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateWaves();
|
updateWaves();
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ public class Saves{
|
|||||||
mods.removeAll(Vars.mods.getModStrings());
|
mods.removeAll(Vars.mods.getModStrings());
|
||||||
|
|
||||||
if(!mods.isEmpty()){
|
if(!mods.isEmpty()){
|
||||||
ui.showConfirm("$warning", Core.bundle.format("mod.missing", mods.toString("\n")), run);
|
ui.showConfirm("@warning", Core.bundle.format("mod.missing", mods.toString("\n")), run);
|
||||||
}else{
|
}else{
|
||||||
run.run();
|
run.run();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
Core.keybinds.get(Binding.schematic_flip_y).key.toString())).style(Styles.outlineLabel);
|
Core.keybinds.get(Binding.schematic_flip_y).key.toString())).style(Styles.outlineLabel);
|
||||||
b.row();
|
b.row();
|
||||||
b.table(a -> {
|
b.table(a -> {
|
||||||
a.button("$schematic.add", Icon.save, this::showSchematicSave).colspan(2).size(250f, 50f).disabled(f -> lastSchematic == null || lastSchematic.file != null);
|
a.button("@schematic.add", Icon.save, this::showSchematicSave).colspan(2).size(250f, 50f).disabled(f -> lastSchematic == null || lastSchematic.file != null);
|
||||||
});
|
});
|
||||||
}).margin(6f);
|
}).margin(6f);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -396,18 +396,18 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
protected void showSchematicSave(){
|
protected void showSchematicSave(){
|
||||||
if(lastSchematic == null) return;
|
if(lastSchematic == null) return;
|
||||||
|
|
||||||
ui.showTextInput("$schematic.add", "$name", "", text -> {
|
ui.showTextInput("@schematic.add", "@name", "", text -> {
|
||||||
Schematic replacement = schematics.all().find(s -> s.name().equals(text));
|
Schematic replacement = schematics.all().find(s -> s.name().equals(text));
|
||||||
if(replacement != null){
|
if(replacement != null){
|
||||||
ui.showConfirm("$confirm", "$schematic.replace", () -> {
|
ui.showConfirm("@confirm", "@schematic.replace", () -> {
|
||||||
schematics.overwrite(replacement, lastSchematic);
|
schematics.overwrite(replacement, lastSchematic);
|
||||||
ui.showInfoFade("$schematic.saved");
|
ui.showInfoFade("@schematic.saved");
|
||||||
ui.schematics.showInfo(replacement);
|
ui.schematics.showInfo(replacement);
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
lastSchematic.tags.put("name", text);
|
lastSchematic.tags.put("name", text);
|
||||||
schematics.add(lastSchematic);
|
schematics.add(lastSchematic);
|
||||||
ui.showInfoFade("$schematic.saved");
|
ui.showInfoFade("@schematic.saved");
|
||||||
ui.schematics.showInfo(lastSchematic);
|
ui.schematics.showInfo(lastSchematic);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
group.fill(t -> {
|
group.fill(t -> {
|
||||||
t.visible(() -> (player.builder().isBuilding() || block != null || mode == breaking || !selectRequests.isEmpty()) && !schem.get());
|
t.visible(() -> (player.builder().isBuilding() || block != null || mode == breaking || !selectRequests.isEmpty()) && !schem.get());
|
||||||
t.bottom().left();
|
t.bottom().left();
|
||||||
t.button("$cancel", Icon.cancel, () -> {
|
t.button("@cancel", Icon.cancel, () -> {
|
||||||
player.builder().clearBuilding();
|
player.builder().clearBuilding();
|
||||||
selectRequests.clear();
|
selectRequests.clear();
|
||||||
mode = none;
|
mode = none;
|
||||||
|
|||||||
@@ -266,11 +266,11 @@ public class Maps{
|
|||||||
Log.err(e);
|
Log.err(e);
|
||||||
|
|
||||||
if("Outdated legacy map format".equals(e.getMessage())){
|
if("Outdated legacy map format".equals(e.getMessage())){
|
||||||
ui.showErrorMessage("$editor.errornot");
|
ui.showErrorMessage("@editor.errornot");
|
||||||
}else if(e.getMessage() != null && e.getMessage().contains("Incorrect header!")){
|
}else if(e.getMessage() != null && e.getMessage().contains("Incorrect header!")){
|
||||||
ui.showErrorMessage("$editor.errorheader");
|
ui.showErrorMessage("@editor.errorheader");
|
||||||
}else{
|
}else{
|
||||||
ui.showException("$editor.errorload", e);
|
ui.showException("@editor.errorload", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public abstract class FilterOption{
|
|||||||
@Override
|
@Override
|
||||||
public void build(Table table){
|
public void build(Table table){
|
||||||
if(!display){
|
if(!display){
|
||||||
table.add("$filter.option." + name);
|
table.add("@filter.option." + name);
|
||||||
}else{
|
}else{
|
||||||
table.label(() -> Core.bundle.get("filter.option." + name) + ": " + (int)getter.get());
|
table.label(() -> Core.bundle.get("filter.option." + name) + ": " + (int)getter.get());
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ public abstract class FilterOption{
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
}).pad(4).margin(12f);
|
}).pad(4).margin(12f);
|
||||||
|
|
||||||
table.add("$filter.option." + name);
|
table.add("@filter.option." + name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ public class Mods implements Loadable{
|
|||||||
boolean deleted = mod.file.isDirectory() ? mod.file.deleteDirectory() : mod.file.delete();
|
boolean deleted = mod.file.isDirectory() ? mod.file.deleteDirectory() : mod.file.delete();
|
||||||
|
|
||||||
if(!deleted){
|
if(!deleted){
|
||||||
ui.showErrorMessage("$mod.delete.error");
|
ui.showErrorMessage("@mod.delete.error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mods.remove(mod);
|
mods.remove(mod);
|
||||||
@@ -371,7 +371,7 @@ public class Mods implements Loadable{
|
|||||||
private void checkWarnings(){
|
private void checkWarnings(){
|
||||||
//show 'scripts have errored' info
|
//show 'scripts have errored' info
|
||||||
if(scripts != null && scripts.hasErrored()){
|
if(scripts != null && scripts.hasErrored()){
|
||||||
ui.showErrorMessage("$mod.scripts.disable");
|
ui.showErrorMessage("@mod.scripts.disable");
|
||||||
}
|
}
|
||||||
|
|
||||||
//show list of errored content
|
//show list of errored content
|
||||||
@@ -381,11 +381,11 @@ public class Mods implements Loadable{
|
|||||||
|
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
cont.margin(15);
|
cont.margin(15);
|
||||||
cont.add("$error.title");
|
cont.add("@error.title");
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add("$mod.errors").wrap().growX().center().get().setAlignment(Align.center);
|
cont.add("@mod.errors").wrap().growX().center().get().setAlignment(Align.center);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.pane(p -> {
|
cont.pane(p -> {
|
||||||
mods.each(m -> m.enabled() && m.hasContentErrors(), m -> {
|
mods.each(m -> m.enabled() && m.hasContentErrors(), m -> {
|
||||||
@@ -397,12 +397,12 @@ public class Mods implements Loadable{
|
|||||||
d.left().marginLeft(15f);
|
d.left().marginLeft(15f);
|
||||||
for(Content c : m.erroredContent){
|
for(Content c : m.erroredContent){
|
||||||
d.add(c.minfo.sourceFile.nameWithoutExtension()).left().padRight(10);
|
d.add(c.minfo.sourceFile.nameWithoutExtension()).left().padRight(10);
|
||||||
d.button("$details", Icon.downOpen, Styles.transt, () -> {
|
d.button("@details", Icon.downOpen, Styles.transt, () -> {
|
||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
cont.pane(e -> e.add(c.minfo.error).wrap().grow()).grow();
|
cont.pane(e -> e.add(c.minfo.error).wrap().grow()).grow();
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.button("$ok", Icon.left, this::hide).size(240f, 60f);
|
cont.button("@ok", Icon.left, this::hide).size(240f, 60f);
|
||||||
}}.show();
|
}}.show();
|
||||||
}).size(190f, 50f).left().marginLeft(6);
|
}).size(190f, 50f).left().marginLeft(6);
|
||||||
d.row();
|
d.row();
|
||||||
@@ -413,7 +413,7 @@ public class Mods implements Loadable{
|
|||||||
});
|
});
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.button("$ok", this::hide).size(300, 50);
|
cont.button("@ok", this::hide).size(300, 50);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -752,12 +752,12 @@ public class Mods implements Loadable{
|
|||||||
@Override
|
@Override
|
||||||
public boolean prePublish(){
|
public boolean prePublish(){
|
||||||
if(!file.isDirectory()){
|
if(!file.isDirectory()){
|
||||||
ui.showErrorMessage("$mod.folder.missing");
|
ui.showErrorMessage("@mod.folder.missing");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!file.child("preview.png").exists()){
|
if(!file.child("preview.png").exists()){
|
||||||
ui.showErrorMessage("$mod.preview.missing");
|
ui.showErrorMessage("@mod.preview.missing");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,13 +85,13 @@ public class BeControl{
|
|||||||
|
|
||||||
if(!headless){
|
if(!headless){
|
||||||
checkUpdates = false;
|
checkUpdates = false;
|
||||||
ui.showCustomConfirm(Core.bundle.format("be.update", "") + " " + updateBuild, "$be.update.confirm", "$ok", "$be.ignore", () -> {
|
ui.showCustomConfirm(Core.bundle.format("be.update", "") + " " + updateBuild, "@be.update.confirm", "@ok", "@be.ignore", () -> {
|
||||||
boolean[] cancel = {false};
|
boolean[] cancel = {false};
|
||||||
float[] progress = {0};
|
float[] progress = {0};
|
||||||
int[] length = {0};
|
int[] length = {0};
|
||||||
Fi file = bebuildDirectory.child("client-be-" + updateBuild + ".jar");
|
Fi file = bebuildDirectory.child("client-be-" + updateBuild + ".jar");
|
||||||
|
|
||||||
BaseDialog dialog = new BaseDialog("$be.updating");
|
BaseDialog dialog = new BaseDialog("@be.updating");
|
||||||
download(updateUrl, file, i -> length[0] = i, v -> progress[0] = v, () -> cancel[0], () -> {
|
download(updateUrl, file, i -> length[0] = i, v -> progress[0] = v, () -> cancel[0], () -> {
|
||||||
try{
|
try{
|
||||||
Runtime.getRuntime().exec(new String[]{"java", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()});
|
Runtime.getRuntime().exec(new String[]{"java", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()});
|
||||||
@@ -105,7 +105,7 @@ public class BeControl{
|
|||||||
});
|
});
|
||||||
|
|
||||||
dialog.cont.add(new Bar(() -> length[0] == 0 ? Core.bundle.get("be.updating") : (int)(progress[0] * length[0]) / 1024/ 1024 + "/" + length[0]/1024/1024 + " MB", () -> Pal.accent, () -> progress[0])).width(400f).height(70f);
|
dialog.cont.add(new Bar(() -> length[0] == 0 ? Core.bundle.get("be.updating") : (int)(progress[0] * length[0]) / 1024/ 1024 + "/" + length[0]/1024/1024 + " MB", () -> Pal.accent, () -> progress[0])).width(400f).height(70f);
|
||||||
dialog.buttons.button("$cancel", Icon.cancel, () -> {
|
dialog.buttons.button("@cancel", Icon.cancel, () -> {
|
||||||
cancel[0] = true;
|
cancel[0] = true;
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).size(210f, 64f);
|
}).size(210f, 64f);
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class Net{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isError){
|
if(isError){
|
||||||
ui.showException("$error.any", e);
|
ui.showException("@error.any", e);
|
||||||
}else{
|
}else{
|
||||||
ui.showText("", Core.bundle.format("connectfail", error));
|
ui.showText("", Core.bundle.format("connectfail", error));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class ContentDisplay{
|
|||||||
|
|
||||||
if(map.size == 0) continue;
|
if(map.size == 0) continue;
|
||||||
|
|
||||||
table.add("$category." + cat.name()).color(Pal.accent).fillX();
|
table.add("@category." + cat.name()).color(Pal.accent).fillX();
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
for(BlockStat stat : map.keys()){
|
for(BlockStat stat : map.keys()){
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class ItemsDisplay extends Table{
|
|||||||
}
|
}
|
||||||
}).get().setScrollingDisabled(true, false), false).setDuration(0.3f);
|
}).get().setScrollingDisabled(true, false), false).setDuration(0.3f);
|
||||||
|
|
||||||
c.button("$globalitems", Icon.downOpen, Styles.clearTogglet, col::toggle).update(t -> {
|
c.button("@globalitems", Icon.downOpen, Styles.clearTogglet, col::toggle).update(t -> {
|
||||||
t.setChecked(col.isCollapsed());
|
t.setChecked(col.isCollapsed());
|
||||||
((Image)t.getChildren().get(1)).setDrawable(col.isCollapsed() ? Icon.upOpen : Icon.downOpen);
|
((Image)t.getChildren().get(1)).setDrawable(col.isCollapsed() ? Icon.upOpen : Icon.downOpen);
|
||||||
}).padBottom(4).left().fillX().margin(12f).minWidth(200f);
|
}).padBottom(4).left().fillX().margin(12f).minWidth(200f);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class AboutDialog extends BaseDialog{
|
|||||||
private static ObjectSet<String> bannedItems = ObjectSet.with("google-play", "itch.io", "dev-builds", "f-droid");
|
private static ObjectSet<String> bannedItems = ObjectSet.with("google-play", "itch.io", "dev-builds", "f-droid");
|
||||||
|
|
||||||
public AboutDialog(){
|
public AboutDialog(){
|
||||||
super("$about.button");
|
super("@about.button");
|
||||||
|
|
||||||
shown(() -> {
|
shown(() -> {
|
||||||
contributors = Seq.with(Core.files.internal("contributors").readString("UTF-8").split("\n"));
|
contributors = Seq.with(Core.files.internal("contributors").readString("UTF-8").split("\n"));
|
||||||
@@ -68,7 +68,7 @@ public class AboutDialog extends BaseDialog{
|
|||||||
if(link.name.equals("wiki")) Events.fire(Trigger.openWiki);
|
if(link.name.equals("wiki")) Events.fire(Trigger.openWiki);
|
||||||
|
|
||||||
if(!Core.app.openURI(link.link)){
|
if(!Core.app.openURI(link.link)){
|
||||||
ui.showErrorMessage("$linkfail");
|
ui.showErrorMessage("@linkfail");
|
||||||
Core.app.setClipboardText(link.link);
|
Core.app.setClipboardText(link.link);
|
||||||
}
|
}
|
||||||
}).size(h - 5, h);
|
}).size(h - 5, h);
|
||||||
@@ -82,7 +82,7 @@ public class AboutDialog extends BaseDialog{
|
|||||||
|
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
buttons.button("$credits", this::showCredits).size(200f, 64f);
|
buttons.button("@credits", this::showCredits).size(200f, 64f);
|
||||||
|
|
||||||
if(Core.graphics.isPortrait()){
|
if(Core.graphics.isPortrait()){
|
||||||
for(Cell<?> cell : buttons.getCells()){
|
for(Cell<?> cell : buttons.getCells()){
|
||||||
@@ -93,14 +93,14 @@ public class AboutDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showCredits(){
|
public void showCredits(){
|
||||||
BaseDialog dialog = new BaseDialog("$credits");
|
BaseDialog dialog = new BaseDialog("@credits");
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
dialog.cont.add("$credits.text").fillX().wrap().get().setAlignment(Align.center);
|
dialog.cont.add("@credits.text").fillX().wrap().get().setAlignment(Align.center);
|
||||||
dialog.cont.row();
|
dialog.cont.row();
|
||||||
if(!contributors.isEmpty()){
|
if(!contributors.isEmpty()){
|
||||||
dialog.cont.image().color(Pal.accent).fillX().height(3f).pad(3f);
|
dialog.cont.image().color(Pal.accent).fillX().height(3f).pad(3f);
|
||||||
dialog.cont.row();
|
dialog.cont.row();
|
||||||
dialog.cont.add("$contributors");
|
dialog.cont.add("@contributors");
|
||||||
dialog.cont.row();
|
dialog.cont.row();
|
||||||
dialog.cont.pane(new Table(){{
|
dialog.cont.pane(new Table(){{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import static mindustry.Vars.*;
|
|||||||
public class AdminsDialog extends BaseDialog{
|
public class AdminsDialog extends BaseDialog{
|
||||||
|
|
||||||
public AdminsDialog(){
|
public AdminsDialog(){
|
||||||
super("$server.admins");
|
super("@server.admins");
|
||||||
|
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ public class AdminsDialog extends BaseDialog{
|
|||||||
pane.setFadeScrollBars(false);
|
pane.setFadeScrollBars(false);
|
||||||
|
|
||||||
if(netServer.admins.getAdmins().size == 0){
|
if(netServer.admins.getAdmins().size == 0){
|
||||||
table.add("$server.admins.none");
|
table.add("@server.admins.none");
|
||||||
}
|
}
|
||||||
|
|
||||||
for(PlayerInfo info : netServer.admins.getAdmins()){
|
for(PlayerInfo info : netServer.admins.getAdmins()){
|
||||||
@@ -39,7 +39,7 @@ public class AdminsDialog extends BaseDialog{
|
|||||||
res.labelWrap("[lightgray]" + info.lastName).width(w - h - 24f);
|
res.labelWrap("[lightgray]" + info.lastName).width(w - h - 24f);
|
||||||
res.add().growX();
|
res.add().growX();
|
||||||
res.button(Icon.cancel, () -> {
|
res.button(Icon.cancel, () -> {
|
||||||
ui.showConfirm("$confirm", "$confirmunadmin", () -> {
|
ui.showConfirm("@confirm", "@confirmunadmin", () -> {
|
||||||
netServer.admins.unAdminPlayer(info.id);
|
netServer.admins.unAdminPlayer(info.id);
|
||||||
Groups.player.each(player -> {
|
Groups.player.each(player -> {
|
||||||
if(player != null && !player.isLocal() && player.uuid().equals(info.id)){
|
if(player != null && !player.isLocal() && player.uuid().equals(info.id)){
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import static mindustry.Vars.*;
|
|||||||
public class BansDialog extends BaseDialog{
|
public class BansDialog extends BaseDialog{
|
||||||
|
|
||||||
public BansDialog(){
|
public BansDialog(){
|
||||||
super("$server.bans");
|
super("@server.bans");
|
||||||
|
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ public class BansDialog extends BaseDialog{
|
|||||||
pane.setFadeScrollBars(false);
|
pane.setFadeScrollBars(false);
|
||||||
|
|
||||||
if(netServer.admins.getBanned().size == 0){
|
if(netServer.admins.getBanned().size == 0){
|
||||||
table.add("$server.bans.none");
|
table.add("@server.bans.none");
|
||||||
}
|
}
|
||||||
|
|
||||||
for(PlayerInfo info : netServer.admins.getBanned()){
|
for(PlayerInfo info : netServer.admins.getBanned()){
|
||||||
@@ -40,7 +40,7 @@ public class BansDialog extends BaseDialog{
|
|||||||
res.labelWrap("IP: [lightgray]" + info.lastIP + "\n[]Name: [lightgray]" + info.lastName).width(w - h - 24f);
|
res.labelWrap("IP: [lightgray]" + info.lastIP + "\n[]Name: [lightgray]" + info.lastName).width(w - h - 24f);
|
||||||
res.add().growX();
|
res.add().growX();
|
||||||
res.button(Icon.cancel, () -> {
|
res.button(Icon.cancel, () -> {
|
||||||
ui.showConfirm("$confirm", "$confirmunban", () -> {
|
ui.showConfirm("@confirm", "@confirmunban", () -> {
|
||||||
netServer.admins.unbanPlayerID(info.id);
|
netServer.admins.unbanPlayerID(info.id);
|
||||||
setup();
|
setup();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class BaseDialog extends Dialog{
|
|||||||
@Override
|
@Override
|
||||||
public void addCloseButton(){
|
public void addCloseButton(){
|
||||||
buttons.defaults().size(210f, 64f);
|
buttons.defaults().size(210f, 64f);
|
||||||
buttons.button("$back", Icon.left, this::hide).size(210f, 64f);
|
buttons.button("@back", Icon.left, this::hide).size(210f, 64f);
|
||||||
|
|
||||||
keyDown(key -> {
|
keyDown(key -> {
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
if(key == KeyCode.escape || key == KeyCode.back){
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class ColorPicker extends BaseDialog{
|
|||||||
private Color current = new Color();
|
private Color current = new Color();
|
||||||
|
|
||||||
public ColorPicker(){
|
public ColorPicker(){
|
||||||
super("$pickcolor");
|
super("@pickcolor");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show(Color color, Cons<Color> consumer){
|
public void show(Color color, Cons<Color> consumer){
|
||||||
@@ -55,7 +55,7 @@ public class ColorPicker extends BaseDialog{
|
|||||||
|
|
||||||
buttons.clear();
|
buttons.clear();
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
buttons.button("$ok", Icon.ok, () -> {
|
buttons.button("@ok", Icon.ok, () -> {
|
||||||
cons.get(current);
|
cons.get(current);
|
||||||
hide();
|
hide();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import mindustry.ctype.UnlockableContent;
|
|||||||
public class ContentInfoDialog extends BaseDialog{
|
public class ContentInfoDialog extends BaseDialog{
|
||||||
|
|
||||||
public ContentInfoDialog(){
|
public ContentInfoDialog(){
|
||||||
super("$info.title");
|
super("@info.title");
|
||||||
|
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class ControlsDialog extends KeybindDialog{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCloseButton(){
|
public void addCloseButton(){
|
||||||
buttons.button("$back", Icon.left, this::hide).size(230f, 64f);
|
buttons.button("@back", Icon.left, this::hide).size(230f, 64f);
|
||||||
|
|
||||||
keyDown(key -> {
|
keyDown(key -> {
|
||||||
if(key == KeyCode.escape || key == KeyCode.back) hide();
|
if(key == KeyCode.escape || key == KeyCode.back) hide();
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class CustomGameDialog extends BaseDialog{
|
|||||||
private MapPlayDialog dialog = new MapPlayDialog();
|
private MapPlayDialog dialog = new MapPlayDialog();
|
||||||
|
|
||||||
public CustomGameDialog(){
|
public CustomGameDialog(){
|
||||||
super("$customgame");
|
super("@customgame");
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
onResize(this::setup);
|
onResize(this::setup);
|
||||||
@@ -84,7 +84,7 @@ public class CustomGameDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(Vars.maps.all().size == 0){
|
if(Vars.maps.all().size == 0){
|
||||||
maps.add("$maps.none").pad(50);
|
maps.add("@maps.none").pad(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.add(pane).uniformX();
|
cont.add(pane).uniformX();
|
||||||
|
|||||||
@@ -26,19 +26,19 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
private BaseDialog banDialog;
|
private BaseDialog banDialog;
|
||||||
|
|
||||||
public CustomRulesDialog(){
|
public CustomRulesDialog(){
|
||||||
super("$mode.custom");
|
super("@mode.custom");
|
||||||
|
|
||||||
loadoutDialog = new LoadoutDialog();
|
loadoutDialog = new LoadoutDialog();
|
||||||
banDialog = new BaseDialog("$bannedblocks");
|
banDialog = new BaseDialog("@bannedblocks");
|
||||||
banDialog.addCloseButton();
|
banDialog.addCloseButton();
|
||||||
|
|
||||||
banDialog.shown(this::rebuildBanned);
|
banDialog.shown(this::rebuildBanned);
|
||||||
banDialog.buttons.button("$addall", Icon.add, () -> {
|
banDialog.buttons.button("@addall", Icon.add, () -> {
|
||||||
rules.bannedBlocks.addAll(content.blocks().select(Block::canBeBuilt));
|
rules.bannedBlocks.addAll(content.blocks().select(Block::canBeBuilt));
|
||||||
rebuildBanned();
|
rebuildBanned();
|
||||||
}).size(180, 64f);
|
}).size(180, 64f);
|
||||||
|
|
||||||
banDialog.buttons.button("$clear", Icon.trash, () -> {
|
banDialog.buttons.button("@clear", Icon.trash, () -> {
|
||||||
rules.bannedBlocks.clear();
|
rules.bannedBlocks.clear();
|
||||||
rebuildBanned();
|
rebuildBanned();
|
||||||
}).size(180, 64f);
|
}).size(180, 64f);
|
||||||
@@ -55,7 +55,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
t.margin(10f);
|
t.margin(10f);
|
||||||
|
|
||||||
if(rules.bannedBlocks.isEmpty()){
|
if(rules.bannedBlocks.isEmpty()){
|
||||||
t.add("$empty");
|
t.add("@empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
Seq<Block> array = Seq.with(rules.bannedBlocks);
|
Seq<Block> array = Seq.with(rules.bannedBlocks);
|
||||||
@@ -82,8 +82,8 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
}).get().setScrollYForce(previousScroll);
|
}).get().setScrollYForce(previousScroll);
|
||||||
banDialog.cont.row();
|
banDialog.cont.row();
|
||||||
banDialog.cont.button("$add", Icon.add, () -> {
|
banDialog.cont.button("@add", Icon.add, () -> {
|
||||||
BaseDialog dialog = new BaseDialog("$add");
|
BaseDialog dialog = new BaseDialog("@add");
|
||||||
dialog.cont.pane(t -> {
|
dialog.cont.pane(t -> {
|
||||||
t.left().margin(14f);
|
t.left().margin(14f);
|
||||||
int[] i = {0};
|
int[] i = {0};
|
||||||
@@ -116,7 +116,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
cont.clear();
|
cont.clear();
|
||||||
cont.pane(m -> main = m).get().setScrollingDisabled(true, false);
|
cont.pane(m -> main = m).get().setScrollingDisabled(true, false);
|
||||||
main.margin(10f);
|
main.margin(10f);
|
||||||
main.button("$settings.reset", () -> {
|
main.button("@settings.reset", () -> {
|
||||||
rules = resetter.get();
|
rules = resetter.get();
|
||||||
setup();
|
setup();
|
||||||
requestKeyboard();
|
requestKeyboard();
|
||||||
@@ -125,45 +125,45 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
main.left().defaults().fillX().left().pad(5);
|
main.left().defaults().fillX().left().pad(5);
|
||||||
main.row();
|
main.row();
|
||||||
|
|
||||||
title("$rules.title.waves");
|
title("@rules.title.waves");
|
||||||
check("$rules.waves", b -> rules.waves = b, () -> rules.waves);
|
check("@rules.waves", b -> rules.waves = b, () -> rules.waves);
|
||||||
check("$rules.wavetimer", b -> rules.waveTimer = b, () -> rules.waveTimer);
|
check("@rules.wavetimer", b -> rules.waveTimer = b, () -> rules.waveTimer);
|
||||||
check("$rules.waitForWaveToEnd", b -> rules.waitEnemies = b, () -> rules.waitEnemies);
|
check("@rules.waitForWaveToEnd", b -> rules.waitEnemies = b, () -> rules.waitEnemies);
|
||||||
number("$rules.wavespacing", false, f -> rules.waveSpacing = f * 60f, () -> rules.waveSpacing / 60f, () -> true);
|
number("@rules.wavespacing", false, f -> rules.waveSpacing = f * 60f, () -> rules.waveSpacing / 60f, () -> true);
|
||||||
number("$rules.dropzoneradius", false, f -> rules.dropZoneRadius = f * tilesize, () -> rules.dropZoneRadius / tilesize, () -> true);
|
number("@rules.dropzoneradius", false, f -> rules.dropZoneRadius = f * tilesize, () -> rules.dropZoneRadius / tilesize, () -> true);
|
||||||
|
|
||||||
title("$rules.title.resourcesbuilding");
|
title("@rules.title.resourcesbuilding");
|
||||||
check("$rules.infiniteresources", b -> rules.infiniteResources = b, () -> rules.infiniteResources);
|
check("@rules.infiniteresources", b -> rules.infiniteResources = b, () -> rules.infiniteResources);
|
||||||
check("$rules.reactorexplosions", b -> rules.reactorExplosions = b, () -> rules.reactorExplosions);
|
check("@rules.reactorexplosions", b -> rules.reactorExplosions = b, () -> rules.reactorExplosions);
|
||||||
number("$rules.buildcostmultiplier", false, f -> rules.buildCostMultiplier = f, () -> rules.buildCostMultiplier, () -> !rules.infiniteResources);
|
number("@rules.buildcostmultiplier", false, f -> rules.buildCostMultiplier = f, () -> rules.buildCostMultiplier, () -> !rules.infiniteResources);
|
||||||
number("$rules.buildspeedmultiplier", f -> rules.buildSpeedMultiplier = f, () -> rules.buildSpeedMultiplier);
|
number("@rules.buildspeedmultiplier", f -> rules.buildSpeedMultiplier = f, () -> rules.buildSpeedMultiplier);
|
||||||
number("$rules.deconstructrefundmultiplier", false, f -> rules.deconstructRefundMultiplier = f, () -> rules.deconstructRefundMultiplier, () -> !rules.infiniteResources);
|
number("@rules.deconstructrefundmultiplier", false, f -> rules.deconstructRefundMultiplier = f, () -> rules.deconstructRefundMultiplier, () -> !rules.infiniteResources);
|
||||||
number("$rules.blockhealthmultiplier", f -> rules.blockHealthMultiplier = f, () -> rules.blockHealthMultiplier);
|
number("@rules.blockhealthmultiplier", f -> rules.blockHealthMultiplier = f, () -> rules.blockHealthMultiplier);
|
||||||
number("$rules.blockdamagemultiplier", f -> rules.blockDamageMultiplier = f, () -> rules.blockDamageMultiplier);
|
number("@rules.blockdamagemultiplier", f -> rules.blockDamageMultiplier = f, () -> rules.blockDamageMultiplier);
|
||||||
|
|
||||||
main.button("$configure",
|
main.button("@configure",
|
||||||
() -> loadoutDialog.show(Blocks.coreShard.itemCapacity, rules.loadout,
|
() -> loadoutDialog.show(Blocks.coreShard.itemCapacity, rules.loadout,
|
||||||
() -> rules.loadout.clear().add(new ItemStack(Items.copper, 100)),
|
() -> rules.loadout.clear().add(new ItemStack(Items.copper, 100)),
|
||||||
() -> {}, () -> {}
|
() -> {}, () -> {}
|
||||||
)).left().width(300f);
|
)).left().width(300f);
|
||||||
main.row();
|
main.row();
|
||||||
|
|
||||||
main.button("$bannedblocks", banDialog::show).left().width(300f);
|
main.button("@bannedblocks", banDialog::show).left().width(300f);
|
||||||
main.row();
|
main.row();
|
||||||
|
|
||||||
title("$rules.title.unit");
|
title("@rules.title.unit");
|
||||||
check("$rules.unitammo", b -> rules.unitAmmo = b, () -> rules.unitAmmo);
|
check("@rules.unitammo", b -> rules.unitAmmo = b, () -> rules.unitAmmo);
|
||||||
number("$rules.unithealthmultiplier", f -> rules.unitHealthMultiplier = f, () -> rules.unitHealthMultiplier);
|
number("@rules.unithealthmultiplier", f -> rules.unitHealthMultiplier = f, () -> rules.unitHealthMultiplier);
|
||||||
number("$rules.unitdamagemultiplier", f -> rules.unitDamageMultiplier = f, () -> rules.unitDamageMultiplier);
|
number("@rules.unitdamagemultiplier", f -> rules.unitDamageMultiplier = f, () -> rules.unitDamageMultiplier);
|
||||||
number("$rules.unitbuildspeedmultiplier", f -> rules.unitBuildSpeedMultiplier = f, () -> rules.unitBuildSpeedMultiplier);
|
number("@rules.unitbuildspeedmultiplier", f -> rules.unitBuildSpeedMultiplier = f, () -> rules.unitBuildSpeedMultiplier);
|
||||||
|
|
||||||
title("$rules.title.enemy");
|
title("@rules.title.enemy");
|
||||||
check("$rules.attack", b -> rules.attackMode = b, () -> rules.attackMode);
|
check("@rules.attack", b -> rules.attackMode = b, () -> rules.attackMode);
|
||||||
number("$rules.enemycorebuildradius", f -> rules.enemyCoreBuildRadius = f * tilesize, () -> Math.min(rules.enemyCoreBuildRadius / tilesize, 200));
|
number("@rules.enemycorebuildradius", f -> rules.enemyCoreBuildRadius = f * tilesize, () -> Math.min(rules.enemyCoreBuildRadius / tilesize, 200));
|
||||||
|
|
||||||
title("$rules.title.environment");
|
title("@rules.title.environment");
|
||||||
number("$rules.solarpowermultiplier", f -> rules.solarPowerMultiplier = f, () -> rules.solarPowerMultiplier);
|
number("@rules.solarpowermultiplier", f -> rules.solarPowerMultiplier = f, () -> rules.solarPowerMultiplier);
|
||||||
check("$rules.lighting", b -> rules.lighting = b, () -> rules.lighting);
|
check("@rules.lighting", b -> rules.lighting = b, () -> rules.lighting);
|
||||||
|
|
||||||
main.button(b -> {
|
main.button(b -> {
|
||||||
b.left();
|
b.left();
|
||||||
@@ -172,7 +172,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
update(() -> setColor(rules.ambientLight));
|
update(() -> setColor(rules.ambientLight));
|
||||||
}}).grow();
|
}}).grow();
|
||||||
}).margin(4).size(50f).padRight(10);
|
}).margin(4).size(50f).padRight(10);
|
||||||
b.add("$rules.ambientlight");
|
b.add("@rules.ambientlight");
|
||||||
}, () -> ui.picker.show(rules.ambientLight, rules.ambientLight::set)).left().width(250f);
|
}, () -> ui.picker.show(rules.ambientLight, rules.ambientLight::set)).left().width(250f);
|
||||||
main.row();
|
main.row();
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import static mindustry.Vars.ui;
|
|||||||
public class DatabaseDialog extends BaseDialog{
|
public class DatabaseDialog extends BaseDialog{
|
||||||
|
|
||||||
public DatabaseDialog(){
|
public DatabaseDialog(){
|
||||||
super("$database");
|
super("@database");
|
||||||
|
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
@@ -42,7 +42,7 @@ public class DatabaseDialog extends BaseDialog{
|
|||||||
Seq<Content> array = allContent[j].select(c -> c instanceof UnlockableContent && !((UnlockableContent)c).isHidden());
|
Seq<Content> array = allContent[j].select(c -> c instanceof UnlockableContent && !((UnlockableContent)c).isHidden());
|
||||||
if(array.size == 0) continue;
|
if(array.size == 0) continue;
|
||||||
|
|
||||||
table.add("$content." + type.name() + ".name").growX().left().color(Pal.accent);
|
table.add("@content." + type.name() + ".name").growX().left().color(Pal.accent);
|
||||||
table.row();
|
table.row();
|
||||||
table.image().growX().pad(5).padLeft(0).padRight(0).height(3).color(Pal.accent);
|
table.image().growX().pad(5).padLeft(0).padRight(0).height(3).color(Pal.accent);
|
||||||
table.row();
|
table.row();
|
||||||
@@ -69,7 +69,7 @@ public class DatabaseDialog extends BaseDialog{
|
|||||||
image.clicked(() -> {
|
image.clicked(() -> {
|
||||||
if(Core.input.keyDown(KeyCode.shiftLeft) && Fonts.getUnicode(unlock.name) != 0){
|
if(Core.input.keyDown(KeyCode.shiftLeft) && Fonts.getUnicode(unlock.name) != 0){
|
||||||
Core.app.setClipboardText((char)Fonts.getUnicode(unlock.name) + "");
|
Core.app.setClipboardText((char)Fonts.getUnicode(unlock.name) + "");
|
||||||
ui.showInfoFade("$copied");
|
ui.showInfoFade("@copied");
|
||||||
}else{
|
}else{
|
||||||
Vars.ui.content.show(unlock);
|
Vars.ui.content.show(unlock);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,18 +33,18 @@ public class DiscordDialog extends Dialog{
|
|||||||
i.image(Icon.discord);
|
i.image(Icon.discord);
|
||||||
}).size(h).left();
|
}).size(h).left();
|
||||||
|
|
||||||
t.add("$discord").color(Pal.accent).growX().padLeft(10f);
|
t.add("@discord").color(Pal.accent).growX().padLeft(10f);
|
||||||
}).size(440f, h).pad(10f);
|
}).size(440f, h).pad(10f);
|
||||||
|
|
||||||
buttons.defaults().size(150f, 50);
|
buttons.defaults().size(150f, 50);
|
||||||
|
|
||||||
buttons.button("$back", this::hide);
|
buttons.button("@back", this::hide);
|
||||||
buttons.button("$copylink", () -> {
|
buttons.button("@copylink", () -> {
|
||||||
Core.app.setClipboardText(discordURL);
|
Core.app.setClipboardText(discordURL);
|
||||||
});
|
});
|
||||||
buttons.button("$openlink", () -> {
|
buttons.button("@openlink", () -> {
|
||||||
if(!Core.app.openURI(discordURL)){
|
if(!Core.app.openURI(discordURL)){
|
||||||
ui.showErrorMessage("$linkfail");
|
ui.showErrorMessage("@linkfail");
|
||||||
Core.app.setClipboardText(discordURL);
|
Core.app.setClipboardText(discordURL);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class FileChooser extends BaseDialog{
|
|||||||
if(!open) filefield.addInputDialog();
|
if(!open) filefield.addInputDialog();
|
||||||
filefield.setDisabled(open);
|
filefield.setDisabled(open);
|
||||||
|
|
||||||
ok = new TextButton(open ? "$load" : "$save");
|
ok = new TextButton(open ? "@load" : "@save");
|
||||||
|
|
||||||
ok.clicked(() -> {
|
ok.clicked(() -> {
|
||||||
if(ok.isDisabled()) return;
|
if(ok.isDisabled()) return;
|
||||||
@@ -72,7 +72,7 @@ public class FileChooser extends BaseDialog{
|
|||||||
|
|
||||||
filefield.change();
|
filefield.change();
|
||||||
|
|
||||||
TextButton cancel = new TextButton("$cancel");
|
TextButton cancel = new TextButton("@cancel");
|
||||||
cancel.clicked(this::hide);
|
cancel.clicked(this::hide);
|
||||||
|
|
||||||
navigation = new TextField("");
|
navigation = new TextField("");
|
||||||
@@ -119,7 +119,7 @@ public class FileChooser extends BaseDialog{
|
|||||||
icontable.add(up);
|
icontable.add(up);
|
||||||
|
|
||||||
Table fieldcontent = new Table();
|
Table fieldcontent = new Table();
|
||||||
fieldcontent.bottom().left().add(new Label("$filename"));
|
fieldcontent.bottom().left().add(new Label("@filename"));
|
||||||
fieldcontent.add(filefield).height(40f).fillX().expandX().padLeft(10f);
|
fieldcontent.add(filefield).height(40f).fillX().expandX().padLeft(10f);
|
||||||
|
|
||||||
Table buttons = new Table();
|
Table buttons = new Table();
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class GameOverDialog extends BaseDialog{
|
|||||||
private Team winner;
|
private Team winner;
|
||||||
|
|
||||||
public GameOverDialog(){
|
public GameOverDialog(){
|
||||||
super("$gameover");
|
super("@gameover");
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
shown(this::rebuild);
|
shown(this::rebuild);
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ public class GameOverDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void rebuild(){
|
void rebuild(){
|
||||||
title.setText(state.launched ? "$launch.title" : "$gameover");
|
title.setText(state.launched ? "@launch.title" : "@gameover");
|
||||||
buttons.clear();
|
buttons.clear();
|
||||||
cont.clear();
|
cont.clear();
|
||||||
|
|
||||||
@@ -37,13 +37,13 @@ public class GameOverDialog extends BaseDialog{
|
|||||||
|
|
||||||
if(state.rules.pvp){
|
if(state.rules.pvp){
|
||||||
cont.add(Core.bundle.format("gameover.pvp", winner.localized())).pad(6);
|
cont.add(Core.bundle.format("gameover.pvp", winner.localized())).pad(6);
|
||||||
buttons.button("$menu", () -> {
|
buttons.button("@menu", () -> {
|
||||||
hide();
|
hide();
|
||||||
logic.reset();
|
logic.reset();
|
||||||
}).size(130f, 60f);
|
}).size(130f, 60f);
|
||||||
}else{
|
}else{
|
||||||
if(control.isHighScore()){
|
if(control.isHighScore()){
|
||||||
cont.add("$highscore").pad(6);
|
cont.add("@highscore").pad(6);
|
||||||
cont.row();
|
cont.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ public class GameOverDialog extends BaseDialog{
|
|||||||
t.row();
|
t.row();
|
||||||
}
|
}
|
||||||
if(state.isCampaign() && !state.stats.itemsDelivered.isEmpty()){
|
if(state.isCampaign() && !state.stats.itemsDelivered.isEmpty()){
|
||||||
t.add("$stat.delivered");
|
t.add("@stat.delivered");
|
||||||
t.row();
|
t.row();
|
||||||
for(Item item : content.items()){
|
for(Item item : content.items()){
|
||||||
if(state.stats.itemsDelivered.get(item, 0) > 0){
|
if(state.stats.itemsDelivered.get(item, 0) > 0){
|
||||||
@@ -86,13 +86,13 @@ public class GameOverDialog extends BaseDialog{
|
|||||||
}).pad(12);
|
}).pad(12);
|
||||||
|
|
||||||
if(state.isCampaign()){
|
if(state.isCampaign()){
|
||||||
buttons.button("$continue", () -> {
|
buttons.button("@continue", () -> {
|
||||||
hide();
|
hide();
|
||||||
logic.reset();
|
logic.reset();
|
||||||
ui.planet.show();
|
ui.planet.show();
|
||||||
}).size(130f, 60f);
|
}).size(130f, 60f);
|
||||||
}else{
|
}else{
|
||||||
buttons.button("$menu", () -> {
|
buttons.button("@menu", () -> {
|
||||||
hide();
|
hide();
|
||||||
logic.reset();
|
logic.reset();
|
||||||
}).size(130f, 60f);
|
}).size(130f, 60f);
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ public class HostDialog extends BaseDialog{
|
|||||||
float w = 300;
|
float w = 300;
|
||||||
|
|
||||||
public HostDialog(){
|
public HostDialog(){
|
||||||
super("$hostserver");
|
super("@hostserver");
|
||||||
|
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
cont.table(t -> {
|
cont.table(t -> {
|
||||||
t.add("$name").padRight(10);
|
t.add("@name").padRight(10);
|
||||||
t.field(Core.settings.getString("name"), text -> {
|
t.field(Core.settings.getString("name"), text -> {
|
||||||
player.name(text);
|
player.name(text);
|
||||||
Core.settings.put("name", text);
|
Core.settings.put("name", text);
|
||||||
@@ -41,26 +41,26 @@ public class HostDialog extends BaseDialog{
|
|||||||
|
|
||||||
cont.add().width(65f);
|
cont.add().width(65f);
|
||||||
|
|
||||||
cont.button("$host", () -> {
|
cont.button("@host", () -> {
|
||||||
if(Core.settings.getString("name").trim().isEmpty()){
|
if(Core.settings.getString("name").trim().isEmpty()){
|
||||||
ui.showInfo("$noname");
|
ui.showInfo("@noname");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
runHost();
|
runHost();
|
||||||
}).width(w).height(70f);
|
}).width(w).height(70f);
|
||||||
|
|
||||||
cont.button("?", () -> ui.showInfo("$host.info")).size(65f, 70f).padLeft(6f);
|
cont.button("?", () -> ui.showInfo("@host.info")).size(65f, 70f).padLeft(6f);
|
||||||
|
|
||||||
shown(() -> {
|
shown(() -> {
|
||||||
if(!steam){
|
if(!steam){
|
||||||
Core.app.post(() -> Core.settings.getBoolOnce("hostinfo", () -> ui.showInfo("$host.info")));
|
Core.app.post(() -> Core.settings.getBoolOnce("hostinfo", () -> ui.showInfo("@host.info")));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runHost(){
|
public void runHost(){
|
||||||
ui.loadfrag.show("$hosting");
|
ui.loadfrag.show("@hosting");
|
||||||
Time.runTask(5f, () -> {
|
Time.runTask(5f, () -> {
|
||||||
try{
|
try{
|
||||||
net.host(Vars.port);
|
net.host(Vars.port);
|
||||||
@@ -68,7 +68,7 @@ public class HostDialog extends BaseDialog{
|
|||||||
|
|
||||||
if(steam){
|
if(steam){
|
||||||
Core.app.post(() -> Core.settings.getBoolOnce("steampublic2", () -> {
|
Core.app.post(() -> Core.settings.getBoolOnce("steampublic2", () -> {
|
||||||
ui.showCustomConfirm("$setting.publichost.name", "$public.confirm", "$yes", "$no", () -> {
|
ui.showCustomConfirm("@setting.publichost.name", "@public.confirm", "@yes", "@no", () -> {
|
||||||
Core.settings.put("publichost", true);
|
Core.settings.put("publichost", true);
|
||||||
platform.updateLobby();
|
platform.updateLobby();
|
||||||
}, () -> {
|
}, () -> {
|
||||||
@@ -81,10 +81,10 @@ public class HostDialog extends BaseDialog{
|
|||||||
if(Version.modifier.contains("beta")){
|
if(Version.modifier.contains("beta")){
|
||||||
Core.settings.put("publichost", false);
|
Core.settings.put("publichost", false);
|
||||||
platform.updateLobby();
|
platform.updateLobby();
|
||||||
Core.settings.getBoolOnce("betapublic", () -> ui.showInfo("$public.beta"));
|
Core.settings.getBoolOnce("betapublic", () -> ui.showInfo("@public.beta"));
|
||||||
}
|
}
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
ui.showException("$server.error", e);
|
ui.showException("@server.error", e);
|
||||||
}
|
}
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
hide();
|
hide();
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
int totalHosts;
|
int totalHosts;
|
||||||
|
|
||||||
public JoinDialog(){
|
public JoinDialog(){
|
||||||
super("$joingame");
|
super("@joingame");
|
||||||
|
|
||||||
loadServers();
|
loadServers();
|
||||||
|
|
||||||
@@ -41,11 +41,11 @@ public class JoinDialog extends BaseDialog{
|
|||||||
|
|
||||||
buttons.add().growX().width(-1);
|
buttons.add().growX().width(-1);
|
||||||
if(!steam){
|
if(!steam){
|
||||||
buttons.button("?", () -> ui.showInfo("$join.info")).size(60f, 64f).width(-1);
|
buttons.button("?", () -> ui.showInfo("@join.info")).size(60f, 64f).width(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
add = new BaseDialog("$joingame.title");
|
add = new BaseDialog("@joingame.title");
|
||||||
add.cont.add("$joingame.ip").padRight(5f).left();
|
add.cont.add("@joingame.ip").padRight(5f).left();
|
||||||
|
|
||||||
TextField field = add.cont.field(Core.settings.getString("ip"), text -> {
|
TextField field = add.cont.field(Core.settings.getString("ip"), text -> {
|
||||||
Core.settings.put("ip", text);
|
Core.settings.put("ip", text);
|
||||||
@@ -53,8 +53,8 @@ public class JoinDialog extends BaseDialog{
|
|||||||
|
|
||||||
add.cont.row();
|
add.cont.row();
|
||||||
add.buttons.defaults().size(140f, 60f).pad(4f);
|
add.buttons.defaults().size(140f, 60f).pad(4f);
|
||||||
add.buttons.button("$cancel", add::hide);
|
add.buttons.button("@cancel", add::hide);
|
||||||
add.buttons.button("$ok", () -> {
|
add.buttons.button("@ok", () -> {
|
||||||
if(renaming == null){
|
if(renaming == null){
|
||||||
Server server = new Server();
|
Server server = new Server();
|
||||||
server.setIP(Core.settings.getString("ip"));
|
server.setIP(Core.settings.getString("ip"));
|
||||||
@@ -69,7 +69,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
}).disabled(b -> Core.settings.getString("ip").isEmpty() || net.active());
|
}).disabled(b -> Core.settings.getString("ip").isEmpty() || net.active());
|
||||||
|
|
||||||
add.shown(() -> {
|
add.shown(() -> {
|
||||||
add.title.setText(renaming != null ? "$server.edit" : "$server.add");
|
add.title.setText(renaming != null ? "@server.edit" : "@server.add");
|
||||||
if(renaming != null){
|
if(renaming != null){
|
||||||
field.setText(renaming.displayIP());
|
field.setText(renaming.displayIP());
|
||||||
}
|
}
|
||||||
@@ -82,7 +82,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
refreshAll();
|
refreshAll();
|
||||||
|
|
||||||
if(!steam){
|
if(!steam){
|
||||||
Core.app.post(() -> Core.settings.getBoolOnce("joininfo", () -> ui.showInfo("$join.info")));
|
Core.app.post(() -> Core.settings.getBoolOnce("joininfo", () -> ui.showInfo("@join.info")));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
}).margin(3f).pad(2).padTop(6f).top().right();
|
}).margin(3f).pad(2).padTop(6f).top().right();
|
||||||
|
|
||||||
inner.button(Icon.trash, Styles.emptyi, () -> {
|
inner.button(Icon.trash, Styles.emptyi, () -> {
|
||||||
ui.showConfirm("$confirm", "$server.delete", () -> {
|
ui.showConfirm("@confirm", "@server.delete", () -> {
|
||||||
servers.remove(server, true);
|
servers.remove(server, true);
|
||||||
saveServers();
|
saveServers();
|
||||||
setupRemote();
|
setupRemote();
|
||||||
@@ -191,7 +191,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
|
|
||||||
net.pingHost(server.ip, server.port, host -> setupServer(server, host), e -> {
|
net.pingHost(server.ip, server.port, host -> setupServer(server, host), e -> {
|
||||||
server.content.clear();
|
server.content.clear();
|
||||||
server.content.add("$host.invalid").padBottom(4);
|
server.content.add("@host.invalid").padBottom(4);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,9 +242,9 @@ public class JoinDialog extends BaseDialog{
|
|||||||
|
|
||||||
hosts.clear();
|
hosts.clear();
|
||||||
|
|
||||||
section("$servers.local", local);
|
section("@servers.local", local);
|
||||||
section("$servers.remote", remote);
|
section("@servers.remote", remote);
|
||||||
section("$servers.global", global);
|
section("@servers.global", global);
|
||||||
|
|
||||||
ScrollPane pane = new ScrollPane(hosts);
|
ScrollPane pane = new ScrollPane(hosts);
|
||||||
pane.setFadeScrollBars(false);
|
pane.setFadeScrollBars(false);
|
||||||
@@ -254,7 +254,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
|
|
||||||
cont.clear();
|
cont.clear();
|
||||||
cont.table(t -> {
|
cont.table(t -> {
|
||||||
t.add("$name").padRight(10);
|
t.add("@name").padRight(10);
|
||||||
if(!steam){
|
if(!steam){
|
||||||
t.field(Core.settings.getString("name"), text -> {
|
t.field(Core.settings.getString("name"), text -> {
|
||||||
player.name(text);
|
player.name(text);
|
||||||
@@ -275,7 +275,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
cont.row();
|
cont.row();
|
||||||
cont.add(pane).width(w + 38).pad(0);
|
cont.add(pane).width(w + 38).pad(0);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.buttonCenter("$server.add", Icon.add, () -> {
|
cont.buttonCenter("@server.add", Icon.add, () -> {
|
||||||
renaming = null;
|
renaming = null;
|
||||||
add.show();
|
add.show();
|
||||||
}).marginLeft(10).width(w).height(80f).update(button -> {
|
}).marginLeft(10).width(w).height(80f).update(button -> {
|
||||||
@@ -340,7 +340,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
if(totalHosts == 0){
|
if(totalHosts == 0){
|
||||||
local.clear();
|
local.clear();
|
||||||
local.background(Tex.button);
|
local.background(Tex.button);
|
||||||
local.add("$hosts.none").pad(10f);
|
local.add("@hosts.none").pad(10f);
|
||||||
local.add().growX();
|
local.add().growX();
|
||||||
local.button(Icon.refresh, this::refreshLocal).pad(-12f).padLeft(0).size(70f);
|
local.button(Icon.refresh, this::refreshLocal).pad(-12f).padLeft(0).size(70f);
|
||||||
}else{
|
}else{
|
||||||
@@ -378,11 +378,11 @@ public class JoinDialog extends BaseDialog{
|
|||||||
|
|
||||||
public void connect(String ip, int port){
|
public void connect(String ip, int port){
|
||||||
if(player.name.trim().isEmpty()){
|
if(player.name.trim().isEmpty()){
|
||||||
ui.showInfo("$noname");
|
ui.showInfo("@noname");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.loadfrag.show("$connecting");
|
ui.loadfrag.show("@connecting");
|
||||||
|
|
||||||
ui.loadfrag.setButton(() -> {
|
ui.loadfrag.setButton(() -> {
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class LanguageDialog extends BaseDialog{
|
|||||||
);
|
);
|
||||||
|
|
||||||
public LanguageDialog(){
|
public LanguageDialog(){
|
||||||
super("$settings.language");
|
super("@settings.language");
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
setup();
|
setup();
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ public class LanguageDialog extends BaseDialog{
|
|||||||
if(getLocale().equals(loc)) return;
|
if(getLocale().equals(loc)) return;
|
||||||
Core.settings.put("locale", loc.toString());
|
Core.settings.put("locale", loc.toString());
|
||||||
Log.info("Setting locale: @", loc.toString());
|
Log.info("Setting locale: @", loc.toString());
|
||||||
ui.showInfo("$language.restart");
|
ui.showInfo("@language.restart");
|
||||||
});
|
});
|
||||||
langs.add(button).group(group).update(t -> t.setChecked(loc.equals(getLocale()))).size(400f, 50f).row();
|
langs.add(button).group(group).update(t -> t.setChecked(loc.equals(getLocale()))).size(400f, 50f).row();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
boolean valid;
|
boolean valid;
|
||||||
|
|
||||||
public LaunchLoadoutDialog(){
|
public LaunchLoadoutDialog(){
|
||||||
super("$configure");
|
super("@configure");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show(CoreBlock core, Building build, Runnable confirm){
|
public void show(CoreBlock core, Building build, Runnable confirm){
|
||||||
@@ -70,7 +70,7 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
|
|
||||||
Runnable rebuildItems = () -> rebuild.get(items);
|
Runnable rebuildItems = () -> rebuild.get(items);
|
||||||
|
|
||||||
buttons.button("$resources", Icon.terrain, () -> {
|
buttons.button("@resources", Icon.terrain, () -> {
|
||||||
loadout.show(core.itemCapacity, stacks, stacks::clear, () -> {}, () -> {
|
loadout.show(core.itemCapacity, stacks, stacks::clear, () -> {}, () -> {
|
||||||
universe.updateLaunchResources(stacks);
|
universe.updateLaunchResources(stacks);
|
||||||
update.run();
|
update.run();
|
||||||
@@ -78,7 +78,7 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
buttons.button("$launch.text", Icon.ok, () -> {
|
buttons.button("@launch.text", Icon.ok, () -> {
|
||||||
universe.updateLoadout(core, selected);
|
universe.updateLoadout(core, selected);
|
||||||
confirm.run();
|
confirm.run();
|
||||||
hide();
|
hide();
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class LoadDialog extends BaseDialog{
|
|||||||
Table slots;
|
Table slots;
|
||||||
|
|
||||||
public LoadDialog(){
|
public LoadDialog(){
|
||||||
this("$loadgame");
|
this("@loadgame");
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoadDialog(String title){
|
public LoadDialog(String title){
|
||||||
@@ -80,14 +80,14 @@ public class LoadDialog extends BaseDialog{
|
|||||||
}).checked(slot.isAutosave()).right();
|
}).checked(slot.isAutosave()).right();
|
||||||
|
|
||||||
t.button(Icon.trash, Styles.emptyi, () -> {
|
t.button(Icon.trash, Styles.emptyi, () -> {
|
||||||
ui.showConfirm("$confirm", "$save.delete.confirm", () -> {
|
ui.showConfirm("@confirm", "@save.delete.confirm", () -> {
|
||||||
slot.delete();
|
slot.delete();
|
||||||
setup();
|
setup();
|
||||||
});
|
});
|
||||||
}).right();
|
}).right();
|
||||||
|
|
||||||
t.button(Icon.pencil, Styles.emptyi, () -> {
|
t.button(Icon.pencil, Styles.emptyi, () -> {
|
||||||
ui.showTextInput("$save.rename", "$save.rename.text", slot.getName(), text -> {
|
ui.showTextInput("@save.rename", "@save.rename.text", slot.getName(), text -> {
|
||||||
slot.setName(text);
|
slot.setName(text);
|
||||||
setup();
|
setup();
|
||||||
});
|
});
|
||||||
@@ -141,7 +141,7 @@ public class LoadDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!any){
|
if(!any){
|
||||||
slots.button("$save.none", () -> {}).disabled(true).fillX().margin(20f).minWidth(340f).height(80f).pad(4f);
|
slots.button("@save.none", () -> {}).disabled(true).fillX().margin(20f).minWidth(340f).height(80f).pad(4f);
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.add(pane);
|
cont.add(pane);
|
||||||
@@ -149,7 +149,7 @@ public class LoadDialog extends BaseDialog{
|
|||||||
|
|
||||||
public void addSetup(){
|
public void addSetup(){
|
||||||
|
|
||||||
buttons.button("$save.import", Icon.add, () -> {
|
buttons.button("@save.import", Icon.add, () -> {
|
||||||
platform.showFileChooser(true, saveExtension, file -> {
|
platform.showFileChooser(true, saveExtension, file -> {
|
||||||
if(SaveIO.isSaveValid(file)){
|
if(SaveIO.isSaveValid(file)){
|
||||||
try{
|
try{
|
||||||
@@ -157,10 +157,10 @@ public class LoadDialog extends BaseDialog{
|
|||||||
setup();
|
setup();
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ui.showException("$save.import.fail", e);
|
ui.showException("@save.import.fail", e);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("$save.import.invalid");
|
ui.showErrorMessage("@save.import.invalid");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).fillX().margin(10f);
|
}).fillX().margin(10f);
|
||||||
@@ -180,7 +180,7 @@ public class LoadDialog extends BaseDialog{
|
|||||||
}catch(SaveException e){
|
}catch(SaveException e){
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
logic.reset();
|
logic.reset();
|
||||||
ui.showErrorMessage("$save.corrupted");
|
ui.showErrorMessage("@save.corrupted");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class LoadoutDialog extends BaseDialog{
|
|||||||
private int capacity;
|
private int capacity;
|
||||||
|
|
||||||
public LoadoutDialog(){
|
public LoadoutDialog(){
|
||||||
super("$configure");
|
super("@configure");
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
|
|
||||||
keyDown(key -> {
|
keyDown(key -> {
|
||||||
@@ -41,9 +41,9 @@ public class LoadoutDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
buttons.button("$back", Icon.left, this::hide).size(210f, 64f);
|
buttons.button("@back", Icon.left, this::hide).size(210f, 64f);
|
||||||
|
|
||||||
buttons.button("$settings.reset", Icon.refresh, () -> {
|
buttons.button("@settings.reset", Icon.refresh, () -> {
|
||||||
resetter.run();
|
resetter.run();
|
||||||
reseed();
|
reseed();
|
||||||
updater.run();
|
updater.run();
|
||||||
@@ -81,7 +81,7 @@ public class LoadoutDialog extends BaseDialog{
|
|||||||
updater.run();
|
updater.run();
|
||||||
}).size(bsize);
|
}).size(bsize);
|
||||||
|
|
||||||
t.button(Icon.pencil, Styles.cleari, () -> ui.showTextInput("$configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
|
t.button(Icon.pencil, Styles.cleari, () -> ui.showTextInput("@configure", stack.item.localizedName, 10, stack.amount + "", true, str -> {
|
||||||
if(Strings.canParsePositiveInt(str)){
|
if(Strings.canParsePositiveInt(str)){
|
||||||
int amount = Strings.parseInt(str);
|
int amount = Strings.parseInt(str);
|
||||||
if(amount >= 0 && amount <= capacity){
|
if(amount >= 0 && amount <= capacity){
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class MapPlayDialog extends BaseDialog{
|
|||||||
rules = map.applyRules(selectedGamemode);
|
rules = map.applyRules(selectedGamemode);
|
||||||
|
|
||||||
Table selmode = new Table();
|
Table selmode = new Table();
|
||||||
selmode.add("$level.mode").colspan(4);
|
selmode.add("@level.mode").colspan(4);
|
||||||
selmode.row();
|
selmode.row();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ public class MapPlayDialog extends BaseDialog{
|
|||||||
|
|
||||||
cont.add(selmode);
|
cont.add(selmode);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.button("$customize", Icon.settings, () -> dialog.show(rules, () -> rules = map.applyRules(selectedGamemode))).width(230);
|
cont.button("@customize", Icon.settings, () -> dialog.show(rules, () -> rules = map.applyRules(selectedGamemode))).width(230);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add(new BorderImage(map.safeTexture(), 3f)).size(mobile && !Core.graphics.isPortrait() ? 150f : 250f).get().setScaling(Scaling.fit);
|
cont.add(new BorderImage(map.safeTexture(), 3f)).size(mobile && !Core.graphics.isPortrait() ? 150f : 250f).get().setScaling(Scaling.fit);
|
||||||
//only maps with survival are valid for high scores
|
//only maps with survival are valid for high scores
|
||||||
@@ -79,7 +79,7 @@ public class MapPlayDialog extends BaseDialog{
|
|||||||
buttons.clearChildren();
|
buttons.clearChildren();
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
buttons.button("$play", Icon.play, () -> {
|
buttons.button("@play", Icon.play, () -> {
|
||||||
control.playMap(map, rules);
|
control.playMap(map, rules);
|
||||||
hide();
|
hide();
|
||||||
ui.custom.hide();
|
ui.custom.hide();
|
||||||
@@ -103,7 +103,7 @@ public class MapPlayDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
d.cont.add(pane);
|
d.cont.add(pane);
|
||||||
d.buttons.button("$ok", d::hide).size(110, 50).pad(10f);
|
d.buttons.button("@ok", d::hide).size(110, 50).pad(10f);
|
||||||
d.show();
|
d.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class MapsDialog extends BaseDialog{
|
|||||||
private BaseDialog dialog;
|
private BaseDialog dialog;
|
||||||
|
|
||||||
public MapsDialog(){
|
public MapsDialog(){
|
||||||
super("$maps");
|
super("@maps");
|
||||||
|
|
||||||
buttons.remove();
|
buttons.remove();
|
||||||
|
|
||||||
@@ -43,14 +43,14 @@ public class MapsDialog extends BaseDialog{
|
|||||||
buttons.clearChildren();
|
buttons.clearChildren();
|
||||||
|
|
||||||
if(Core.graphics.isPortrait()){
|
if(Core.graphics.isPortrait()){
|
||||||
buttons.button("$back", Icon.left, this::hide).size(210f*2f, 64f).colspan(2);
|
buttons.button("@back", Icon.left, this::hide).size(210f*2f, 64f).colspan(2);
|
||||||
buttons.row();
|
buttons.row();
|
||||||
}else{
|
}else{
|
||||||
buttons.button("$back", Icon.left, this::hide).size(210f, 64f);
|
buttons.button("@back", Icon.left, this::hide).size(210f, 64f);
|
||||||
}
|
}
|
||||||
|
|
||||||
buttons.button("$editor.newmap", Icon.add, () -> {
|
buttons.button("@editor.newmap", Icon.add, () -> {
|
||||||
ui.showTextInput("$editor.newmap", "$editor.mapname", "", text -> {
|
ui.showTextInput("@editor.newmap", "@editor.mapname", "", text -> {
|
||||||
Runnable show = () -> ui.loadAnd(() -> {
|
Runnable show = () -> ui.loadAnd(() -> {
|
||||||
hide();
|
hide();
|
||||||
ui.editor.show();
|
ui.editor.show();
|
||||||
@@ -59,19 +59,19 @@ public class MapsDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(maps.byName(text) != null){
|
if(maps.byName(text) != null){
|
||||||
ui.showErrorMessage("$editor.exists");
|
ui.showErrorMessage("@editor.exists");
|
||||||
}else{
|
}else{
|
||||||
show.run();
|
show.run();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).size(210f, 64f);
|
}).size(210f, 64f);
|
||||||
|
|
||||||
buttons.button("$editor.importmap", Icon.upload, () -> {
|
buttons.button("@editor.importmap", Icon.upload, () -> {
|
||||||
platform.showFileChooser(true, mapExtension, file -> {
|
platform.showFileChooser(true, mapExtension, file -> {
|
||||||
ui.loadAnd(() -> {
|
ui.loadAnd(() -> {
|
||||||
maps.tryCatchMapError(() -> {
|
maps.tryCatchMapError(() -> {
|
||||||
if(MapIO.isImage(file)){
|
if(MapIO.isImage(file)){
|
||||||
ui.showErrorMessage("$editor.errorimage");
|
ui.showErrorMessage("@editor.errorimage");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ public class MapsDialog extends BaseDialog{
|
|||||||
|
|
||||||
//this will never actually get called, but it remains just in case
|
//this will never actually get called, but it remains just in case
|
||||||
if(name == null){
|
if(name == null){
|
||||||
ui.showErrorMessage("$editor.errorname");
|
ui.showErrorMessage("@editor.errorname");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ public class MapsDialog extends BaseDialog{
|
|||||||
if(conflict != null && !conflict.custom){
|
if(conflict != null && !conflict.custom){
|
||||||
ui.showInfo(Core.bundle.format("editor.import.exists", name));
|
ui.showInfo(Core.bundle.format("editor.import.exists", name));
|
||||||
}else if(conflict != null){
|
}else if(conflict != null){
|
||||||
ui.showConfirm("$confirm", Core.bundle.format("editor.overwrite.confirm", map.name()), () -> {
|
ui.showConfirm("@confirm", Core.bundle.format("editor.overwrite.confirm", map.name()), () -> {
|
||||||
maps.tryCatchMapError(() -> {
|
maps.tryCatchMapError(() -> {
|
||||||
maps.removeMap(conflict);
|
maps.removeMap(conflict);
|
||||||
maps.importMap(map.file);
|
maps.importMap(map.file);
|
||||||
@@ -142,13 +142,13 @@ public class MapsDialog extends BaseDialog{
|
|||||||
button.row();
|
button.row();
|
||||||
button.stack(new Image(map.safeTexture()).setScaling(Scaling.fit), new BorderImage(map.safeTexture()).setScaling(Scaling.fit)).size(mapsize - 20f);
|
button.stack(new Image(map.safeTexture()).setScaling(Scaling.fit), new BorderImage(map.safeTexture()).setScaling(Scaling.fit)).size(mapsize - 20f);
|
||||||
button.row();
|
button.row();
|
||||||
button.add(map.custom ? "$custom" : map.workshop ? "$workshop" : map.mod != null ? "[lightgray]" + map.mod.meta.displayName() : "$builtin").color(Color.gray).padTop(3);
|
button.add(map.custom ? "@custom" : map.workshop ? "@workshop" : map.mod != null ? "[lightgray]" + map.mod.meta.displayName() : "@builtin").color(Color.gray).padTop(3);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Vars.maps.all().size == 0){
|
if(Vars.maps.all().size == 0){
|
||||||
maps.add("$maps.none");
|
maps.add("@maps.none");
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.add(buttons).growX();
|
cont.add(buttons).growX();
|
||||||
@@ -157,7 +157,7 @@ public class MapsDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showMapInfo(Map map){
|
void showMapInfo(Map map){
|
||||||
dialog = new BaseDialog("$editor.mapinfo");
|
dialog = new BaseDialog("@editor.mapinfo");
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
|
|
||||||
float mapsize = Core.graphics.isPortrait() ? 160f : 300f;
|
float mapsize = Core.graphics.isPortrait() ? 160f : 300f;
|
||||||
@@ -176,37 +176,37 @@ public class MapsDialog extends BaseDialog{
|
|||||||
t.top();
|
t.top();
|
||||||
t.defaults().padTop(10).left();
|
t.defaults().padTop(10).left();
|
||||||
|
|
||||||
t.add("$editor.mapname").padRight(10).color(Color.gray).padTop(0);
|
t.add("@editor.mapname").padRight(10).color(Color.gray).padTop(0);
|
||||||
t.row();
|
t.row();
|
||||||
t.add(map.name()).growX().wrap().padTop(2);
|
t.add(map.name()).growX().wrap().padTop(2);
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.author").padRight(10).color(Color.gray);
|
t.add("@editor.author").padRight(10).color(Color.gray);
|
||||||
t.row();
|
t.row();
|
||||||
t.add(!map.custom && map.author().isEmpty() ? "Anuke" : map.author()).growX().wrap().padTop(2);
|
t.add(!map.custom && map.author().isEmpty() ? "Anuke" : map.author()).growX().wrap().padTop(2);
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.description").padRight(10).color(Color.gray).top();
|
t.add("@editor.description").padRight(10).color(Color.gray).top();
|
||||||
t.row();
|
t.row();
|
||||||
t.add(map.description()).growX().wrap().padTop(2);
|
t.add(map.description()).growX().wrap().padTop(2);
|
||||||
}).height(mapsize).width(mapsize);
|
}).height(mapsize).width(mapsize);
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
table.button("$editor.openin", Icon.export, () -> {
|
table.button("@editor.openin", Icon.export, () -> {
|
||||||
try{
|
try{
|
||||||
Vars.ui.editor.beginEditMap(map.file);
|
Vars.ui.editor.beginEditMap(map.file);
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
hide();
|
hide();
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ui.showErrorMessage("$error.mapnotfound");
|
ui.showErrorMessage("@error.mapnotfound");
|
||||||
}
|
}
|
||||||
}).fillX().height(54f).marginLeft(10);
|
}).fillX().height(54f).marginLeft(10);
|
||||||
|
|
||||||
table.button(map.workshop && steam ? "$view.workshop" : "$delete", map.workshop && steam ? Icon.link : Icon.trash, () -> {
|
table.button(map.workshop && steam ? "@view.workshop" : "@delete", map.workshop && steam ? Icon.link : Icon.trash, () -> {
|
||||||
if(map.workshop && steam){
|
if(map.workshop && steam){
|
||||||
platform.viewListing(map);
|
platform.viewListing(map);
|
||||||
}else{
|
}else{
|
||||||
ui.showConfirm("$confirm", Core.bundle.format("map.delete", map.name()), () -> {
|
ui.showConfirm("@confirm", Core.bundle.format("map.delete", map.name()), () -> {
|
||||||
maps.removeMap(map);
|
maps.removeMap(map);
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
setup();
|
setup();
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import static mindustry.Vars.renderer;
|
|||||||
public class MinimapDialog extends BaseDialog{
|
public class MinimapDialog extends BaseDialog{
|
||||||
|
|
||||||
public MinimapDialog(){
|
public MinimapDialog(){
|
||||||
super("$minimap");
|
super("@minimap");
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ import static mindustry.Vars.*;
|
|||||||
public class ModsDialog extends BaseDialog{
|
public class ModsDialog extends BaseDialog{
|
||||||
|
|
||||||
public ModsDialog(){
|
public ModsDialog(){
|
||||||
super("$mods");
|
super("@mods");
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
buttons.button("$mods.guide", Icon.link, () -> Core.app.openURI(modGuideURL)).size(210, 64f);
|
buttons.button("@mods.guide", Icon.link, () -> Core.app.openURI(modGuideURL)).size(210, 64f);
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
shown(() -> Core.app.post(() -> {
|
shown(() -> Core.app.post(() -> {
|
||||||
Core.settings.getBoolOnce("modsalpha", () -> {
|
Core.settings.getBoolOnce("modsalpha", () -> {
|
||||||
ui.showText("$mods", "$mods.alphainfo");
|
ui.showText("@mods", "@mods.alphainfo");
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
|
|
||||||
if(Strings.getCauses(error).contains(t -> t.getMessage() != null && (t.getMessage().contains("trust anchor") || t.getMessage().contains("SSL") || t.getMessage().contains("protocol")))){
|
if(Strings.getCauses(error).contains(t -> t.getMessage() != null && (t.getMessage().contains("trust anchor") || t.getMessage().contains("SSL") || t.getMessage().contains("protocol")))){
|
||||||
ui.showErrorMessage("$feature.unsupported");
|
ui.showErrorMessage("@feature.unsupported");
|
||||||
}else{
|
}else{
|
||||||
ui.showException(error);
|
ui.showException(error);
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
cont.clear();
|
cont.clear();
|
||||||
cont.defaults().width(mobile ? 500 : 560f).pad(4);
|
cont.defaults().width(mobile ? 500 : 560f).pad(4);
|
||||||
cont.add("$mod.reloadrequired").visible(mods::requiresReload).center().get().setAlignment(Align.center);
|
cont.add("@mod.reloadrequired").visible(mods::requiresReload).center().get().setAlignment(Align.center);
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
cont.table(buttons -> {
|
cont.table(buttons -> {
|
||||||
@@ -65,8 +65,8 @@ public class ModsDialog extends BaseDialog{
|
|||||||
TextButtonStyle style = Styles.clearPartialt;
|
TextButtonStyle style = Styles.clearPartialt;
|
||||||
float margin = 12f;
|
float margin = 12f;
|
||||||
|
|
||||||
buttons.button("$mod.import", Icon.add, style, () -> {
|
buttons.button("@mod.import", Icon.add, style, () -> {
|
||||||
BaseDialog dialog = new BaseDialog("$mod.import");
|
BaseDialog dialog = new BaseDialog("@mod.import");
|
||||||
|
|
||||||
TextButtonStyle bstyle = Styles.cleart;
|
TextButtonStyle bstyle = Styles.cleart;
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
t.defaults().size(300f, 70f);
|
t.defaults().size(300f, 70f);
|
||||||
t.margin(12f);
|
t.margin(12f);
|
||||||
|
|
||||||
t.button("$mod.import.file", Icon.file, bstyle, () -> {
|
t.button("@mod.import.file", Icon.file, bstyle, () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
|
|
||||||
platform.showMultiFileChooser(file -> {
|
platform.showMultiFileChooser(file -> {
|
||||||
@@ -90,7 +90,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
//show unsafe jar file warning
|
//show unsafe jar file warning
|
||||||
if(file.extEquals("jar")){
|
if(file.extEquals("jar")){
|
||||||
ui.showConfirm("$warning", "$mod.jarwarn", go);
|
ui.showConfirm("@warning", "@mod.jarwarn", go);
|
||||||
}else{
|
}else{
|
||||||
go.run();
|
go.run();
|
||||||
}
|
}
|
||||||
@@ -99,10 +99,10 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.button("$mod.import.github", Icon.github, bstyle, () -> {
|
t.button("@mod.import.github", Icon.github, bstyle, () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
|
|
||||||
ui.showTextInput("$mod.import.github", "", 64, Core.settings.getString("lastmod", "Anuken/ExampleMod"), text -> {
|
ui.showTextInput("@mod.import.github", "", 64, Core.settings.getString("lastmod", "Anuken/ExampleMod"), text -> {
|
||||||
Core.settings.put("lastmod", text);
|
Core.settings.put("lastmod", text);
|
||||||
|
|
||||||
ui.loadfrag.show();
|
ui.loadfrag.show();
|
||||||
@@ -141,7 +141,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
}).margin(margin);
|
}).margin(margin);
|
||||||
|
|
||||||
if(!mobile){
|
if(!mobile){
|
||||||
buttons.button("$mods.openfolder", Icon.link, style, () -> Core.app.openFolder(modDirectory.absolutePath())).margin(margin);
|
buttons.button("@mods.openfolder", Icon.link, style, () -> Core.app.openFolder(modDirectory.absolutePath())).margin(margin);
|
||||||
}
|
}
|
||||||
}).width(w);
|
}).width(w);
|
||||||
|
|
||||||
@@ -196,14 +196,14 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
t.table(right -> {
|
t.table(right -> {
|
||||||
right.right();
|
right.right();
|
||||||
right.button(mod.enabled() ? "$mod.disable" : "$mod.enable", mod.enabled() ? Icon.downOpen : Icon.upOpen, Styles.transt, () -> {
|
right.button(mod.enabled() ? "@mod.disable" : "@mod.enable", mod.enabled() ? Icon.downOpen : Icon.upOpen, Styles.transt, () -> {
|
||||||
mods.setEnabled(mod, !mod.enabled());
|
mods.setEnabled(mod, !mod.enabled());
|
||||||
setup();
|
setup();
|
||||||
}).height(50f).margin(8f).width(130f).disabled(!mod.isSupported());
|
}).height(50f).margin(8f).width(130f).disabled(!mod.isSupported());
|
||||||
|
|
||||||
right.button(mod.hasSteamID() ? Icon.link : Icon.trash, Styles.clearPartiali, () -> {
|
right.button(mod.hasSteamID() ? Icon.link : Icon.trash, Styles.clearPartiali, () -> {
|
||||||
if(!mod.hasSteamID()){
|
if(!mod.hasSteamID()){
|
||||||
ui.showConfirm("$confirm", "$mod.remove.confirm", () -> {
|
ui.showConfirm("@confirm", "@mod.remove.confirm", () -> {
|
||||||
mods.removeMod(mod);
|
mods.removeMod(mod);
|
||||||
setup();
|
setup();
|
||||||
});
|
});
|
||||||
@@ -228,7 +228,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
t.labelWrap(Core.bundle.format("mod.missingdependencies", mod.missingDependencies.toString(", "))).growX();
|
t.labelWrap(Core.bundle.format("mod.missingdependencies", mod.missingDependencies.toString(", "))).growX();
|
||||||
t.row();
|
t.row();
|
||||||
}else if(mod.hasContentErrors()){
|
}else if(mod.hasContentErrors()){
|
||||||
t.labelWrap("$mod.erroredcontent").growX();
|
t.labelWrap("@mod.erroredcontent").growX();
|
||||||
t.row();
|
t.row();
|
||||||
}
|
}
|
||||||
}, Styles.clearPartialt, () -> showMod(mod)).size(w, h).growX().pad(4f);
|
}, Styles.clearPartialt, () -> showMod(mod)).size(w, h).growX().pad(4f);
|
||||||
@@ -237,7 +237,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
cont.table(Styles.black6, t -> t.add("$mods.none")).height(80f);
|
cont.table(Styles.black6, t -> t.add("@mods.none")).height(80f);
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
@@ -246,7 +246,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void reload(){
|
private void reload(){
|
||||||
ui.showInfo("$mods.reloadexit", () -> Core.app.exit());
|
ui.showInfo("@mods.reloadexit", () -> Core.app.exit());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showMod(LoadedMod mod){
|
private void showMod(LoadedMod mod){
|
||||||
@@ -255,7 +255,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
|
|
||||||
if(!mobile){
|
if(!mobile){
|
||||||
dialog.buttons.button("$mods.openfolder", Icon.link, () -> Core.app.openFolder(mod.file.absolutePath()));
|
dialog.buttons.button("@mods.openfolder", Icon.link, () -> Core.app.openFolder(mod.file.absolutePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO improve this menu later
|
//TODO improve this menu later
|
||||||
@@ -263,18 +263,18 @@ public class ModsDialog extends BaseDialog{
|
|||||||
desc.center();
|
desc.center();
|
||||||
desc.defaults().padTop(10).left();
|
desc.defaults().padTop(10).left();
|
||||||
|
|
||||||
desc.add("$editor.name").padRight(10).color(Color.gray).padTop(0);
|
desc.add("@editor.name").padRight(10).color(Color.gray).padTop(0);
|
||||||
desc.row();
|
desc.row();
|
||||||
desc.add(mod.meta.displayName()).growX().wrap().padTop(2);
|
desc.add(mod.meta.displayName()).growX().wrap().padTop(2);
|
||||||
desc.row();
|
desc.row();
|
||||||
if(mod.meta.author != null){
|
if(mod.meta.author != null){
|
||||||
desc.add("$editor.author").padRight(10).color(Color.gray);
|
desc.add("@editor.author").padRight(10).color(Color.gray);
|
||||||
desc.row();
|
desc.row();
|
||||||
desc.add(mod.meta.author).growX().wrap().padTop(2);
|
desc.add(mod.meta.author).growX().wrap().padTop(2);
|
||||||
desc.row();
|
desc.row();
|
||||||
}
|
}
|
||||||
if(mod.meta.description != null){
|
if(mod.meta.description != null){
|
||||||
desc.add("$editor.description").padRight(10).color(Color.gray).top();
|
desc.add("@editor.description").padRight(10).color(Color.gray).top();
|
||||||
desc.row();
|
desc.row();
|
||||||
desc.add(mod.meta.description).growX().wrap().padTop(2);
|
desc.add(mod.meta.description).growX().wrap().padTop(2);
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
/*
|
/*
|
||||||
Array<UnlockableContent> all = Array.with(content.getContentMap()).<Content>flatten().select(c -> c.minfo.mod == mod && c instanceof UnlockableContent).as(UnlockableContent.class);
|
Array<UnlockableContent> all = Array.with(content.getContentMap()).<Content>flatten().select(c -> c.minfo.mod == mod && c instanceof UnlockableContent).as(UnlockableContent.class);
|
||||||
if(all.any()){
|
if(all.any()){
|
||||||
desc.add("$mod.content").padRight(10).color(Color.gray).top();
|
desc.add("@mod.content").padRight(10).color(Color.gray).top();
|
||||||
desc.row();
|
desc.row();
|
||||||
desc.pane(cs -> {
|
desc.pane(cs -> {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class PausedDialog extends BaseDialog{
|
|||||||
private boolean wasClient = false;
|
private boolean wasClient = false;
|
||||||
|
|
||||||
public PausedDialog(){
|
public PausedDialog(){
|
||||||
super("$menu");
|
super("@menu");
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
|
|
||||||
shown(this::rebuild);
|
shown(this::rebuild);
|
||||||
@@ -44,28 +44,28 @@ public class PausedDialog extends BaseDialog{
|
|||||||
float dw = 220f;
|
float dw = 220f;
|
||||||
cont.defaults().width(dw).height(55).pad(5f);
|
cont.defaults().width(dw).height(55).pad(5f);
|
||||||
|
|
||||||
cont.button("$back", Icon.left, this::hide).colspan(2).width(dw * 2 + 20f);
|
cont.button("@back", Icon.left, this::hide).colspan(2).width(dw * 2 + 20f);
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
//if(state.isCampaign()){
|
//if(state.isCampaign()){
|
||||||
// cont.button("$techtree", Icon.tree, ui.tech::show);
|
// cont.button("@techtree", Icon.tree, ui.tech::show);
|
||||||
//}else{
|
//}else{
|
||||||
// cont.button("$database", Icon.book, ui.database::show);
|
// cont.button("@database", Icon.book, ui.database::show);
|
||||||
//}
|
//}
|
||||||
//TODO remove
|
//TODO remove
|
||||||
cont.button("nothing", Icon.warning, () -> ui.showInfo("no"));
|
cont.button("nothing", Icon.warning, () -> ui.showInfo("no"));
|
||||||
cont.button("$settings", Icon.settings, ui.settings::show);
|
cont.button("@settings", Icon.settings, ui.settings::show);
|
||||||
|
|
||||||
if(!state.rules.tutorial){
|
if(!state.rules.tutorial){
|
||||||
if(!state.isCampaign() && !state.isEditor()){
|
if(!state.isCampaign() && !state.isEditor()){
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.button("$savegame", Icon.save, save::show);
|
cont.button("@savegame", Icon.save, save::show);
|
||||||
cont.button("$loadgame", Icon.upload, load::show).disabled(b -> net.active());
|
cont.button("@loadgame", Icon.upload, load::show).disabled(b -> net.active());
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
cont.button("$hostserver", Icon.host, () -> {
|
cont.button("@hostserver", Icon.host, () -> {
|
||||||
if(net.server() && steam){
|
if(net.server() && steam){
|
||||||
platform.inviteFriends();
|
platform.inviteFriends();
|
||||||
}else{
|
}else{
|
||||||
@@ -75,39 +75,39 @@ public class PausedDialog extends BaseDialog{
|
|||||||
ui.host.show();
|
ui.host.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).disabled(b -> !((steam && net.server()) || !net.active())).colspan(2).width(dw * 2 + 20f).update(e -> e.setText(net.server() && steam ? "$invitefriends" : "$hostserver"));
|
}).disabled(b -> !((steam && net.server()) || !net.active())).colspan(2).width(dw * 2 + 20f).update(e -> e.setText(net.server() && steam ? "@invitefriends" : "@hostserver"));
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
cont.button("$quit", Icon.exit, this::showQuitConfirm).colspan(2).width(dw + 20f).update(s -> s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "$save.quit" : "$quit"));
|
cont.button("@quit", Icon.exit, this::showQuitConfirm).colspan(2).width(dw + 20f).update(s -> s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "@save.quit" : "@quit"));
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
cont.defaults().size(130f).pad(5);
|
cont.defaults().size(130f).pad(5);
|
||||||
cont.buttonRow("$back", Icon.play, this::hide);
|
cont.buttonRow("@back", Icon.play, this::hide);
|
||||||
cont.buttonRow("$settings", Icon.settings, ui.settings::show);
|
cont.buttonRow("@settings", Icon.settings, ui.settings::show);
|
||||||
|
|
||||||
if(!state.isCampaign() && !state.isEditor()){
|
if(!state.isCampaign() && !state.isEditor()){
|
||||||
cont.buttonRow("$save", Icon.save, save::show);
|
cont.buttonRow("@save", Icon.save, save::show);
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
cont.buttonRow("$load", Icon.download, load::show).disabled(b -> net.active());
|
cont.buttonRow("@load", Icon.download, load::show).disabled(b -> net.active());
|
||||||
}else{
|
}else{
|
||||||
cont.row();
|
cont.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.buttonRow("$hostserver.mobile", Icon.host, ui.host::show).disabled(b -> net.active());
|
cont.buttonRow("@hostserver.mobile", Icon.host, ui.host::show).disabled(b -> net.active());
|
||||||
|
|
||||||
cont.buttonRow("$quit", Icon.exit, this::showQuitConfirm).update(s -> {
|
cont.buttonRow("@quit", Icon.exit, this::showQuitConfirm).update(s -> {
|
||||||
s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "$save.quit" : "$quit");
|
s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "@save.quit" : "@quit");
|
||||||
s.getLabelCell().growX().wrap();
|
s.getLabelCell().growX().wrap();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showQuitConfirm(){
|
void showQuitConfirm(){
|
||||||
ui.showConfirm("$confirm", state.rules.tutorial ? "$quit.confirm.tutorial" : "$quit.confirm", () -> {
|
ui.showConfirm("@confirm", state.rules.tutorial ? "@quit.confirm.tutorial" : "@quit.confirm", () -> {
|
||||||
if(state.rules.tutorial){
|
if(state.rules.tutorial){
|
||||||
Core.settings.put("playedtutorial", true);
|
Core.settings.put("playedtutorial", true);
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ public class PausedDialog extends BaseDialog{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.loadAnd("$saving", () -> {
|
ui.loadAnd("@saving", () -> {
|
||||||
try{
|
try{
|
||||||
control.saves.getCurrent().save();
|
control.saves.getCurrent().save();
|
||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
|
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
buttons.button("$database", Icon.book, () -> {
|
buttons.button("@database", Icon.book, () -> {
|
||||||
hide();
|
hide();
|
||||||
ui.database.show();
|
ui.database.show();
|
||||||
}).size(210f, 64f);
|
}).size(210f, 64f);
|
||||||
@@ -531,7 +531,7 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
}else if(node.objectives.size > 0){
|
}else if(node.objectives.size > 0){
|
||||||
t.table(r -> {
|
t.table(r -> {
|
||||||
r.add("$complete").colspan(2).left();
|
r.add("@complete").colspan(2).left();
|
||||||
r.row();
|
r.row();
|
||||||
for(Objective o : node.objectives){
|
for(Objective o : node.objectives){
|
||||||
if(o.complete()) continue;
|
if(o.complete()) continue;
|
||||||
@@ -545,13 +545,13 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
desc.add("$completed");
|
desc.add("@completed");
|
||||||
}
|
}
|
||||||
}).pad(9);
|
}).pad(9);
|
||||||
|
|
||||||
if(mobile && locked(node)){
|
if(mobile && locked(node)){
|
||||||
b.row();
|
b.row();
|
||||||
b.button("$research", Icon.ok, Styles.nodet, () -> spend(node))
|
b.button("@research", Icon.ok, Styles.nodet, () -> spend(node))
|
||||||
.disabled(i -> !canSpend(node)).growX().height(44f).colspan(3);
|
.disabled(i -> !canSpend(node)).growX().height(44f).colspan(3);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import static mindustry.Vars.*;
|
|||||||
public class SaveDialog extends LoadDialog{
|
public class SaveDialog extends LoadDialog{
|
||||||
|
|
||||||
public SaveDialog(){
|
public SaveDialog(){
|
||||||
super("$savegame");
|
super("@savegame");
|
||||||
|
|
||||||
update(() -> {
|
update(() -> {
|
||||||
if(state.isMenu() && isShown()){
|
if(state.isMenu() && isShown()){
|
||||||
@@ -23,9 +23,9 @@ public class SaveDialog extends LoadDialog{
|
|||||||
@Override
|
@Override
|
||||||
public void addSetup(){
|
public void addSetup(){
|
||||||
|
|
||||||
buttons.button("$save.new", Icon.add, () ->
|
buttons.button("@save.new", Icon.add, () ->
|
||||||
ui.showTextInput("$save", "$save.newslot", 30, "",
|
ui.showTextInput("@save", "@save.newslot", 30, "",
|
||||||
text -> ui.loadAnd("$saving", () -> {
|
text -> ui.loadAnd("@saving", () -> {
|
||||||
control.saves.addSave(text);
|
control.saves.addSave(text);
|
||||||
Core.app.post(() -> Core.app.post(this::setup));
|
Core.app.post(() -> Core.app.post(this::setup));
|
||||||
}))).fillX().margin(10f);
|
}))).fillX().margin(10f);
|
||||||
@@ -36,13 +36,13 @@ public class SaveDialog extends LoadDialog{
|
|||||||
button.clicked(() -> {
|
button.clicked(() -> {
|
||||||
if(button.childrenPressed()) return;
|
if(button.childrenPressed()) return;
|
||||||
|
|
||||||
ui.showConfirm("$overwrite", "$save.overwrite", () -> save(slot));
|
ui.showConfirm("@overwrite", "@save.overwrite", () -> save(slot));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void save(SaveSlot slot){
|
void save(SaveSlot slot){
|
||||||
|
|
||||||
ui.loadfrag.show("$saving");
|
ui.loadfrag.show("@saving");
|
||||||
|
|
||||||
Time.runTask(5f, () -> {
|
Time.runTask(5f, () -> {
|
||||||
hide();
|
hide();
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
private TextField searchField;
|
private TextField searchField;
|
||||||
|
|
||||||
public SchematicsDialog(){
|
public SchematicsDialog(){
|
||||||
super("$schematics");
|
super("@schematics");
|
||||||
Core.assets.load("sprites/schematic-background.png", Texture.class).loaded = t -> {
|
Core.assets.load("sprites/schematic-background.png", Texture.class).loaded = t -> {
|
||||||
((Texture)t).setWrap(TextureWrap.repeat);
|
((Texture)t).setWrap(TextureWrap.repeat);
|
||||||
};
|
};
|
||||||
|
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
buttons.button("$schematic.import", Icon.download, this::showImport);
|
buttons.button("@schematic.import", Icon.download, this::showImport);
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
onResize(this::setup);
|
onResize(this::setup);
|
||||||
}
|
}
|
||||||
@@ -102,11 +102,11 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
|
|
||||||
buttons.button(Icon.pencil, style, () -> {
|
buttons.button(Icon.pencil, style, () -> {
|
||||||
ui.showTextInput("$schematic.rename", "$name", s.name(), res -> {
|
ui.showTextInput("@schematic.rename", "@name", s.name(), res -> {
|
||||||
Schematic replacement = schematics.all().find(other -> other.name().equals(res) && other != s);
|
Schematic replacement = schematics.all().find(other -> other.name().equals(res) && other != s);
|
||||||
if(replacement != null){
|
if(replacement != null){
|
||||||
//renaming to an existing schematic is not allowed, as it is not clear how the tags would be merged, and which one should be removed
|
//renaming to an existing schematic is not allowed, as it is not clear how the tags would be merged, and which one should be removed
|
||||||
ui.showErrorMessage("$schematic.exists");
|
ui.showErrorMessage("@schematic.exists");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
if(s.mod != null){
|
if(s.mod != null){
|
||||||
ui.showInfo(Core.bundle.format("mod.item.remove", s.mod.meta.displayName()));
|
ui.showInfo(Core.bundle.format("mod.item.remove", s.mod.meta.displayName()));
|
||||||
}else{
|
}else{
|
||||||
ui.showConfirm("$confirm", "$schematic.delete.confirm", () -> {
|
ui.showConfirm("@confirm", "@schematic.delete.confirm", () -> {
|
||||||
schematics.remove(s);
|
schematics.remove(s);
|
||||||
rebuildPane[0].run();
|
rebuildPane[0].run();
|
||||||
});
|
});
|
||||||
@@ -159,7 +159,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(firstSchematic == null){
|
if(firstSchematic == null){
|
||||||
t.add("$none");
|
t.add("@none");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -172,28 +172,28 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showImport(){
|
public void showImport(){
|
||||||
BaseDialog dialog = new BaseDialog("$editor.export");
|
BaseDialog dialog = new BaseDialog("@editor.export");
|
||||||
dialog.cont.pane(p -> {
|
dialog.cont.pane(p -> {
|
||||||
p.margin(10f);
|
p.margin(10f);
|
||||||
p.table(Tex.button, t -> {
|
p.table(Tex.button, t -> {
|
||||||
TextButtonStyle style = Styles.cleart;
|
TextButtonStyle style = Styles.cleart;
|
||||||
t.defaults().size(280f, 60f).left();
|
t.defaults().size(280f, 60f).left();
|
||||||
t.row();
|
t.row();
|
||||||
t.button("$schematic.copy.import", Icon.copy, style, () -> {
|
t.button("@schematic.copy.import", Icon.copy, style, () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
try{
|
try{
|
||||||
Schematic s = Schematics.readBase64(Core.app.getClipboardText());
|
Schematic s = Schematics.readBase64(Core.app.getClipboardText());
|
||||||
s.removeSteamID();
|
s.removeSteamID();
|
||||||
schematics.add(s);
|
schematics.add(s);
|
||||||
setup();
|
setup();
|
||||||
ui.showInfoFade("$schematic.saved");
|
ui.showInfoFade("@schematic.saved");
|
||||||
showInfo(s);
|
showInfo(s);
|
||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
ui.showException(e);
|
ui.showException(e);
|
||||||
}
|
}
|
||||||
}).marginLeft(12f).disabled(b -> Core.app.getClipboardText() == null || !Core.app.getClipboardText().startsWith(schematicBaseStart));
|
}).marginLeft(12f).disabled(b -> Core.app.getClipboardText() == null || !Core.app.getClipboardText().startsWith(schematicBaseStart));
|
||||||
t.row();
|
t.row();
|
||||||
t.button("$schematic.importfile", Icon.download, style, () -> platform.showFileChooser(true, schematicExtension, file -> {
|
t.button("@schematic.importfile", Icon.download, style, () -> platform.showFileChooser(true, schematicExtension, file -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
|
|
||||||
try{
|
try{
|
||||||
@@ -208,7 +208,7 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
})).marginLeft(12f);
|
})).marginLeft(12f);
|
||||||
t.row();
|
t.row();
|
||||||
if(steam){
|
if(steam){
|
||||||
t.button("$schematic.browseworkshop", Icon.book, style, () -> {
|
t.button("@schematic.browseworkshop", Icon.book, style, () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
platform.openWorkshop();
|
platform.openWorkshop();
|
||||||
}).marginLeft(12f);
|
}).marginLeft(12f);
|
||||||
@@ -221,25 +221,25 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showExport(Schematic s){
|
public void showExport(Schematic s){
|
||||||
BaseDialog dialog = new BaseDialog("$editor.export");
|
BaseDialog dialog = new BaseDialog("@editor.export");
|
||||||
dialog.cont.pane(p -> {
|
dialog.cont.pane(p -> {
|
||||||
p.margin(10f);
|
p.margin(10f);
|
||||||
p.table(Tex.button, t -> {
|
p.table(Tex.button, t -> {
|
||||||
TextButtonStyle style = Styles.cleart;
|
TextButtonStyle style = Styles.cleart;
|
||||||
t.defaults().size(280f, 60f).left();
|
t.defaults().size(280f, 60f).left();
|
||||||
if(steam && !s.hasSteamID()){
|
if(steam && !s.hasSteamID()){
|
||||||
t.button("$schematic.shareworkshop", Icon.book, style,
|
t.button("@schematic.shareworkshop", Icon.book, style,
|
||||||
() -> platform.publish(s)).marginLeft(12f);
|
() -> platform.publish(s)).marginLeft(12f);
|
||||||
t.row();
|
t.row();
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}
|
}
|
||||||
t.button("$schematic.copy", Icon.copy, style, () -> {
|
t.button("@schematic.copy", Icon.copy, style, () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
ui.showInfoFade("$copied");
|
ui.showInfoFade("@copied");
|
||||||
Core.app.setClipboardText(schematics.writeBase64(s));
|
Core.app.setClipboardText(schematics.writeBase64(s));
|
||||||
}).marginLeft(12f);
|
}).marginLeft(12f);
|
||||||
t.row();
|
t.row();
|
||||||
t.button("$schematic.exportfile", Icon.export, style, () -> {
|
t.button("@schematic.exportfile", Icon.export, style, () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
platform.export(s.name(), schematicExtension, file -> Schematics.write(s, file));
|
platform.export(s.name(), schematicExtension, file -> Schematics.write(s, file));
|
||||||
}).marginLeft(12f);
|
}).marginLeft(12f);
|
||||||
|
|||||||
@@ -82,14 +82,14 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
prefs.clearChildren();
|
prefs.clearChildren();
|
||||||
prefs.add(menu);
|
prefs.add(menu);
|
||||||
|
|
||||||
dataDialog = new BaseDialog("$settings.data");
|
dataDialog = new BaseDialog("@settings.data");
|
||||||
dataDialog.addCloseButton();
|
dataDialog.addCloseButton();
|
||||||
|
|
||||||
dataDialog.cont.table(Tex.button, t -> {
|
dataDialog.cont.table(Tex.button, t -> {
|
||||||
t.defaults().size(270f, 60f).left();
|
t.defaults().size(270f, 60f).left();
|
||||||
TextButtonStyle style = Styles.cleart;
|
TextButtonStyle style = Styles.cleart;
|
||||||
|
|
||||||
t.button("$settings.cleardata", Icon.trash, style, () -> ui.showConfirm("$confirm", "$settings.clearall.confirm", () -> {
|
t.button("@settings.cleardata", Icon.trash, style, () -> ui.showConfirm("@confirm", "@settings.clearall.confirm", () -> {
|
||||||
ObjectMap<String, Object> map = new ObjectMap<>();
|
ObjectMap<String, Object> map = new ObjectMap<>();
|
||||||
for(String value : Core.settings.keys()){
|
for(String value : Core.settings.keys()){
|
||||||
if(value.contains("usid") || value.contains("uuid")){
|
if(value.contains("usid") || value.contains("uuid")){
|
||||||
@@ -108,15 +108,15 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.button("$settings.clearsaves", Icon.trash, style, () -> {
|
t.button("@settings.clearsaves", Icon.trash, style, () -> {
|
||||||
ui.showConfirm("$confirm", "$settings.clearsaves.confirm", () -> {
|
ui.showConfirm("@confirm", "@settings.clearsaves.confirm", () -> {
|
||||||
control.saves.deleteAll();
|
control.saves.deleteAll();
|
||||||
});
|
});
|
||||||
}).marginLeft(4);
|
}).marginLeft(4);
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.button("$data.export", Icon.upload, style, () -> {
|
t.button("@data.export", Icon.upload, style, () -> {
|
||||||
if(ios){
|
if(ios){
|
||||||
Fi file = Core.files.local("mindustry-data-export.zip");
|
Fi file = Core.files.local("mindustry-data-export.zip");
|
||||||
try{
|
try{
|
||||||
@@ -129,7 +129,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
platform.showFileChooser(false, "zip", file -> {
|
platform.showFileChooser(false, "zip", file -> {
|
||||||
try{
|
try{
|
||||||
exportData(file);
|
exportData(file);
|
||||||
ui.showInfo("$data.exported");
|
ui.showInfo("@data.exported");
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ui.showException(e);
|
ui.showException(e);
|
||||||
@@ -140,25 +140,25 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.button("$data.import", Icon.download, style, () -> ui.showConfirm("$confirm", "$data.import.confirm", () -> platform.showFileChooser(true, "zip", file -> {
|
t.button("@data.import", Icon.download, style, () -> ui.showConfirm("@confirm", "@data.import.confirm", () -> platform.showFileChooser(true, "zip", file -> {
|
||||||
try{
|
try{
|
||||||
importData(file);
|
importData(file);
|
||||||
Core.app.exit();
|
Core.app.exit();
|
||||||
}catch(IllegalArgumentException e){
|
}catch(IllegalArgumentException e){
|
||||||
ui.showErrorMessage("$data.invalid");
|
ui.showErrorMessage("@data.invalid");
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
if(e.getMessage() == null || !e.getMessage().contains("too short")){
|
if(e.getMessage() == null || !e.getMessage().contains("too short")){
|
||||||
ui.showException(e);
|
ui.showException(e);
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("$data.invalid");
|
ui.showErrorMessage("@data.invalid");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}))).marginLeft(4);
|
}))).marginLeft(4);
|
||||||
|
|
||||||
if(!mobile){
|
if(!mobile){
|
||||||
t.row();
|
t.row();
|
||||||
t.button("$data.openfolder", Icon.folder, style, () -> Core.app.openFolder(Core.settings.getDataDirectory().absolutePath())).marginLeft(4);
|
t.button("@data.openfolder", Icon.folder, style, () -> Core.app.openFolder(Core.settings.getDataDirectory().absolutePath())).marginLeft(4);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -197,20 +197,20 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
TextButtonStyle style = Styles.cleart;
|
TextButtonStyle style = Styles.cleart;
|
||||||
|
|
||||||
menu.defaults().size(300f, 60f);
|
menu.defaults().size(300f, 60f);
|
||||||
menu.button("$settings.game", style, () -> visible(0));
|
menu.button("@settings.game", style, () -> visible(0));
|
||||||
menu.row();
|
menu.row();
|
||||||
menu.button("$settings.graphics", style, () -> visible(1));
|
menu.button("@settings.graphics", style, () -> visible(1));
|
||||||
menu.row();
|
menu.row();
|
||||||
menu.button("$settings.sound", style, () -> visible(2));
|
menu.button("@settings.sound", style, () -> visible(2));
|
||||||
menu.row();
|
menu.row();
|
||||||
menu.button("$settings.language", style, ui.language::show);
|
menu.button("@settings.language", style, ui.language::show);
|
||||||
if(!mobile || Core.settings.getBool("keyboard")){
|
if(!mobile || Core.settings.getBool("keyboard")){
|
||||||
menu.row();
|
menu.row();
|
||||||
menu.button("$settings.controls", style, ui.controls::show);
|
menu.button("@settings.controls", style, ui.controls::show);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.row();
|
menu.row();
|
||||||
menu.button("$settings.data", style, () -> dataDialog.show());
|
menu.button("@settings.data", style, () -> dataDialog.show());
|
||||||
}
|
}
|
||||||
|
|
||||||
void addSettings(){
|
void addSettings(){
|
||||||
@@ -268,7 +268,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
game.pref(new Setting(){
|
game.pref(new Setting(){
|
||||||
@Override
|
@Override
|
||||||
public void add(SettingsTable table){
|
public void add(SettingsTable table){
|
||||||
table.button("$tutorial.retake", () -> {
|
table.button("@tutorial.retake", () -> {
|
||||||
hide();
|
hide();
|
||||||
control.playTutorial();
|
control.playTutorial();
|
||||||
}).size(220f, 60f).pad(6).left();
|
}).size(220f, 60f).pad(6).left();
|
||||||
@@ -434,7 +434,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCloseButton(){
|
public void addCloseButton(){
|
||||||
buttons.button("$back", Icon.leftOpen, () -> {
|
buttons.button("@back", Icon.leftOpen, () -> {
|
||||||
if(prefs.getChildren().first() != menu){
|
if(prefs.getChildren().first() != menu){
|
||||||
back();
|
back();
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import mindustry.net.Administration.TraceInfo;
|
|||||||
public class TraceDialog extends BaseDialog{
|
public class TraceDialog extends BaseDialog{
|
||||||
|
|
||||||
public TraceDialog(){
|
public TraceDialog(){
|
||||||
super("$trace");
|
super("@trace");
|
||||||
|
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
setFillParent(false);
|
setFillParent(false);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public class HudFragment extends Fragment{
|
|||||||
//paused table
|
//paused table
|
||||||
parent.fill(t -> {
|
parent.fill(t -> {
|
||||||
t.top().visible(() -> state.isPaused() && !state.isOutOfTime()).touchable = Touchable.disabled;
|
t.top().visible(() -> state.isPaused() && !state.isOutOfTime()).touchable = Touchable.disabled;
|
||||||
t.table(Styles.black5, top -> top.add("$paused").style(Styles.outlineLabel).pad(8f)).growX();
|
t.table(Styles.black5, top -> top.add("@paused").style(Styles.outlineLabel).pad(8f)).growX();
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO tear this all down
|
//TODO tear this all down
|
||||||
@@ -167,7 +167,7 @@ public class HudFragment extends Fragment{
|
|||||||
{
|
{
|
||||||
editorMain.table(Tex.buttonEdge4, t -> {
|
editorMain.table(Tex.buttonEdge4, t -> {
|
||||||
//t.margin(0f);
|
//t.margin(0f);
|
||||||
t.add("$editor.teams").growX().left();
|
t.add("@editor.teams").growX().left();
|
||||||
t.row();
|
t.row();
|
||||||
t.table(teams -> {
|
t.table(teams -> {
|
||||||
teams.left();
|
teams.left();
|
||||||
@@ -223,7 +223,7 @@ public class HudFragment extends Fragment{
|
|||||||
//spawner warning
|
//spawner warning
|
||||||
parent.fill(t -> {
|
parent.fill(t -> {
|
||||||
t.touchable = Touchable.disabled;
|
t.touchable = Touchable.disabled;
|
||||||
t.table(Styles.black, c -> c.add("$nearpoint")
|
t.table(Styles.black, c -> c.add("@nearpoint")
|
||||||
.update(l -> l.setColor(Tmp.c1.set(Color.white).lerp(Color.scarlet, Mathf.absin(Time.time(), 10f, 1f))))
|
.update(l -> l.setColor(Tmp.c1.set(Color.white).lerp(Color.scarlet, Mathf.absin(Time.time(), 10f, 1f))))
|
||||||
.get().setAlignment(Align.center, Align.center))
|
.get().setAlignment(Align.center, Align.center))
|
||||||
.margin(6).update(u -> u.color.a = Mathf.lerpDelta(u.color.a, Mathf.num(spawner.playerNear()), 0.1f)).get().color.a = 0f;
|
.margin(6).update(u -> u.color.a = Mathf.lerpDelta(u.color.a, Mathf.num(spawner.playerNear()), 0.1f)).get().color.a = 0f;
|
||||||
@@ -231,7 +231,7 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
parent.fill(t -> {
|
parent.fill(t -> {
|
||||||
t.visible(() -> netServer.isWaitingForPlayers());
|
t.visible(() -> netServer.isWaitingForPlayers());
|
||||||
t.table(Tex.button, c -> c.add("$waiting.players"));
|
t.table(Tex.button, c -> c.add("@waiting.players"));
|
||||||
});
|
});
|
||||||
|
|
||||||
//'core is under attack' table
|
//'core is under attack' table
|
||||||
@@ -262,7 +262,7 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
return coreAttackOpacity[0] > 0;
|
return coreAttackOpacity[0] > 0;
|
||||||
});
|
});
|
||||||
t.table(Tex.button, top -> top.add("$coreattack").pad(2)
|
t.table(Tex.button, top -> top.add("@coreattack").pad(2)
|
||||||
.update(label -> label.color.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time(), 2f, 1f)))).touchable(Touchable.disabled);
|
.update(label -> label.color.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time(), 2f, 1f)))).touchable(Touchable.disabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -312,7 +312,7 @@ public class HudFragment extends Fragment{
|
|||||||
//'saving' indicator
|
//'saving' indicator
|
||||||
parent.fill(t -> {
|
parent.fill(t -> {
|
||||||
t.bottom().visible(() -> control.saves.isSaving());
|
t.bottom().visible(() -> control.saves.isSaving());
|
||||||
t.add("$saving").style(Styles.outlineLabel);
|
t.add("@saving").style(Styles.outlineLabel);
|
||||||
});
|
});
|
||||||
|
|
||||||
parent.fill(p -> {
|
parent.fill(p -> {
|
||||||
@@ -459,7 +459,7 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
//add to table
|
//add to table
|
||||||
table.add(in).padRight(8);
|
table.add(in).padRight(8);
|
||||||
table.add("$unlocked");
|
table.add("@unlocked");
|
||||||
table.pack();
|
table.pack();
|
||||||
|
|
||||||
//create container table which will align and move
|
//create container table which will align and move
|
||||||
@@ -555,17 +555,17 @@ public class HudFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showLaunchConfirm(){
|
private void showLaunchConfirm(){
|
||||||
BaseDialog dialog = new BaseDialog("$launch");
|
BaseDialog dialog = new BaseDialog("@launch");
|
||||||
dialog.update(() -> {
|
dialog.update(() -> {
|
||||||
if(!inLaunchWave()){
|
if(!inLaunchWave()){
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dialog.cont.add("$launch.confirm").width(500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
dialog.cont.add("@launch.confirm").width(500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.buttons.button("$cancel", dialog::hide);
|
dialog.buttons.button("@cancel", dialog::hide);
|
||||||
dialog.buttons.button("$ok", () -> {
|
dialog.buttons.button("@ok", () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
Call.launchZone();
|
Call.launchZone();
|
||||||
});
|
});
|
||||||
@@ -680,7 +680,7 @@ public class HudFragment extends Fragment{
|
|||||||
if(net.client() && player.admin){
|
if(net.client() && player.admin){
|
||||||
Call.adminRequest(player, AdminAction.wave);
|
Call.adminRequest(player, AdminAction.wave);
|
||||||
}else if(inLaunchWave()){
|
}else if(inLaunchWave()){
|
||||||
ui.showConfirm("$confirm", "$launch.skip.confirm", () -> !canSkipWave(), () -> logic.skipWave());
|
ui.showConfirm("@confirm", "@launch.skip.confirm", () -> !canSkipWave(), () -> logic.skipWave());
|
||||||
}else{
|
}else{
|
||||||
logic.skipWave();
|
logic.skipWave();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,16 +24,16 @@ public class LoadingFragment extends Fragment{
|
|||||||
t.add().height(133f).row();
|
t.add().height(133f).row();
|
||||||
t.add(new WarningBar()).growX().height(24f);
|
t.add(new WarningBar()).growX().height(24f);
|
||||||
t.row();
|
t.row();
|
||||||
nameLabel = t.add("$loading").pad(10f).style(Styles.techLabel).get();
|
nameLabel = t.add("@loading").pad(10f).style(Styles.techLabel).get();
|
||||||
t.row();
|
t.row();
|
||||||
t.add(new WarningBar()).growX().height(24f);
|
t.add(new WarningBar()).growX().height(24f);
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
text("$loading");
|
text("@loading");
|
||||||
|
|
||||||
bar = t.add(new Bar()).pad(3).size(500f, 40f).visible(false).get();
|
bar = t.add(new Bar()).pad(3).size(500f, 40f).visible(false).get();
|
||||||
t.row();
|
t.row();
|
||||||
button = t.button("$cancel", () -> {}).pad(20).size(250f, 70f).visible(false).get();
|
button = t.button("@cancel", () -> {}).pad(20).size(250f, 70f).visible(false).get();
|
||||||
table = t;
|
table = t;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ public class LoadingFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void show(){
|
public void show(){
|
||||||
show("$loading");
|
show("@loading");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show(String text){
|
public void show(String text){
|
||||||
|
|||||||
@@ -60,12 +60,12 @@ public class MenuFragment extends Fragment{
|
|||||||
parent.fill(c -> c.bottom().left().button("", Styles.infot, ui.about::show).size(84, 45));
|
parent.fill(c -> c.bottom().left().button("", Styles.infot, ui.about::show).size(84, 45));
|
||||||
parent.fill(c -> c.bottom().right().button("", Styles.discordt, ui.discord::show).size(84, 45));
|
parent.fill(c -> c.bottom().right().button("", Styles.discordt, ui.discord::show).size(84, 45));
|
||||||
}else if(becontrol.active()){
|
}else if(becontrol.active()){
|
||||||
parent.fill(c -> c.bottom().right().button("$be.check", Icon.refresh, () -> {
|
parent.fill(c -> c.bottom().right().button("@be.check", Icon.refresh, () -> {
|
||||||
ui.loadfrag.show();
|
ui.loadfrag.show();
|
||||||
becontrol.checkUpdate(result -> {
|
becontrol.checkUpdate(result -> {
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
if(!result){
|
if(!result){
|
||||||
ui.showInfo("$be.noupdates");
|
ui.showInfo("@be.noupdates");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).size(200, 60).update(t -> {
|
}).size(200, 60).update(t -> {
|
||||||
@@ -100,15 +100,15 @@ public class MenuFragment extends Fragment{
|
|||||||
container.defaults().size(size).pad(5).padTop(4f);
|
container.defaults().size(size).pad(5).padTop(4f);
|
||||||
|
|
||||||
MobileButton
|
MobileButton
|
||||||
play = new MobileButton(Icon.play, "$campaign", () -> checkPlay(ui.planet::show)),
|
play = new MobileButton(Icon.play, "@campaign", () -> checkPlay(ui.planet::show)),
|
||||||
custom = new MobileButton(Icon.rightOpenOut, "$customgame", () -> checkPlay(ui.custom::show)),
|
custom = new MobileButton(Icon.rightOpenOut, "@customgame", () -> checkPlay(ui.custom::show)),
|
||||||
maps = new MobileButton(Icon.download, "$loadgame", () -> checkPlay(ui.load::show)),
|
maps = new MobileButton(Icon.download, "@loadgame", () -> checkPlay(ui.load::show)),
|
||||||
join = new MobileButton(Icon.add, "$joingame", () -> checkPlay(ui.join::show)),
|
join = new MobileButton(Icon.add, "@joingame", () -> checkPlay(ui.join::show)),
|
||||||
editor = new MobileButton(Icon.terrain, "$editor", () -> checkPlay(ui.maps::show)),
|
editor = new MobileButton(Icon.terrain, "@editor", () -> checkPlay(ui.maps::show)),
|
||||||
tools = new MobileButton(Icon.settings, "$settings", ui.settings::show),
|
tools = new MobileButton(Icon.settings, "@settings", ui.settings::show),
|
||||||
mods = new MobileButton(Icon.book, "$mods", ui.mods::show),
|
mods = new MobileButton(Icon.book, "@mods", ui.mods::show),
|
||||||
donate = new MobileButton(Icon.link, "$website", () -> Core.app.openURI("https://anuke.itch.io/mindustry")),
|
donate = new MobileButton(Icon.link, "@website", () -> Core.app.openURI("https://anuke.itch.io/mindustry")),
|
||||||
exit = new MobileButton(Icon.exit, "$quit", () -> Core.app.exit());
|
exit = new MobileButton(Icon.exit, "@quit", () -> Core.app.exit());
|
||||||
|
|
||||||
if(!Core.graphics.isPortrait()){
|
if(!Core.graphics.isPortrait()){
|
||||||
container.marginTop(60f);
|
container.marginTop(60f);
|
||||||
@@ -164,20 +164,20 @@ public class MenuFragment extends Fragment{
|
|||||||
t.defaults().width(width).height(70f);
|
t.defaults().width(width).height(70f);
|
||||||
|
|
||||||
buttons(t,
|
buttons(t,
|
||||||
new Buttoni("$play", Icon.play,
|
new Buttoni("@play", Icon.play,
|
||||||
new Buttoni("$campaign", Icon.play, () -> checkPlay(ui.planet::show)),
|
new Buttoni("@campaign", Icon.play, () -> checkPlay(ui.planet::show)),
|
||||||
new Buttoni("$joingame", Icon.add, () -> checkPlay(ui.join::show)),
|
new Buttoni("@joingame", Icon.add, () -> checkPlay(ui.join::show)),
|
||||||
new Buttoni("$customgame", Icon.terrain, () -> checkPlay(ui.custom::show)),
|
new Buttoni("@customgame", Icon.terrain, () -> checkPlay(ui.custom::show)),
|
||||||
new Buttoni("$loadgame", Icon.download, () -> checkPlay(ui.load::show)),
|
new Buttoni("@loadgame", Icon.download, () -> checkPlay(ui.load::show)),
|
||||||
new Buttoni("$tutorial", Icon.info, () -> checkPlay(control::playTutorial))
|
new Buttoni("@tutorial", Icon.info, () -> checkPlay(control::playTutorial))
|
||||||
),
|
),
|
||||||
new Buttoni("$editor", Icon.terrain, () -> checkPlay(ui.maps::show)), steam ? new Buttoni("$workshop", Icon.book, platform::openWorkshop) : null,
|
new Buttoni("@editor", Icon.terrain, () -> checkPlay(ui.maps::show)), steam ? new Buttoni("@workshop", Icon.book, platform::openWorkshop) : null,
|
||||||
new Buttoni(Core.bundle.get("mods"), Icon.bookOpen, ui.mods::show),
|
new Buttoni(Core.bundle.get("mods"), Icon.bookOpen, ui.mods::show),
|
||||||
//not enough space for this button
|
//not enough space for this button
|
||||||
//new Buttoni("$schematics", Icon.paste, ui.schematics::show),
|
//new Buttoni("@schematics", Icon.paste, ui.schematics::show),
|
||||||
new Buttoni("$settings", Icon.settings, ui.settings::show),
|
new Buttoni("@settings", Icon.settings, ui.settings::show),
|
||||||
new Buttoni("$about.button", Icon.info, ui.about::show),
|
new Buttoni("@about.button", Icon.info, ui.about::show),
|
||||||
new Buttoni("$quit", Icon.exit, Core.app::exit)
|
new Buttoni("@quit", Icon.exit, Core.app::exit)
|
||||||
);
|
);
|
||||||
|
|
||||||
}).width(width).growY();
|
}).width(width).growY();
|
||||||
@@ -196,7 +196,7 @@ public class MenuFragment extends Fragment{
|
|||||||
if(!mods.hasContentErrors()){
|
if(!mods.hasContentErrors()){
|
||||||
run.run();
|
run.run();
|
||||||
}else{
|
}else{
|
||||||
ui.showInfo("$mod.noerrorplay");
|
ui.showInfo("@mod.noerrorplay");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,11 +98,11 @@ public class MinimapFragment extends Fragment{
|
|||||||
t.visible(() -> shown);
|
t.visible(() -> shown);
|
||||||
t.update(() -> t.setBounds(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight()));
|
t.update(() -> t.setBounds(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight()));
|
||||||
|
|
||||||
t.add("$minimap").style(Styles.outlineLabel).pad(10f);
|
t.add("@minimap").style(Styles.outlineLabel).pad(10f);
|
||||||
t.row();
|
t.row();
|
||||||
t.add().growY();
|
t.add().growY();
|
||||||
t.row();
|
t.row();
|
||||||
t.button("$back", Icon.leftOpen, () -> shown = false).size(220f, 60f).pad(10f);
|
t.button("@back", Icon.leftOpen, () -> shown = false).size(220f, 60f).pad(10f);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
if(unlocked(block)){
|
if(unlocked(block)){
|
||||||
if(Core.input.keyDown(KeyCode.shiftLeft) && Fonts.getUnicode(block.name) != 0){
|
if(Core.input.keyDown(KeyCode.shiftLeft) && Fonts.getUnicode(block.name) != 0){
|
||||||
Core.app.setClipboardText((char)Fonts.getUnicode(block.name) + "");
|
Core.app.setClipboardText((char)Fonts.getUnicode(block.name) + "");
|
||||||
ui.showInfoFade("$copied");
|
ui.showInfoFade("@copied");
|
||||||
}else{
|
}else{
|
||||||
control.input.block = control.input.block == block ? null : block;
|
control.input.block = control.input.block == block ? null : block;
|
||||||
selectedBlocks.put(currentCategory, control.input.block);
|
selectedBlocks.put(currentCategory, control.input.block);
|
||||||
@@ -337,7 +337,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
topTable.row();
|
topTable.row();
|
||||||
topTable.table(b -> {
|
topTable.table(b -> {
|
||||||
b.image(Icon.cancel).padRight(2).color(Color.scarlet);
|
b.image(Icon.cancel).padRight(2).color(Color.scarlet);
|
||||||
b.add(!player.isBuilder() ? "$unit.nobuild" : displayBlock.unplaceableMessage()).width(190f).wrap();
|
b.add(!player.isBuilder() ? "@unit.nobuild" : displayBlock.unplaceableMessage()).width(190f).wrap();
|
||||||
b.left();
|
b.left();
|
||||||
}).padTop(2).left();
|
}).padTop(2).left();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ public class PlayerListFragment extends Fragment{
|
|||||||
pane.table(menu -> {
|
pane.table(menu -> {
|
||||||
menu.defaults().growX().height(50f).fillY();
|
menu.defaults().growX().height(50f).fillY();
|
||||||
|
|
||||||
menu.button("$server.bans", ui.bans::show).disabled(b -> net.client());
|
menu.button("@server.bans", ui.bans::show).disabled(b -> net.client());
|
||||||
menu.button("$server.admins", ui.admins::show).disabled(b -> net.client());
|
menu.button("@server.admins", ui.admins::show).disabled(b -> net.client());
|
||||||
menu.button("$close", this::toggle);
|
menu.button("@close", this::toggle);
|
||||||
}).margin(0f).pad(10f).growX();
|
}).margin(0f).pad(10f).growX();
|
||||||
|
|
||||||
}).touchable(Touchable.enabled).margin(14f);
|
}).touchable(Touchable.enabled).margin(14f);
|
||||||
@@ -116,11 +116,11 @@ public class PlayerListFragment extends Fragment{
|
|||||||
|
|
||||||
t.button(Icon.hammer, Styles.clearPartiali,
|
t.button(Icon.hammer, Styles.clearPartiali,
|
||||||
() -> {
|
() -> {
|
||||||
ui.showConfirm("$confirm", Core.bundle.format("confirmban", user.name()), () -> Call.adminRequest(user, AdminAction.ban));
|
ui.showConfirm("@confirm", Core.bundle.format("confirmban", user.name()), () -> Call.adminRequest(user, AdminAction.ban));
|
||||||
});
|
});
|
||||||
t.button(Icon.cancel, Styles.clearPartiali,
|
t.button(Icon.cancel, Styles.clearPartiali,
|
||||||
() -> {
|
() -> {
|
||||||
ui.showConfirm("$confirm", Core.bundle.format("confirmkick", user.name()), () -> Call.adminRequest(user, AdminAction.kick));
|
ui.showConfirm("@confirm", Core.bundle.format("confirmkick", user.name()), () -> Call.adminRequest(user, AdminAction.kick));
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
@@ -131,9 +131,9 @@ public class PlayerListFragment extends Fragment{
|
|||||||
String id = user.uuid();
|
String id = user.uuid();
|
||||||
|
|
||||||
if(netServer.admins.isAdmin(id, connection.address)){
|
if(netServer.admins.isAdmin(id, connection.address)){
|
||||||
ui.showConfirm("$confirm", Core.bundle.format("confirmunadmin", user.name()), () -> netServer.admins.unAdminPlayer(id));
|
ui.showConfirm("@confirm", Core.bundle.format("confirmunadmin", user.name()), () -> netServer.admins.unAdminPlayer(id));
|
||||||
}else{
|
}else{
|
||||||
ui.showConfirm("$confirm", Core.bundle.format("confirmadmin", user.name()), () -> netServer.admins.adminPlayer(id, user.usid()));
|
ui.showConfirm("@confirm", Core.bundle.format("confirmadmin", user.name()), () -> netServer.admins.adminPlayer(id, user.usid()));
|
||||||
}
|
}
|
||||||
}).update(b -> b.setChecked(user.admin))
|
}).update(b -> b.setChecked(user.admin))
|
||||||
.disabled(b -> net.client())
|
.disabled(b -> net.client())
|
||||||
@@ -148,7 +148,7 @@ public class PlayerListFragment extends Fragment{
|
|||||||
|
|
||||||
button.button(Icon.hammer, Styles.clearPartiali,
|
button.button(Icon.hammer, Styles.clearPartiali,
|
||||||
() -> {
|
() -> {
|
||||||
ui.showConfirm("$confirm", Core.bundle.format("confirmvotekick", user.name()), () -> {
|
ui.showConfirm("@confirm", Core.bundle.format("confirmvotekick", user.name()), () -> {
|
||||||
Call.sendChatMessage("/votekick " + user.name());
|
Call.sendChatMessage("/votekick " + user.name());
|
||||||
});
|
});
|
||||||
}).size(h);
|
}).size(h);
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ public class ResearchBlock extends Block{
|
|||||||
i.setScaling(Scaling.fit);
|
i.setScaling(Scaling.fit);
|
||||||
i.setColor(researching == null ? Color.lightGray : Color.white);
|
i.setColor(researching == null ? Color.lightGray : Color.white);
|
||||||
}).size(32).pad(3);
|
}).size(32).pad(3);
|
||||||
t.label(() -> researching == null ? "$none" : researching.content.localizedName).color(Color.lightGray);
|
t.label(() -> researching == null ? "@none" : researching.content.localizedName).color(Color.lightGray);
|
||||||
}).left().padTop(4);
|
}).left().padTop(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public class MessageBlock extends Block{
|
|||||||
accepted = str -> configure(str);
|
accepted = str -> configure(str);
|
||||||
}});
|
}});
|
||||||
}else{
|
}else{
|
||||||
BaseDialog dialog = new BaseDialog("$editmessage");
|
BaseDialog dialog = new BaseDialog("@editmessage");
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
TextArea a = dialog.cont.add(new TextArea(message.replace("\n", "\r"))).size(380f, 160f).get();
|
TextArea a = dialog.cont.add(new TextArea(message.replace("\n", "\r"))).size(380f, 160f).get();
|
||||||
a.setFilter((textField, c) -> {
|
a.setFilter((textField, c) -> {
|
||||||
@@ -112,7 +112,7 @@ public class MessageBlock extends Block{
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
a.setMaxLength(maxTextLength);
|
a.setMaxLength(maxTextLength);
|
||||||
dialog.buttons.button("$ok", () -> {
|
dialog.buttons.button("@ok", () -> {
|
||||||
configure(a.getText());
|
configure(a.getText());
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).size(130f, 60f);
|
}).size(130f, 60f);
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public class UnitFactory extends UnitBlock{
|
|||||||
if(units.any()){
|
if(units.any()){
|
||||||
ItemSelection.buildTable(table, units, () -> currentPlan == -1 ? null : plans[currentPlan].unit, unit -> configure(units.indexOf(unit)));
|
ItemSelection.buildTable(table, units, () -> currentPlan == -1 ? null : plans[currentPlan].unit, unit -> configure(units.indexOf(unit)));
|
||||||
}else{
|
}else{
|
||||||
table.table(Styles.black3, t -> t.add("$none").color(Color.lightGray));
|
table.table(Styles.black3, t -> t.add("@none").color(Color.lightGray));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ public class UnitFactory extends UnitBlock{
|
|||||||
i.setScaling(Scaling.fit);
|
i.setScaling(Scaling.fit);
|
||||||
i.setColor(currentPlan == -1 ? Color.lightGray : Color.white);
|
i.setColor(currentPlan == -1 ? Color.lightGray : Color.white);
|
||||||
}).size(32).padBottom(-4).padRight(2);
|
}).size(32).padBottom(-4).padRight(2);
|
||||||
t.label(() -> currentPlan == -1 ? "$none" : plans[currentPlan].unit.localizedName).color(Color.lightGray);
|
t.label(() -> currentPlan == -1 ? "@none" : plans[currentPlan].unit.localizedName).color(Color.lightGray);
|
||||||
}).left();
|
}).left();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,27 +51,27 @@ public class AmmoListValue<T extends UnlockableContent> implements StatValue{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((type.status == StatusEffects.burning || type.status == StatusEffects.melting) || type.incendAmount > 0){
|
if((type.status == StatusEffects.burning || type.status == StatusEffects.melting) || type.incendAmount > 0){
|
||||||
sep(bt, "$bullet.incendiary");
|
sep(bt, "@bullet.incendiary");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.status == StatusEffects.freezing){
|
if(type.status == StatusEffects.freezing){
|
||||||
sep(bt, "$bullet.freezing");
|
sep(bt, "@bullet.freezing");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.status == StatusEffects.tarred){
|
if(type.status == StatusEffects.tarred){
|
||||||
sep(bt, "$bullet.tarred");
|
sep(bt, "@bullet.tarred");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.homingPower > 0.01f){
|
if(type.homingPower > 0.01f){
|
||||||
sep(bt, "$bullet.homing");
|
sep(bt, "@bullet.homing");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.lightning > 0){
|
if(type.lightning > 0){
|
||||||
sep(bt, "$bullet.shock");
|
sep(bt, "@bullet.shock");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.fragBullet != null){
|
if(type.fragBullet != null){
|
||||||
sep(bt, "$bullet.frag");
|
sep(bt, "@bullet.frag");
|
||||||
}
|
}
|
||||||
}).left().padTop(-9);
|
}).left().padTop(-9);
|
||||||
table.row();
|
table.row();
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ public class BooleanValue implements StatValue{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void display(Table table){
|
public void display(Table table){
|
||||||
table.add(!value ? "$no" : "$yes");
|
table.add(!value ? "@no" : "@yes");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,36 +96,36 @@ public class SWorkshop implements SteamUGCCallback{
|
|||||||
if(details.getResult() == SteamResult.OK){
|
if(details.getResult() == SteamResult.OK){
|
||||||
if(details.getOwnerID().equals(SVars.user.user.getSteamID())){
|
if(details.getOwnerID().equals(SVars.user.user.getSteamID())){
|
||||||
|
|
||||||
BaseDialog dialog = new BaseDialog("$workshop.info");
|
BaseDialog dialog = new BaseDialog("@workshop.info");
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.cont.add("$workshop.menu").pad(20f);
|
dialog.cont.add("@workshop.menu").pad(20f);
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
|
|
||||||
dialog.buttons.button("$view.workshop", Icon.link, () -> {
|
dialog.buttons.button("@view.workshop", Icon.link, () -> {
|
||||||
viewListingID(id);
|
viewListingID(id);
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).size(210f, 64f);
|
}).size(210f, 64f);
|
||||||
|
|
||||||
dialog.buttons.button("$workshop.update", Icon.up, () -> {
|
dialog.buttons.button("@workshop.update", Icon.up, () -> {
|
||||||
new BaseDialog("$workshop.update"){{
|
new BaseDialog("@workshop.update"){{
|
||||||
setFillParent(false);
|
setFillParent(false);
|
||||||
cont.margin(10).add("$changelog").padRight(6f);
|
cont.margin(10).add("@changelog").padRight(6f);
|
||||||
cont.row();
|
cont.row();
|
||||||
TextArea field = cont.area("", t -> {}).size(500f, 160f).get();
|
TextArea field = cont.area("", t -> {}).size(500f, 160f).get();
|
||||||
field.setMaxLength(400);
|
field.setMaxLength(400);
|
||||||
buttons.defaults().size(120, 54).pad(4);
|
buttons.defaults().size(120, 54).pad(4);
|
||||||
buttons.button("$ok", () -> {
|
buttons.button("@ok", () -> {
|
||||||
if(!p.prePublish()){
|
if(!p.prePublish()){
|
||||||
Log.info("Rejecting due to pre-publish.");
|
Log.info("Rejecting due to pre-publish.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.loadfrag.show("$publishing");
|
ui.loadfrag.show("@publishing");
|
||||||
updateItem(p, field.getText().replace("\r", "\n"));
|
updateItem(p, field.getText().replace("\r", "\n"));
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
hide();
|
hide();
|
||||||
});
|
});
|
||||||
buttons.button("$cancel", this::hide);
|
buttons.button("@cancel", this::hide);
|
||||||
}}.show();
|
}}.show();
|
||||||
|
|
||||||
}).size(210f, 64f);
|
}).size(210f, 64f);
|
||||||
@@ -135,7 +135,7 @@ public class SWorkshop implements SteamUGCCallback{
|
|||||||
}
|
}
|
||||||
}else if(details.getResult() == SteamResult.FileNotFound){
|
}else if(details.getResult() == SteamResult.FileNotFound){
|
||||||
p.removeSteamID();
|
p.removeSteamID();
|
||||||
ui.showErrorMessage("$missing");
|
ui.showErrorMessage("@missing");
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage(Core.bundle.format("workshop.error", details.getResult().name()));
|
ui.showErrorMessage(Core.bundle.format("workshop.error", details.getResult().name()));
|
||||||
}
|
}
|
||||||
@@ -177,19 +177,19 @@ public class SWorkshop implements SteamUGCCallback{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showPublish(Cons<SteamPublishedFileID> published){
|
void showPublish(Cons<SteamPublishedFileID> published){
|
||||||
BaseDialog dialog = new BaseDialog("$confirm");
|
BaseDialog dialog = new BaseDialog("@confirm");
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.cont.add("$publish.confirm").width(600f).wrap();
|
dialog.cont.add("@publish.confirm").width(600f).wrap();
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
dialog.buttons.button("$eula", Icon.link,
|
dialog.buttons.button("@eula", Icon.link,
|
||||||
() -> SVars.net.friends.activateGameOverlayToWebPage("https://steamcommunity.com/sharedfiles/workshoplegalagreement"))
|
() -> SVars.net.friends.activateGameOverlayToWebPage("https://steamcommunity.com/sharedfiles/workshoplegalagreement"))
|
||||||
.size(210f, 64f);
|
.size(210f, 64f);
|
||||||
|
|
||||||
dialog.buttons.button("$ok", Icon.ok, () -> {
|
dialog.buttons.button("@ok", Icon.ok, () -> {
|
||||||
Log.info("Accepted, publishing item...");
|
Log.info("Accepted, publishing item...");
|
||||||
itemHandlers.add(published);
|
itemHandlers.add(published);
|
||||||
ugc.createItem(SVars.steamID, WorkshopFileType.Community);
|
ugc.createItem(SVars.steamID, WorkshopFileType.Community);
|
||||||
ui.loadfrag.show("$publishing");
|
ui.loadfrag.show("@publishing");
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).size(170f, 64f);
|
}).size(170f, 64f);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
@@ -213,9 +213,9 @@ public class SWorkshop implements SteamUGCCallback{
|
|||||||
|
|
||||||
ui.loadfrag.setProgress(() -> {
|
ui.loadfrag.setProgress(() -> {
|
||||||
ItemUpdateStatus status = ugc.getItemUpdateProgress(h, info);
|
ItemUpdateStatus status = ugc.getItemUpdateProgress(h, info);
|
||||||
ui.loadfrag.setText("$" + status.name().toLowerCase());
|
ui.loadfrag.setText("@" + status.name().toLowerCase());
|
||||||
if(status == ItemUpdateStatus.Invalid){
|
if(status == ItemUpdateStatus.Invalid){
|
||||||
ui.loadfrag.setText("$done");
|
ui.loadfrag.setText("@done");
|
||||||
return 1f;
|
return 1f;
|
||||||
}
|
}
|
||||||
return (float)status.ordinal() / (float)ItemUpdateStatus.values().length;
|
return (float)status.ordinal() / (float)ItemUpdateStatus.values().length;
|
||||||
|
|||||||
@@ -236,10 +236,10 @@ public class IOSLauncher extends IOSApplication.Delegate{
|
|||||||
ui.load.runLoadSave(slot);
|
ui.load.runLoadSave(slot);
|
||||||
}
|
}
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
ui.showException("$save.import.fail", e);
|
ui.showException("@save.import.fail", e);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("$save.import.invalid");
|
ui.showErrorMessage("@save.import.invalid");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user