Fixed minor bug with pause menu not being removed properly
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@ project(":core") {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
//compile fileTree(dir: '../core/lib', include: '*.jar')
|
//compile fileTree(dir: '../core/lib', include: '*.jar')
|
||||||
compile 'com.github.Anuken:ucore:88b945b'
|
//compile 'com.github.Anuken:ucore:88b945b'
|
||||||
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
||||||
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
|
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -284,13 +284,13 @@ public class Control extends RendererModule{
|
|||||||
|
|
||||||
if(Inputs.keyUp(Keys.O)){
|
if(Inputs.keyUp(Keys.O)){
|
||||||
Timers.mark();
|
Timers.mark();
|
||||||
SaveIO.write(Gdx.files.local("mapsave.mds"));
|
SaveIO.write(Gdx.files.local("mapsave.mins"));
|
||||||
log("Save time taken: " + Timers.elapsed());
|
log("Save time taken: " + Timers.elapsed());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Inputs.keyUp(Keys.P)){
|
if(Inputs.keyUp(Keys.P)){
|
||||||
Timers.mark();
|
Timers.mark();
|
||||||
SaveIO.load(Gdx.files.local("mapsave.mds"));
|
SaveIO.load(Gdx.files.local("mapsave.mins"));
|
||||||
log("Load time taken: " + Timers.elapsed());
|
log("Load time taken: " + Timers.elapsed());
|
||||||
Renderer.clearTiles();
|
Renderer.clearTiles();
|
||||||
}
|
}
|
||||||
@@ -303,7 +303,7 @@ public class Control extends RendererModule{
|
|||||||
if(Inputs.keyUp("menu")){
|
if(Inputs.keyUp("menu")){
|
||||||
if(GameState.is(State.paused)){
|
if(GameState.is(State.paused)){
|
||||||
ui.hideMenu();
|
ui.hideMenu();
|
||||||
GameState.set(State.paused);
|
GameState.set(State.playing);
|
||||||
}else{
|
}else{
|
||||||
ui.showMenu();
|
ui.showMenu();
|
||||||
GameState.set(State.paused);
|
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.Tile;
|
||||||
import io.anuke.mindustry.world.blocks.Blocks;
|
import io.anuke.mindustry.world.blocks.Blocks;
|
||||||
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||||
import io.anuke.ucore.core.Draw;
|
import io.anuke.ucore.core.*;
|
||||||
import io.anuke.ucore.core.Graphics;
|
|
||||||
import io.anuke.ucore.core.Inputs;
|
|
||||||
import io.anuke.ucore.entities.DestructibleEntity;
|
import io.anuke.ucore.entities.DestructibleEntity;
|
||||||
import io.anuke.ucore.entities.Entities;
|
import io.anuke.ucore.entities.Entities;
|
||||||
import io.anuke.ucore.entities.Entity;
|
import io.anuke.ucore.entities.Entity;
|
||||||
@@ -69,7 +67,9 @@ public class Renderer{
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
int rangex = control.rangex, rangey = control.rangey;
|
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){
|
if(l == 0){
|
||||||
Draw.surface("shadow");
|
Draw.surface("shadow");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class UI extends SceneModule{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(){
|
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();
|
upgrades = new UpgradeDialog();
|
||||||
|
|
||||||
@@ -128,6 +128,7 @@ public class UI extends SceneModule{
|
|||||||
|
|
||||||
prefs.checkPref("tutorial", "Show tutorial Window", true);
|
prefs.checkPref("tutorial", "Show tutorial Window", true);
|
||||||
prefs.checkPref("fps", "Show FPS", false);
|
prefs.checkPref("fps", "Show FPS", false);
|
||||||
|
prefs.checkPref("noshadows", "Disable shadows", false);
|
||||||
|
|
||||||
keys = new KeybindDialog();
|
keys = new KeybindDialog();
|
||||||
|
|
||||||
@@ -537,6 +538,10 @@ public class UI extends SceneModule{
|
|||||||
|
|
||||||
public void hideMenu(){
|
public void hideMenu(){
|
||||||
menu.hide();
|
menu.hide();
|
||||||
|
|
||||||
|
if(scene.getKeyboardFocus() != null && scene.getKeyboardFocus() instanceof Dialog){
|
||||||
|
((Dialog)scene.getKeyboardFocus()).hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showTutorial(){
|
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 baseCameraScale = Math.round(Unit.dp.inPixels(4));
|
||||||
public static final int zoomScale = Math.round(Unit.dp.inPixels(1));
|
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
|
//turret and enemy shoot speed inverse multiplier
|
||||||
public static final int multiplier = android ? 3 : 1;
|
public static final int multiplier = android ? 3 : 1;
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user