Thanks to to a member by the name of Nate at this website I have finally began to understand how menus work and how to create them, but I’m having a problem. The buttons are REDICULOUSLY small, like so small I can hit three of them at a time with my finger… and I’m a skinny boy!
private void setupWidgets() {
btnPlay30s = new TextButton("30 Second Challenge!", game.getSkin());
btnPlay30s.setSize((Gdx.graphics.getWidth()) - (Gdx.graphics.getWidth() / 4), Gdx.graphics.getHeight() / 8);
btnPlay1m = new TextButton("1 Minute Challenge!", game.getSkin());
btnPlay5m = new TextButton("5 Minute Challenge!", game.getSkin());
btnAchievements = new TextButton("Achievements!", game.getSkin());
btnHighscores = new TextButton("Highscores!", game.getSkin());
}
The red is where I attempted to change the size, but it didn’t do anything.
If it means anything, this is all drawn/handled inside of a table
public class MainMenu extends Table {
private void setupLayout() {
setFillParent(true);
add("Game Name").row();
pad(10).defaults().space(10).fillX();
add(btnPlay30s).row();
add(btnPlay1m).row();
add(btnPlay5m).row();
add(btnAchievements).row();
add(btnHighscores).row();
}
Please helpt me get this setup correctly, as I don’t have a clue what I’m doing wrong.