mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 15:27:19 +07:00
Moved map dialog
This commit is contained in:
@ -195,6 +195,7 @@ editor.description = Description:
|
||||
editor.waves = Waves:
|
||||
editor.rules = Rules:
|
||||
editor.ingame = Edit In-Game
|
||||
editor.newmap = New Map
|
||||
waves.title = Waves
|
||||
waves.remove = Remove
|
||||
waves.never = <never>
|
||||
|
@ -21,7 +21,17 @@ public class MapsDialog extends FloatingDialog{
|
||||
super("$maps");
|
||||
|
||||
addCloseButton();
|
||||
buttons.addImageTextButton("$editor.importmap", "icon-add", iconsize, () -> {
|
||||
|
||||
buttons.addImageTextButton("$editor.newmap", "icon-add", iconsize, () -> {
|
||||
ui.showTextInput("$editor.newmap", "$name", "", text -> {
|
||||
ui.loadAnd(() -> {
|
||||
ui.editor.show();
|
||||
ui.editor.editor.getTags().put("name", text);
|
||||
});
|
||||
});
|
||||
}).size(230f, 64f);
|
||||
|
||||
buttons.addImageTextButton("$editor.importmap", "icon-load", iconsize, () -> {
|
||||
Platform.instance.showFileChooser("$editor.importmap", "Map File", file -> {
|
||||
world.maps.tryCatchMapError(() -> {
|
||||
if(MapIO.isImage(file)){
|
||||
@ -62,6 +72,8 @@ public class MapsDialog extends FloatingDialog{
|
||||
}, true, FileChooser.anyMapFiles);
|
||||
}).size(230f, 64f);
|
||||
|
||||
buttons.remove();
|
||||
|
||||
shown(this::setup);
|
||||
onResize(() -> {
|
||||
if(dialog != null){
|
||||
@ -107,6 +119,8 @@ public class MapsDialog extends FloatingDialog{
|
||||
maps.add("$maps.none");
|
||||
}
|
||||
|
||||
cont.add(buttons).growX();
|
||||
cont.row();
|
||||
cont.add(pane).uniformX();
|
||||
}
|
||||
|
||||
|
@ -120,11 +120,11 @@ public class MenuFragment extends Fragment{
|
||||
t.addImageTextButton("$customgame", "icon-play-custom" + suffix, "clear", isize, this::showCustomSelect).marginLeft(margin);
|
||||
t.row();
|
||||
|
||||
t.addImageTextButton("$editor", "icon-editor" + suffix, "clear", isize, () -> ui.loadAnd(ui.editor::show)).marginLeft(margin);
|
||||
t.addImageTextButton("$editor", "icon-editor" + suffix, "clear", isize, ui.maps::show).marginLeft(margin);
|
||||
t.row();
|
||||
|
||||
t.addImageTextButton("$maps", "icon-map" + suffix, "clear", isize, ui.maps::show).marginLeft(margin);
|
||||
t.row();
|
||||
//t.addImageTextButton("$maps", "icon-map" + suffix, "clear", isize, ui.maps::show).marginLeft(margin);
|
||||
//t.row();
|
||||
|
||||
t.addImageTextButton("$about.button", "icon-info" + suffix, "clear", isize, ui.about::show).marginLeft(margin);
|
||||
t.row();
|
||||
|
Reference in New Issue
Block a user