Moved map dialog
This commit is contained in:
@@ -195,6 +195,7 @@ editor.description = Description:
|
|||||||
editor.waves = Waves:
|
editor.waves = Waves:
|
||||||
editor.rules = Rules:
|
editor.rules = Rules:
|
||||||
editor.ingame = Edit In-Game
|
editor.ingame = Edit In-Game
|
||||||
|
editor.newmap = New Map
|
||||||
waves.title = Waves
|
waves.title = Waves
|
||||||
waves.remove = Remove
|
waves.remove = Remove
|
||||||
waves.never = <never>
|
waves.never = <never>
|
||||||
|
|||||||
@@ -21,7 +21,17 @@ public class MapsDialog extends FloatingDialog{
|
|||||||
super("$maps");
|
super("$maps");
|
||||||
|
|
||||||
addCloseButton();
|
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 -> {
|
Platform.instance.showFileChooser("$editor.importmap", "Map File", file -> {
|
||||||
world.maps.tryCatchMapError(() -> {
|
world.maps.tryCatchMapError(() -> {
|
||||||
if(MapIO.isImage(file)){
|
if(MapIO.isImage(file)){
|
||||||
@@ -62,6 +72,8 @@ public class MapsDialog extends FloatingDialog{
|
|||||||
}, true, FileChooser.anyMapFiles);
|
}, true, FileChooser.anyMapFiles);
|
||||||
}).size(230f, 64f);
|
}).size(230f, 64f);
|
||||||
|
|
||||||
|
buttons.remove();
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
onResize(() -> {
|
onResize(() -> {
|
||||||
if(dialog != null){
|
if(dialog != null){
|
||||||
@@ -107,6 +119,8 @@ public class MapsDialog extends FloatingDialog{
|
|||||||
maps.add("$maps.none");
|
maps.add("$maps.none");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cont.add(buttons).growX();
|
||||||
|
cont.row();
|
||||||
cont.add(pane).uniformX();
|
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.addImageTextButton("$customgame", "icon-play-custom" + suffix, "clear", isize, this::showCustomSelect).marginLeft(margin);
|
||||||
t.row();
|
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.row();
|
||||||
|
|
||||||
t.addImageTextButton("$maps", "icon-map" + suffix, "clear", isize, ui.maps::show).marginLeft(margin);
|
//t.addImageTextButton("$maps", "icon-map" + suffix, "clear", isize, ui.maps::show).marginLeft(margin);
|
||||||
t.row();
|
//t.row();
|
||||||
|
|
||||||
t.addImageTextButton("$about.button", "icon-info" + suffix, "clear", isize, ui.about::show).marginLeft(margin);
|
t.addImageTextButton("$about.button", "icon-info" + suffix, "clear", isize, ui.about::show).marginLeft(margin);
|
||||||
t.row();
|
t.row();
|
||||||
|
|||||||
Reference in New Issue
Block a user