Fixed minor bug with pause menu not being removed properly
This commit is contained in:
@@ -284,13 +284,13 @@ public class Control extends RendererModule{
|
||||
|
||||
if(Inputs.keyUp(Keys.O)){
|
||||
Timers.mark();
|
||||
SaveIO.write(Gdx.files.local("mapsave.mds"));
|
||||
SaveIO.write(Gdx.files.local("mapsave.mins"));
|
||||
log("Save time taken: " + Timers.elapsed());
|
||||
}
|
||||
|
||||
if(Inputs.keyUp(Keys.P)){
|
||||
Timers.mark();
|
||||
SaveIO.load(Gdx.files.local("mapsave.mds"));
|
||||
SaveIO.load(Gdx.files.local("mapsave.mins"));
|
||||
log("Load time taken: " + Timers.elapsed());
|
||||
Renderer.clearTiles();
|
||||
}
|
||||
@@ -303,7 +303,7 @@ public class Control extends RendererModule{
|
||||
if(Inputs.keyUp("menu")){
|
||||
if(GameState.is(State.paused)){
|
||||
ui.hideMenu();
|
||||
GameState.set(State.paused);
|
||||
GameState.set(State.playing);
|
||||
}else{
|
||||
ui.showMenu();
|
||||
GameState.set(State.paused);
|
||||
|
||||
@@ -13,9 +13,7 @@ import io.anuke.mindustry.input.AndroidInput;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.Blocks;
|
||||
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||
import io.anuke.ucore.core.Draw;
|
||||
import io.anuke.ucore.core.Graphics;
|
||||
import io.anuke.ucore.core.Inputs;
|
||||
import io.anuke.ucore.core.*;
|
||||
import io.anuke.ucore.entities.DestructibleEntity;
|
||||
import io.anuke.ucore.entities.Entities;
|
||||
import io.anuke.ucore.entities.Entity;
|
||||
@@ -69,7 +67,9 @@ public class Renderer{
|
||||
Draw.reset();
|
||||
int rangex = control.rangex, rangey = control.rangey;
|
||||
|
||||
for(int l = 0; l < 4; l++){
|
||||
boolean noshadows = Settings.getBool("noshadows");
|
||||
|
||||
for(int l = (noshadows ? 1 : 0); l < 4; l++){
|
||||
if(l == 0){
|
||||
Draw.surface("shadow");
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public class UI extends SceneModule{
|
||||
|
||||
@Override
|
||||
public void init(){
|
||||
//TODO oh my god just move these dialogs to different files
|
||||
//TODO just move these dialogs to different files
|
||||
|
||||
upgrades = new UpgradeDialog();
|
||||
|
||||
@@ -128,6 +128,7 @@ public class UI extends SceneModule{
|
||||
|
||||
prefs.checkPref("tutorial", "Show tutorial Window", true);
|
||||
prefs.checkPref("fps", "Show FPS", false);
|
||||
prefs.checkPref("noshadows", "Disable shadows", false);
|
||||
|
||||
keys = new KeybindDialog();
|
||||
|
||||
@@ -537,6 +538,10 @@ public class UI extends SceneModule{
|
||||
|
||||
public void hideMenu(){
|
||||
menu.hide();
|
||||
|
||||
if(scene.getKeyboardFocus() != null && scene.getKeyboardFocus() instanceof Dialog){
|
||||
((Dialog)scene.getKeyboardFocus()).hide();
|
||||
}
|
||||
}
|
||||
|
||||
public void showTutorial(){
|
||||
|
||||
@@ -18,7 +18,7 @@ public class Vars{
|
||||
public static final int baseCameraScale = Math.round(Unit.dp.inPixels(4));
|
||||
public static final int zoomScale = Math.round(Unit.dp.inPixels(1));
|
||||
|
||||
public static final boolean debug = true;
|
||||
public static boolean debug = false;
|
||||
|
||||
//turret and enemy shoot speed inverse multiplier
|
||||
public static final int multiplier = android ? 3 : 1;
|
||||
|
||||
Reference in New Issue
Block a user