Skip to content
Snippets Groups Projects
Commit 18ecf127 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

#11 Difficulty label style fix

parent 29a352d7
No related branches found
No related tags found
No related merge requests found
package cz.nic.tablexia.screen.gamemenu.pages;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.scenes.scene2d.Actor;
......@@ -10,7 +10,6 @@ import com.badlogic.gdx.scenes.scene2d.actions.AlphaAction;
import com.badlogic.gdx.scenes.scene2d.actions.MoveToAction;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import cz.nic.tablexia.TablexiaSettings;
......@@ -95,10 +94,11 @@ public class GameMenuPage extends MenuPage implements ViewPager.ScrollListener {
});
// Labels for diffuculty slider
Skin skin = new Skin(Gdx.files.internal("uiskin.json"));
Label easy = new Label("Easy", skin);
Label medium = new Label("Medium", skin);
Label hard = new Label("Hard", skin);
Label.LabelStyle labelStyle = new Label.LabelStyle(screen.getDefaultRegularFont(), Color.BLACK);
// TODO load texts from GameDifficulty enum
Label easy = new Label("Easy", labelStyle);
Label medium = new Label("Medium", labelStyle);
Label hard = new Label("Hard", labelStyle);
easy.setPosition((screen.getStage().getWidth() / 2) - (screen.getStage().getWidth() * 0.1f) - easy.getWidth() / 2, screen.getStage().getHeight() * 0.0f);
medium.setPosition((screen.getStage().getWidth() / 2) - medium.getWidth() / 2, screen.getStage().getHeight() * 0.0f);
......
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