Renamed some dialogs, final uCore update

This commit is contained in:
Anuken 2018-01-05 12:51:22 -05:00
parent 32e1c6e3b8
commit 60c11b84aa
7 changed files with 12 additions and 12 deletions

View File

@ -21,7 +21,7 @@ allprojects {
appName = "Mindustry"
gdxVersion = '1.9.8'
aiVersion = '1.8.1'
uCoreVersion = 'b882f59';
uCoreVersion = '5e4e43ed39';
}
repositories {

View File

@ -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);
}
}

View File

@ -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();

View File

@ -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");

View File

@ -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();
}

View File

@ -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();
}
});

View File

@ -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;