diff --git a/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java b/core/src/ru/deadsoftware/cavecraft/menu/MenuRenderer.java
index 76f2355760cbf15245cfb5b8fad6bbc526839f63..482db61499fe5b5e1b6a902c14f65a944526e09b 100644 (file)
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);
@Override
public void render() {
spriteBatch.begin();
- for (int x=0; x<=getWidth(); x++)
- for (int y=0; y<=getHeight(); y++)
- spriteBatch.draw(Items.BLOCKS.get("dirt").getTexture(),x*16,y*16);
+ for (int x=0; x<=getWidth()/16; x++)
+ for (int y=0; y<=getHeight()/16; y++) {
+ if (y == 0) spriteBatch.draw(Items.BLOCKS.get("grass").getTexture(), x * 16, y * 16);
+ else spriteBatch.draw(Items.BLOCKS.get("dirt").getTexture(), x * 16, y * 16);
+ spriteBatch.draw(Assets.shade,x*16,y*16);
+ }
spriteBatch.draw(Assets.gameLogo, getWidth()/2-Assets.gameLogo.getWidth()/2, 0);
for (Button button : buttons) {
if (button.getRect().contains(Gdx.input.getX()*getWidth()/GameScreen.getWidth(),
drawButton(button);
}
drawString("CaveCraft "+CaveGame.VERSION,0,
- getHeight()-Assets.getStringHeight("CaveCraft "+CaveGame.VERSION)*2);
+ getHeight()-Assets.getStringHeight("CaveCraft "+CaveGame.VERSION)*1.5f);
spriteBatch.end();
}
}