Skip to content
Snippets Groups Projects
Commit 4d3dd157 authored by Luboš Horáček's avatar Luboš Horáček
Browse files

#11 Game titles

parent 6cc23631
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ public final class GameMenuAssets {
public static enum GameMenuLayers {
FORE, MID, BACK;
FORE, MID, BACK, TITLE, STARTBUTTON;
}
private static final String GAMEMENU_PATH = "screen/gamemenu/";
......@@ -30,6 +30,11 @@ public final class GameMenuAssets {
public static final String DOOR_PRESSED = GAMEMENU_PATH + "streetdoor_pressed.png";
public static final String PROFILE_PRESSED = GAMEMENU_PATH + "profile_pressed.png";
public static final String DIFF_THUMB = GAMEMENU_PATH + "difficultyseekbar_thumb.png";
public static final String DIFF_THUMB_EASY = GAMEMENU_PATH + "difficultyseekbar_thumb_easy.png";
public static final String DIFF_THUMB_HARD = GAMEMENU_PATH + "difficultyseekbar_thumb_hard.png";
public static final String DIFF_THUMB_MEDIUM = GAMEMENU_PATH + "difficultyseekbar_thumb_medium.png";
public static final String GAME_ROBBERY_BASE = "bankovniloupez";
public static final String GAME_PURSUIT_BASE = "pronasledovani";
public static final String GAME_KIDNAPPING_BASE = "unos";
......@@ -47,6 +52,11 @@ public final class GameMenuAssets {
textures.add(OFFICE_HELP);
textures.add(VIGNETTE);
textures.add(DIFF_THUMB);
textures.add(DIFF_THUMB_EASY);
textures.add(DIFF_THUMB_HARD);
textures.add(DIFF_THUMB_MEDIUM);
textures.add(ENCYCLOPEDIA_PRESSED);
textures.add(HALLOFFAME_PRESSED);
textures.add(STATISTICS_PRESSED);
......
package cz.nic.tablexia.screen.gamemenu.pages;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import cz.nic.tablexia.game.GameDefinition;
......@@ -25,6 +26,18 @@ public class GameMenuPage extends MenuPage {
batch.draw(getScreen().getTexture(GameMenuAssets.getResourcePath(game, GameMenuAssets.GameMenuLayers.BACK)), getX(), getY(), getWidth(), getHeight());
batch.draw(getScreen().getTexture(GameMenuAssets.getResourcePath(game, GameMenuAssets.GameMenuLayers.MID)), getX(), getY(), getWidth(), getHeight());
batch.draw(getScreen().getTexture(GameMenuAssets.getResourcePath(game, GameMenuAssets.GameMenuLayers.FORE)), getX(), getY(), getWidth(), getHeight());
Texture title = getScreen().getTexture(GameMenuAssets.getResourcePath(game, GameMenuAssets.GameMenuLayers.TITLE));
int titleX = (int) (getStage().getWidth() * 0.2);
int titleY = (int) (getStage().getHeight() - (getStage().getHeight() * 0.05));
int titleWidth = (int) (getWidth() * 0.6);
int titleHeight = (int) (titleWidth * (title.getHeight() / getWidth()));
batch.draw(title, getX() + titleX, getY() + titleY - titleHeight, titleWidth, titleHeight);
//batch.draw(getScreen().getTexture(GameMenuAssets.getResourcePath(game, GameMenuAssets.GameMenuLayers.FORE)), getX(), getY(), getWidth(), getHeight());
// batch.enableBlending();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment