From: fred-boy Date: Sun, 22 Apr 2018 11:58:09 +0000 (+0700) Subject: Remove junk from gui X-Git-Tag: alpha0.2.1~2 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=db8aab736bf94d9563aa00ac4e01b578bc89ab0d;p=cavedroid.git Remove junk from gui --- diff --git a/core/src/ru/deadsoftware/cavecraft/Renderer.java b/core/src/ru/deadsoftware/cavecraft/Renderer.java index 581145a..928d1fb 100644 --- a/core/src/ru/deadsoftware/cavecraft/Renderer.java +++ b/core/src/ru/deadsoftware/cavecraft/Renderer.java @@ -29,6 +29,10 @@ public abstract class Renderer { public float getHeight() {return camera.viewportHeight;} + public void setFontScale(float scale) { + Assets.minecraftFont.getData().setScale(scale); + } + public void setFontColor(int r, int g, int b) { Assets.minecraftFont.setColor(r/255f, g/255f, b/255f, 1f); } diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java b/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java index a1a4c66..480a635 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java @@ -184,14 +184,6 @@ public class GameRenderer extends Renderer{ if (CaveGame.TOUCH) drawTouchGui(); - setFontColor(255,255,255); - drawString("CaveCraft "+CaveGame.VERSION, 0, 0); - drawString("FPS: "+GameScreen.FPS, 0, 12); - drawString("X: "+(int)(gameProc.player.position.x/16), 0, 24); - drawString("Y: "+(gameProc.world.getHeight()-(int)(gameProc.player.position.y/16)), 0, 36); - drawString("Seed: "+WorldGen.getSeed(), 0, 48); - drawString("Mobs: "+gameProc.mobs.size, 0, 60); - spriteBatch.end(); } diff --git a/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java b/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java index 76f2355..c4dc075 100644 --- a/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java +++ b/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java @@ -26,6 +26,7 @@ public class MenuRenderer extends Renderer { private void drawButton(Button button) { spriteBatch.draw(Assets.menuButton[button.getType()], button.getX(), button.getY()); + setFontColor(255,255,255); drawString(button.getLabel(), (button.getX()+button.getWidth()/2)-Assets.getStringWidth(button.getLabel())/2, (button.getY()+button.getHeight()/2)-Assets.getStringHeight(button.getLabel())/2);