diff --git a/build.gradle b/build.gradle index 75edefa436..03164a0771 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,7 @@ project(":core") { dependencies { //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-ai:1.8.1" } diff --git a/core/lib/ucore.jar b/core/lib/ucore.jar deleted file mode 100644 index b6aa3b6ee1..0000000000 Binary files a/core/lib/ucore.jar and /dev/null differ diff --git a/core/src/io/anuke/mindustry/Control.java b/core/src/io/anuke/mindustry/Control.java index 97c27b14b3..41bc46c61d 100644 --- a/core/src/io/anuke/mindustry/Control.java +++ b/core/src/io/anuke/mindustry/Control.java @@ -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); diff --git a/core/src/io/anuke/mindustry/Renderer.java b/core/src/io/anuke/mindustry/Renderer.java index ec718d179a..3fbde13c0f 100644 --- a/core/src/io/anuke/mindustry/Renderer.java +++ b/core/src/io/anuke/mindustry/Renderer.java @@ -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"); } diff --git a/core/src/io/anuke/mindustry/UI.java b/core/src/io/anuke/mindustry/UI.java index 5b0712fb19..d6df72dd97 100644 --- a/core/src/io/anuke/mindustry/UI.java +++ b/core/src/io/anuke/mindustry/UI.java @@ -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(){ diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index 65d0a5bf40..12394df315 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -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; diff --git a/desktop/mapsave.mds b/desktop/mapsave.mds deleted file mode 100644 index 35b843f084..0000000000 Binary files a/desktop/mapsave.mds and /dev/null differ