menu stuff
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
@@ -298,6 +298,7 @@ width = Width:
|
|||||||
height = Height:
|
height = Height:
|
||||||
menu = Menu
|
menu = Menu
|
||||||
play = Play
|
play = Play
|
||||||
|
campaign = Campaign
|
||||||
load = Load
|
load = Load
|
||||||
save = Save
|
save = Save
|
||||||
fps = FPS: {0}
|
fps = FPS: {0}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 875 KiB After Width: | Height: | Size: 860 KiB |
@@ -2,6 +2,7 @@ package io.anuke.mindustry.ui.fragments;
|
|||||||
|
|
||||||
import io.anuke.arc.Core;
|
import io.anuke.arc.Core;
|
||||||
import io.anuke.arc.Events;
|
import io.anuke.arc.Events;
|
||||||
|
import io.anuke.arc.graphics.Color;
|
||||||
import io.anuke.arc.scene.Group;
|
import io.anuke.arc.scene.Group;
|
||||||
import io.anuke.arc.scene.ui.layout.Table;
|
import io.anuke.arc.scene.ui.layout.Table;
|
||||||
import io.anuke.arc.util.Strings;
|
import io.anuke.arc.util.Strings;
|
||||||
@@ -33,18 +34,18 @@ public class MenuFragment extends Fragment{
|
|||||||
});
|
});
|
||||||
|
|
||||||
//discord icon in top right
|
//discord icon in top right
|
||||||
parent.fill(c -> c.top().right().addButton("", "discord", ui.discord::show).size(84, 45)
|
//parent.fill(c -> c.top().right().addButton("", "discord", ui.discord::show).size(84, 45)
|
||||||
.visible(() -> state.is(State.menu)));
|
//.visible(() -> state.is(State.menu)));
|
||||||
|
|
||||||
//info icon
|
//info icon
|
||||||
if(mobile){
|
//if(mobile){
|
||||||
parent.fill(c -> c.top().left().addButton("", "info", ui.about::show).size(84, 45)
|
// parent.fill(c -> c.top().left().addButton("", "info", ui.about::show).size(84, 45)
|
||||||
.visible(() -> state.is(State.menu)));
|
// .visible(() -> state.is(State.menu)));
|
||||||
}
|
//}
|
||||||
|
|
||||||
//version info
|
//version info
|
||||||
parent.fill(c -> c.bottom().left().add(Strings.format("Mindustry v{0} {1}-{2} {3}{4}", Version.number, Version.modifier, Version.type,
|
parent.fill(c -> c.bottom().left().add(Strings.format("v{0} {1}-{2} {3}{4}", Version.number, Version.modifier, Version.type,
|
||||||
(Version.build == -1 ? "custom build" : "build " + Version.build), Version.revision == 0 ? "" : "." + Version.revision))
|
(Version.build == -1 ? "custom build" : "build " + Version.build), Version.revision == 0 ? "" : "." + Version.revision)).color(Color.DARK_GRAY)
|
||||||
.visible(() -> state.is(State.menu)));
|
.visible(() -> state.is(State.menu)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +104,40 @@ public class MenuFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void buildDesktop(){
|
private void buildDesktop(){
|
||||||
|
container.table("dialogDim", t -> {
|
||||||
|
float isize = iconsizesmall;
|
||||||
|
float margin = 10f;
|
||||||
|
final String suffix = "-small";
|
||||||
|
|
||||||
|
t.left().defaults().width(230f).height(70f).left();
|
||||||
|
|
||||||
|
t.addImageTextButton("$play", "icon-play-2" + suffix, "clear", isize, ui.deploy::show).marginLeft(margin);
|
||||||
|
t.row();
|
||||||
|
|
||||||
|
t.addImageTextButton("$joingame", "icon-add" + suffix, "clear", isize, ui.join::show).marginLeft(margin);
|
||||||
|
t.row();
|
||||||
|
|
||||||
|
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.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();
|
||||||
|
|
||||||
|
t.addImageTextButton("$settings", "icon-tools" + suffix, "clear", isize, ui.settings::show).marginLeft(margin);
|
||||||
|
t.row();
|
||||||
|
|
||||||
|
t.addImageTextButton("$quit", "icon-exit" + suffix, "clear", isize, Core.app::exit).marginLeft(margin);
|
||||||
|
t.row();
|
||||||
|
|
||||||
|
}).growY().margin(0f).expand().left().padLeft(200f);
|
||||||
|
|
||||||
|
/*
|
||||||
container.table(out -> {
|
container.table(out -> {
|
||||||
|
|
||||||
float w = 200f;
|
float w = 200f;
|
||||||
@@ -134,7 +169,7 @@ public class MenuFragment extends Fragment{
|
|||||||
out.row();
|
out.row();
|
||||||
|
|
||||||
out.add(new MenuButton("icon-exit", "$quit", Core.app::exit)).width(bw).colspan(2);
|
out.add(new MenuButton("icon-exit", "$quit", Core.app::exit)).width(bw).colspan(2);
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showCustomSelect(){
|
private void showCustomSelect(){
|
||||||
|
|||||||