mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-13 08:15:04 +07:00
Renamed some dialogs, final uCore update
This commit is contained in:
parent
32e1c6e3b8
commit
60c11b84aa
@ -21,7 +21,7 @@ allprojects {
|
||||
appName = "Mindustry"
|
||||
gdxVersion = '1.9.8'
|
||||
aiVersion = '1.8.1'
|
||||
uCoreVersion = 'b882f59';
|
||||
uCoreVersion = '5e4e43ed39';
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -615,10 +615,10 @@ public class Control extends Module{
|
||||
|
||||
if(Inputs.keyTap("menu")){
|
||||
if(GameState.is(State.paused)){
|
||||
ui.menu.hide();
|
||||
ui.paused.hide();
|
||||
GameState.set(State.playing);
|
||||
}else if (!ui.restart.isShown()){
|
||||
ui.menu.show();
|
||||
ui.paused.show();
|
||||
GameState.set(State.paused);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class UI extends SceneModule{
|
||||
public DiscordDialog discord;
|
||||
public JoinDialog join;
|
||||
public HostDialog host;
|
||||
public MenuDialog menu;
|
||||
public PausedDialog paused;
|
||||
public SettingsMenuDialog settings;
|
||||
public ControlsDialog controls;
|
||||
public MapEditorDialog editor;
|
||||
@ -138,7 +138,7 @@ public class UI extends SceneModule{
|
||||
upgrades = new UpgradeDialog();
|
||||
levels = new LevelDialog();
|
||||
settings = new SettingsMenuDialog();
|
||||
menu = new MenuDialog();
|
||||
paused = new PausedDialog();
|
||||
about = new AboutDialog();
|
||||
host = new HostDialog();
|
||||
|
||||
|
@ -169,10 +169,10 @@ public class LoadDialog extends FloatingDialog{
|
||||
try{
|
||||
slot.load();
|
||||
GameState.set(State.playing);
|
||||
Vars.ui.menu.hide();
|
||||
Vars.ui.paused.hide();
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
Vars.ui.menu.hide();
|
||||
Vars.ui.paused.hide();
|
||||
GameState.set(State.menu);
|
||||
Vars.control.reset();
|
||||
Vars.ui.showError("$text.save.corrupted");
|
||||
|
@ -15,12 +15,12 @@ import io.anuke.ucore.util.Bundles;
|
||||
|
||||
import static io.anuke.mindustry.Vars.ui;
|
||||
|
||||
public class MenuDialog extends FloatingDialog{
|
||||
public class PausedDialog extends FloatingDialog{
|
||||
private SaveDialog save = new SaveDialog();
|
||||
private LoadDialog load = new LoadDialog();
|
||||
public boolean wasPaused = false;
|
||||
|
||||
public MenuDialog() {
|
||||
public PausedDialog() {
|
||||
super("$text.menu");
|
||||
setup();
|
||||
}
|
@ -44,11 +44,11 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
if(!GameState.is(State.menu)){
|
||||
wasPaused = GameState.is(State.paused);
|
||||
if(menu.getScene() != null){
|
||||
wasPaused = ((io.anuke.mindustry.ui.dialogs.MenuDialog)menu).wasPaused;
|
||||
wasPaused = ((PausedDialog)menu).wasPaused;
|
||||
}
|
||||
if(!Net.active()) GameState.set(State.paused);
|
||||
//TODO hide menu
|
||||
Vars.ui.menu.hide();
|
||||
Vars.ui.paused.hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class HudFragment implements Fragment{
|
||||
defaults().size(dsize).left();
|
||||
float isize = 40;
|
||||
|
||||
menu = new imagebutton("icon-menu", isize, ui.menu::show).get();
|
||||
menu = new imagebutton("icon-menu", isize, ui.paused::show).get();
|
||||
|
||||
flip = new imagebutton("icon-arrow-up", isize, ()->{
|
||||
if(wavetable.getActions().size != 0) return;
|
||||
|
Loading…
Reference in New Issue
Block a user