Java Code Examples for com.badlogic.gdx.scenes.scene2d.ui.Label#setFontScale()

The following examples show how to use com.badlogic.gdx.scenes.scene2d.ui.Label#setFontScale() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Norii   File: BottomMenu.java    License: Apache License 2.0 6 votes vote down vote up
private void updateStatsMenu() {
	final float statsWidth = Gdx.graphics.getWidth() - (HERO_PORTRAIT_WIDTH_TILES * tileWidthPixel);
	final float statsHeight = BOTTOM_MENU_HEIGHT_TILES * tileHeightPixel;

	statsGroup.setHeight(statsHeight);
	statsGroup.setWidth(statsWidth);
	final LabelStyle labelStyle = Utility.createLabelStyle("fonts/BreatheFireIi-2z9W.ttf", 105, 1, Color.LIGHT_GRAY, 1, 1);
	for (final Actor actor : statsGroup.getChildren()) {
		if (actor.getClass() == Label.class) {
			final Label label = (Label) actor;
			label.setStyle(labelStyle);
			label.setFontScale(Gdx.graphics.getWidth() * LABEL_FONT_SCALE, Gdx.graphics.getHeight() * LABEL_FONT_SCALE);
		}
	}
	statsGroup.setPosition(HERO_PORTRAIT_WIDTH_TILES * tileWidthPixel, 0);
}
 
Example 2
Source Project: Unlucky   File: SMoveTooltip.java    License: MIT License 6 votes vote down vote up
public SMoveTooltip(Skin skin, Label.LabelStyle ls) {
    super("", skin);
    this.ls = ls;

    desc = new Label("", skin);
    desc.setFontScale(0.5f);
    this.getTitleLabel().setFontScale(0.5f);
    left();
    // fix padding because of scaling
    this.padTop(12);
    this.padLeft(2);
    this.padBottom(4);
    add(desc);
    pack();
    this.setTouchable(Touchable.disabled);
    this.setVisible(false);
    this.setMovable(false);
    this.setOrigin(Align.bottomLeft);
}
 
Example 3
Source Project: Unlucky   File: ItemTooltip.java    License: MIT License 6 votes vote down vote up
public ItemTooltip(Skin skin) {
    super("", skin);
    desc = new Label("", skin);
    desc.setFontScale(0.5f);
    this.getTitleLabel().setFontScale(0.5f);

    common = new Label.LabelStyle(skin.getFont("default-font"), new Color(1, 1, 1, 1));
    rare = new Label.LabelStyle(skin.getFont("default-font"), new Color(0, 200 / 255.f, 0, 1));
    epic = new Label.LabelStyle(skin.getFont("default-font"), new Color(0, 180 / 255.f, 1, 1));
    legendary = new Label.LabelStyle(skin.getFont("default-font"), new Color(164 / 255.f, 80 / 255.f, 1, 1));

    left();
    // fix padding because of scaling
    this.padTop(12);
    this.padLeft(2);
    this.padBottom(4);
    add(desc);
    pack();
    this.setTouchable(Touchable.disabled);
    this.setVisible(false);
    this.setMovable(false);
    this.setOrigin(Align.bottomLeft);
}
 
Example 4
Source Project: Norii   File: PauseMenuUI.java    License: Apache License 2.0 5 votes vote down vote up
private void createUI() {
	final Skin statusUISkin = Utility.getStatusUISkin();
	title = new Label("Pause", statusUISkin);
	title.setFontScale(TITLE_FONT_SCALE);
	resumeButton = new TextButton("Resume", statusUISkin);
	settingButton = new TextButton("Settings", statusUISkin);
	mainMenuButton = new TextButton("Main Menu", statusUISkin);
}
 
Example 5
Source Project: Unlucky   File: MenuScreen.java    License: MIT License 5 votes vote down vote up
public MenuScreen(final Unlucky game, final ResourceManager rm) {
    super(game, rm);

    menuStyle = new Label.LabelStyle(rm.pixel10, new Color(79 / 255.f, 79 / 255.f, 117 / 255.f, 1));

    // one for each letter
    titleMoves = new Moving[7];
    letters = new Image[7];
    for (int i = 0; i < 7; i++) {
        titleMoves[i] = new Moving(new Vector2(), new Vector2(), 0);
        letters[i] = new Image(rm.title[i]);
        stage.addActor(letters[i]);
    }

    handlePlayButton();
    handleOptionButtons();

    battleLabel = new Label("Battle", menuStyle);
    battleLabel.setSize(80, 40);
    battleLabel.setFontScale(1.5f);
    battleLabel.setTouchable(Touchable.disabled);
    battleLabel.setAlignment(Align.center);
    battleLabel.setPosition(60, 35);

    stage.addActor(battleLabel);

    createCreditsScreen();

    // menu music
    rm.menuTheme.setLooping(true);
    rm.menuTheme.play();
}
 
Example 6
@Override
public void process(final LmlParser parser, final LmlTag tag, final Label actor, final String rawAttributeData) {
    actor.setFontScale(parser.parseFloat(rawAttributeData, actor));
}
 
Example 7
Source Project: Norii   File: UIWindow.java    License: Apache License 2.0 4 votes vote down vote up
private void updateSizeLabels(Actor actor) {
	final Label label = (Label) actor;
	label.setFontScale(Gdx.graphics.getWidth() * FONT_SCALE_FACTOR, Gdx.graphics.getHeight() * FONT_SCALE_FACTOR);
}
 
Example 8
Source Project: Unlucky   File: Unlucky.java    License: MIT License 4 votes vote down vote up
public void create() {
       batch = new SpriteBatch();
       rm = new ResourceManager();
       player = new Player("player", rm);

       save = new Save(player, "save.json");
       save.load(rm);

       // debugging
       fps = new Label("", new Label.LabelStyle(rm.pixel10, Color.RED));
       fps.setFontScale(0.5f);
       fps.setVisible(player.settings.showFps);

       inventoryUI = new InventoryUI(this, player, rm);
       menuScreen = new MenuScreen(this, rm);
       gameScreen = new GameScreen(this, rm);
       worldSelectScreen = new WorldSelectScreen(this, rm);
       levelSelectScreen = new LevelSelectScreen(this, rm);
       inventoryScreen = new InventoryScreen(this, rm);
       shopScreen = new ShopScreen(this, rm);
       smoveScreen = new SpecialMoveScreen(this, rm);
       statisticsScreen = new StatisticsScreen(this, rm);
       victoryScreen = new VictoryScreen(this, rm);
       settingsScreen = new SettingsScreen(this, rm);

       // create parallax background
       menuBackground = new Background[3];

       // ordered by depth
       // sky
       menuBackground[0] = new Background(rm.titleScreenBackground[0],
           (OrthographicCamera) menuScreen.getStage().getCamera(), new Vector2(0, 0));
       menuBackground[0].setVector(0, 0);
       // back clouds
       menuBackground[1] = new Background(rm.titleScreenBackground[2],
           (OrthographicCamera) menuScreen.getStage().getCamera(), new Vector2(0.3f, 0));
       menuBackground[1].setVector(20, 0);
       // front clouds
       menuBackground[2] = new Background(rm.titleScreenBackground[1],
           (OrthographicCamera) menuScreen.getStage().getCamera(), new Vector2(0.3f, 0));
       menuBackground[2].setVector(60, 0);

       // profiler
       GLProfiler.enable();

       this.setScreen(menuScreen);
}
 
Example 9
Source Project: Unlucky   File: BattleScene.java    License: MIT License 4 votes vote down vote up
public BattleScene(GameScreen gameScreen, TileMap tileMap, Player player, Battle battle,
                   BattleUIHandler uiHandler, Stage stage, ResourceManager rm) {
    super(gameScreen, tileMap, player, battle, uiHandler, rm);

    this.stage = stage;

    BitmapFont font = rm.pixel10;
    Label.LabelStyle ls = new Label.LabelStyle(font, new Color(255, 255, 255, 255));

    weakest = new Label.LabelStyle(font, new Color(200 / 255.f, 200 / 255.f, 200 / 255.f, 1));
    weaker = new Label.LabelStyle(font, new Color(0, 225 / 255.f, 0, 1));
    same = new Label.LabelStyle(font, new Color(1, 1, 1, 1));
    stronger = new Label.LabelStyle(font, new Color(1, 175 / 255.f, 0, 1));
    strongest = new Label.LabelStyle(font, new Color(225 / 255.f, 0, 0, 1));

    // create player hud
    playerHud = new MovingImageUI(rm.playerhpbar145x40, new Vector2(-72, 100), new Vector2(0, 100), 100.f, 72, 20);
    playerHpBar = new HealthBar(player, stage, shapeRenderer, 48, 4, new Vector2(), new Color(0, 225 / 255.f, 0, 1));
    playerHudLabel = new Label("", ls);
    playerHudLabel.setFontScale(0.5f);
    playerHudLabel.setSize(49, 6);
    playerHudLabel.setTouchable(Touchable.disabled);

    // create enemy hud
    enemyHud = new MovingImageUI(rm.enemyhpbar145x40, new Vector2(200, 100), new Vector2(128, 100), 100.f, 72, 20);
    enemyHpBar = new HealthBar(null, stage, shapeRenderer, 48, 4, new Vector2(), new Color(225 / 255.f, 0, 0, 1));
    enemyHudLabel = new Label("", ls);
    enemyHudLabel.setFontScale(0.5f);
    enemyHudLabel.setSize(49, 6);
    enemyHudLabel.setTouchable(Touchable.disabled);

    // create player sprite
    playerSprite = new Moving(PLAYER_ORIGIN, new Vector2(35, 50), 75.f);
    // create enemy sprite
    enemySprite = new Moving(ENEMY_ORIGIN, new Vector2(120, 50), 75.f);

    // create animations
    attackAnims = new AnimationManager[3];
    for (int i = 0; i < 3; i++) {
        attackAnims[i] = new AnimationManager(rm.battleAttacks64x64, 3, i, 1 / 6f);
    }
    healAnim = new AnimationManager(rm.battleHeal96x96, 3, 0, 1 / 5f);

    factory = new ParticleFactory((OrthographicCamera) stage.getCamera(), rm);

    stage.addActor(playerHud);
    stage.addActor(playerHudLabel);
    stage.addActor(enemyHud);
    stage.addActor(enemyHudLabel);
}
 
Example 10
Source Project: Unlucky   File: BattleEventHandler.java    License: MIT License 4 votes vote down vote up
public BattleEventHandler(GameScreen gameScreen, TileMap tileMap, Player player, Battle battle,
                          BattleUIHandler uiHandler, Stage stage, final ResourceManager rm) {
    super(gameScreen, tileMap, player, battle, uiHandler, rm);

    this.stage = stage;

    // create main UI
    ui = new Image(rm.dialogBox400x80);
    ui.setSize(200, 40);
    ui.setPosition(0, 0);
    ui.setTouchable(Touchable.disabled);

    stage.addActor(ui);

    // create Labels
    BitmapFont bitmapFont = rm.pixel10;
    Label.LabelStyle font = new Label.LabelStyle(bitmapFont, new Color(0, 0, 0, 255));

    textLabel = new Label("", font);
    textLabel.setWrap(true);
    textLabel.setTouchable(Touchable.disabled);
    textLabel.setFontScale(1.7f / 2);
    textLabel.setPosition(8, 6);
    textLabel.setSize(175, 26);
    textLabel.setAlignment(Align.topLeft);
    stage.addActor(textLabel);

    clickLabel = new Label("", font);
    clickLabel.setSize(200, 120);
    clickLabel.setPosition(0, 0);

    final Player p = player;
    clickLabel.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            if (dialogIndex + 1 == currentDialog.length && endCycle) {
                if (!p.settings.muteSfx) rm.textprogression.play(p.settings.sfxVolume);
                // the text animation has run through every element of the text array
                endDialog();
                handleBattleEvent(nextEvent);
            }
            // after a cycle of text animation ends, clicking the UI goes to the next cycle
            else if (endCycle && dialogIndex < currentDialog.length) {
                if (!p.settings.muteSfx) rm.textprogression.play(p.settings.sfxVolume);
                dialogIndex++;
                reset();
                currentText = currentDialog[dialogIndex];
                anim = currentText.split("");
                beginCycle = true;
            }
            // clicking on the box during a text animation completes it early
            else if (beginCycle && !endCycle) {
                resultingText = currentText;
                textLabel.setText(resultingText);
                beginCycle = false;
                endCycle = true;
            }
        }
    });
    stage.addActor(clickLabel);
}
 
Example 11
Source Project: Unlucky   File: LevelUpScreen.java    License: MIT License 4 votes vote down vote up
public LevelUpScreen(GameScreen gameScreen, TileMap tileMap, Player player, ResourceManager rm) {
    super(gameScreen, tileMap, player, rm);

    // create bg
    ImageButton.ImageButtonStyle style = new ImageButton.ImageButtonStyle();
    style.imageUp = new TextureRegionDrawable(rm.levelupscreen400x240);
    ui = new ImageButton(style);
    ui.setSize(200, 120);
    ui.setPosition(0, 0);
    ui.setTouchable(Touchable.disabled);
    stage.addActor(ui);

    handleClick();

    // create animation
    levelUpAnim = new AnimationManager(rm.levelUp96x96, 4, 0, 1 / 4f);

    // create labels
    BitmapFont font = rm.pixel10;
    Label.LabelStyle titleFont = new Label.LabelStyle(font, new Color(0, 205 / 255.f, 20 / 255.f, 1));
    Label.LabelStyle stdWhite = new Label.LabelStyle(font, new Color(1, 1, 1, 1));
    Label.LabelStyle yellow = new Label.LabelStyle(font, new Color(1, 212 / 255.f, 0, 1));
    Label.LabelStyle blue = new Label.LabelStyle(font, new Color(0, 190 / 255.f, 1, 1));

    title = new Label("LEVEL UP!", titleFont);
    title.setSize(200, 20);
    title.setPosition(0, 95);
    title.setFontScale(2.5f);
    title.setAlignment(Align.center);
    title.setTouchable(Touchable.disabled);
    stage.addActor(title);

    levelDesc = new Label("You reached level 1", stdWhite);
    levelDesc.setSize(200, 20);
    levelDesc.setPosition(0, 80);
    levelDesc.setAlignment(Align.center);
    levelDesc.setTouchable(Touchable.disabled);
    stage.addActor(levelDesc);

    statsDescs = new Label[statNames.length];
    stats = new Label[statNames.length];
    increases = new Label[statNames.length];

    for (int i = 0; i < statNames.length; i++) {
        statsDescs[i] = new Label(statNames[i], stdWhite);
        statsDescs[i].setSize(10, 10);
        statsDescs[i].setFontScale(1.3f / 2);
        statsDescs[i].setPosition(100, 17 + (i * 12));
        statsDescs[i].setAlignment(Align.left);
        statsDescs[i].setTouchable(Touchable.disabled);
        stage.addActor(statsDescs[i]);

        stats[i] = new Label("1330", blue);
        stats[i].setSize(10, 10);
        stats[i].setFontScale(1.3f / 2);
        stats[i].setPosition(140, 17 + (i * 12));
        stats[i].setAlignment(Align.left);
        stats[i].setTouchable(Touchable.disabled);
        stage.addActor(stats[i]);

        increases[i] = new Label("+20", yellow);
        increases[i].setSize(10, 10);
        increases[i].setFontScale(1.3f / 2);
        increases[i].setPosition(170, 17 + (i * 12));
        increases[i].setAlignment(Align.left);
        increases[i].setTouchable(Touchable.disabled);
        stage.addActor(increases[i]);
    }

    clickToContinue = new Label("Click to continue", stdWhite);
    clickToContinue.setSize(200, 10);
    clickToContinue.setFontScale(0.5f);
    clickToContinue.setPosition(0, 2);
    clickToContinue.setAlignment(Align.center);
    clickToContinue.setTouchable(Touchable.disabled);
    stage.addActor(clickToContinue);
}
 
Example 12
Source Project: Unlucky   File: DialogScreen.java    License: MIT License 4 votes vote down vote up
public DialogScreen(GameScreen gameScreen, TileMap tileMap, Player player, final ResourceManager rm) {
    super(gameScreen, tileMap, player, rm);

    // create main UI
    ui = new Image(rm.dialogBox400x80);
    ui.setSize(200, 40);
    ui.setPosition(0, 0);
    ui.setTouchable(Touchable.disabled);

    stage.addActor(ui);

    // create Labels
    BitmapFont bitmapFont = rm.pixel10;
    Label.LabelStyle font = new Label.LabelStyle(bitmapFont, new Color(0, 0, 0, 255));

    textLabel = new Label("", font);
    textLabel.setWrap(true);
    textLabel.setTouchable(Touchable.disabled);
    textLabel.setFontScale(1.7f / 2);
    textLabel.setPosition(8, 6);
    textLabel.setSize(350 / 2, 52 / 2);
    textLabel.setAlignment(Align.topLeft);
    stage.addActor(textLabel);

    clickLabel = new Label("", font);
    clickLabel.setSize(200, 120);
    clickLabel.setPosition(0, 0);

    final Player p = player;
    clickLabel.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            if (dialogIndex + 1 == currentDialog.length && endCycle) {
                if (!p.settings.muteSfx) rm.textprogression.play(p.settings.sfxVolume);
                // the text animation has run through every element of the text array
                endDialog();
                handleEvent(nextEvent);
            }
            // after a cycle of text animation ends, clicking the UI goes to the next cycle
            else if (endCycle && dialogIndex < currentDialog.length) {
                if (!p.settings.muteSfx) rm.textprogression.play(p.settings.sfxVolume);
                dialogIndex++;
                reset();
                currentText = currentDialog[dialogIndex];
                anim = currentText.split("");
                beginCycle = true;
            }
            // clicking on the box during a text animation completes it early
            else if (beginCycle && !endCycle) {
                resultingText = currentText;
                textLabel.setText(resultingText);
                beginCycle = false;
                endCycle = true;
            }
        }
    });
    stage.addActor(clickLabel);
}
 
Example 13
Source Project: Unlucky   File: SettingsScreen.java    License: MIT License 4 votes vote down vote up
public SettingsScreen(final Unlucky game, final ResourceManager rm) {
    super(game, rm);

    // exit button
    stage.addActor(exitButton);
    exitButton.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            if (!game.player.settings.muteSfx) rm.buttonclick0.play(game.player.settings.sfxVolume);
            if (inGame) {
                game.gameScreen.resetGame = false;
                setFadeScreen(game.gameScreen);
                game.gameScreen.hud.settingsDialog.show(game.gameScreen.hud.getStage());
            }
            else {
                game.menuScreen.transitionIn = 2;
                setSlideScreen(game.menuScreen, false);
            }
        }
    });

    // create title label
    banner = new Image(rm.skin, "default-slider");
    banner.setPosition(8, 102);
    banner.setSize(164, 12);
    stage.addActor(banner);

    bannerLabel = new Label("SETTINGS", rm.skin);
    bannerLabel.setStyle(new Label.LabelStyle(rm.pixel10, new Color(1, 212 / 255.f, 0, 1)));
    bannerLabel.setSize(50, 12);
    bannerLabel.setTouchable(Touchable.disabled);
    bannerLabel.setPosition(14, 102);
    bannerLabel.setAlignment(Align.left);
    stage.addActor(bannerLabel);

    bg = new Image(rm.skin, "default-slider");
    bg.setPosition(8, 8);
    bg.setSize(184, 88);
    stage.addActor(bg);

    white = new Label.LabelStyle(rm.pixel10, Color.WHITE);
    description = new Label("SOUND                                 MISC",
        new Label.LabelStyle(rm.pixel10, new Color(1, 212 / 255.f, 0, 1)));
    description.setFontScale(0.75f);
    description.setTouchable(Touchable.disabled);
    description.setPosition(14, 85);
    stage.addActor(description);

    // create settings labels
    settingLabels = new Label[7];
    String[] settingStrs = new String[] {
        "MUSIC VOLUME", "SFX VOLUME", "MUTE MUSIC:", "MUTE SFX:",
        "SHOW ENEMY LEVELS:", "WEATHER ANIMATIONS:", "SHOW FPS:"
    };
    for (int i = 0; i < 7; i++) {
        settingLabels[i] = new Label(settingStrs[i], white);
        settingLabels[i].setTouchable(Touchable.disabled);
        settingLabels[i].setFontScale(0.5f);
        stage.addActor(settingLabels[i]);
    }
    for (int i = 0; i < 2; i++) settingLabels[i].setPosition(14, 76 - i * 24);
    for (int i = 2; i < 4; i++) settingLabels[i].setPosition(14, 26 - (i - 2) * 14);
    for (int i = 4; i < 7; i++) settingLabels[i].setPosition(111, 72 - (i - 4) * 16);

    createSliders();
    createCheckboxes();
}
 
Example 14
@Override
public void process(final LmlParser parser, final LmlTag tag, final Label actor, final String rawAttributeData) {
    actor.setFontScale(parser.parseFloat(rawAttributeData, actor));
}
 
Example 15
Source Project: Bomberman_libGdx   File: MainMenuScreen.java    License: MIT License 4 votes vote down vote up
@Override
public void show() {
    viewport = new FitViewport(640, 480);
    stage = new Stage(viewport, batch);

    font = new BitmapFont(Gdx.files.internal("fonts/foo.fnt"));

    Label.LabelStyle labelStyle = new Label.LabelStyle(font, Color.WHITE);

    Label titleLabel = new Label("Bomberman", labelStyle);
    titleLabel.setFontScale(1.6f);
    titleLabel.setPosition(140, 360);

    Label easyLabel = new Label("Easy", labelStyle);
    easyLabel.setPosition((640 - easyLabel.getWidth()) / 2, 240);

    Label normalLabel = new Label("Normal", labelStyle);
    normalLabel.setPosition((640 - normalLabel.getWidth()) / 2, 180);

    Label hardLabel = new Label("Hard", labelStyle);
    hardLabel.setPosition((640 - hardLabel.getWidth()) / 2, 120);

    Pixmap pixmap = new Pixmap(640, 480, Pixmap.Format.RGB888);
    pixmap.setColor(240.0f / 255.0f, 128 / 255.0f, 0, 1.0f);
    pixmap.fill();
    backgroundTexture = new Texture(pixmap);
    pixmap.dispose();
    Image background = new Image(backgroundTexture);

    indicatorX = 160f;
    indicatorY = 240f;

    TextureAtlas textureAtlas = GameManager.getInstance().getAssetManager().get("img/actors.pack", TextureAtlas.class);
    indicator0 = new Image(new TextureRegion(textureAtlas.findRegion("MainMenuLogo"), 0, 0, 40, 26));
    indicator0.setSize(80f, 52f);
    indicator0.setPosition(indicatorX, indicatorY);

    indicator1 = new Image(new TextureRegion(textureAtlas.findRegion("MainMenuLogo"), 40, 0, 40, 26));
    indicator1.setSize(80f, 52f);
    indicator1.setPosition(indicatorX, indicatorY);
    indicator1.setVisible(false);
    
    indicationsTexture = new Texture("img/indications.png");
    indications = new Image(indicationsTexture);
    indications.setPosition(640f - indications.getWidth() - 12f, 12f);

    stage.addActor(background);
    stage.addActor(indications);
    stage.addActor(titleLabel);
    stage.addActor(easyLabel);
    stage.addActor(normalLabel);
    stage.addActor(hardLabel);
    stage.addActor(indicator0);
    stage.addActor(indicator1);

    currentSelection = 0;
    selected = false;
    
    GameManager.getInstance().playMusic("SuperBomberman-Title.ogg", true);
}
 
Example 16
Source Project: Bomberman_libGdx   File: Hud.java    License: MIT License 4 votes vote down vote up
public Hud(SpriteBatch batch, float width, float height) {
    this.batch = batch;

    AssetManager assetManager = GameManager.getInstance().getAssetManager();
    textureAtlas = assetManager.get("img/actors.pack", TextureAtlas.class);
    bombSprite = new Sprite(new TextureRegion(textureAtlas.findRegion("Bomb"), 0, 0, 16, 16));
    bombSprite.setBounds(15.0f, 11.5f, 1, 1);

    Pixmap pixmap = new Pixmap(5, 15, Pixmap.Format.RGBA8888);
    pixmap.setColor(240.0f / 255.0f, 128 / 255.0f, 0, 1.0f);
    pixmap.fill();

    bgTexture = new Texture(pixmap);

    pixmap.setColor(1, 1, 1, 1);
    pixmap.fill();
    bombTimerTexture = new Texture(pixmap);
    pixmap.dispose();

    bombTimerSprite = new Sprite(bombTimerTexture);
    bombTimerSprite.setBounds(16f, 12.5f, 3.0f, 0.2f);

    TextureRegion itemTextureRegion = textureAtlas.findRegion("Items");
    powerSprite = new Sprite(new TextureRegion(itemTextureRegion, 16 * 1, 0, 16, 16));
    powerSprite.setBounds(leftAlignment, 9.0f, 1, 1);

    speedSprite = new Sprite(new TextureRegion(itemTextureRegion, 16 * 2, 0, 16, 16));
    speedSprite.setBounds(leftAlignment, 8.0f, 1, 1);

    kickSprite = new Sprite(new TextureRegion(itemTextureRegion, 16 * 3, 0, 16, 16));
    kickSprite.setBounds(leftAlignment, 7.0f, 1, 1);

    remoteSprite = new Sprite(new TextureRegion(itemTextureRegion, 16 * 4, 0, 16, 16));
    remoteSprite.setBounds(leftAlignment, 6.0f, 1, 1);

    Array<TextureRegion> keyFrames = new Array<TextureRegion>();
    for (int i = 0; i < 5; i++) {
        keyFrames.add(new TextureRegion(textureAtlas.findRegion("Bomberman_big"), 32 * i, 0, 32, 48));
    }
    bigBombermanAnimation = new Animation(0.2f, keyFrames, Animation.PlayMode.LOOP_PINGPONG);
    bigBombermanSprite = new Sprite(bigBombermanAnimation.getKeyFrame(0));
    bigBombermanSprite.setBounds(17.5f, 0.5f, 2f, 3f);
    stateTime = 0;

    FitViewport viewport = new FitViewport(width * SCALE, height * SCALE);
    stage = new Stage(viewport, batch);
    font = new BitmapFont(Gdx.files.internal("fonts/foo.fnt"));
    Label.LabelStyle labelStyle = new Label.LabelStyle(font, Color.WHITE);
    fpsLabel = new Label("FPS:", labelStyle);
    fpsLabel.setFontScale(0.3f);
    fpsLabel.setPosition(16 * SCALE, -0.8f * SCALE);
    fpsLabel.setVisible(showFPS);
    
    levelLabel = new Label("Level", labelStyle);
    levelLabel.setPosition(15.5f * SCALE, 3 * SCALE);
    levelLabel.setFontScale(0.4f);

    playerLivesLabel = new Label("" + GameManager.playerLives, labelStyle);
    playerLivesLabel.setFontScale(0.5f);
    playerLivesLabel.setPosition(16.8f * SCALE, 12.8f * SCALE);

    Image bombermanImage = new Image(new TextureRegion(textureAtlas.findRegion("Items"), 16 * 5, 0, 16, 16));
    bombermanImage.setPosition(leftAlignment * SCALE, 13.5f * SCALE);

    xLabel = new Label("X", labelStyle);
    xLabel.setFontScale(0.4f);
    xLabel.setPosition(16.8f * SCALE, 6.3f * SCALE);

    zLabel = new Label("Z", labelStyle);
    zLabel.setFontScale(0.4f);
    zLabel.setPosition(16.8f * SCALE, 5.3f * SCALE);

    stage.addActor(fpsLabel);
    stage.addActor(levelLabel);
    stage.addActor(playerLivesLabel);
    stage.addActor(bombermanImage);
    stage.addActor(xLabel);
    stage.addActor(zLabel);
    
    stringBuilder = new StringBuilder();
    
}