- private final float minWidth=100;
- private final float minHeight=20;
- private final float prefWidth=300;
- private final float prefHeight=20;
- private final float maxWidth=300;
- private final float maxHeight=20;
- private final float padBottom=10;
- @Override
- public void show() {
- container.setFillParent(true);
- stage.addActor(container);
- Table titleContainer = new Table();
- container.row().top();
- container.add(titleContainer);
- Label title = new Label("Mushroom Melodies",game.skin,"title");
- titleContainer.add(title);
- Table buttons = new Table();
- container.row().bottom();
- container.add(buttons);
- final TextButton play = new TextButton("Play", game.skin);
- final TextButton options = new TextButton("Options", game.skin);
- final TextButton credits = new TextButton("Credits", game.skin);
- final TextButton quit = new TextButton("Quit", game.skin);
- final TextButton scores = new TextButton("Highscores", game.skin);
- System.out.println("padding: "+play.getLabelCell().getPadBottom());
- buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
- buttons.add(play);
- buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
- buttons.add(options);
- buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
- buttons.add(scores);
- buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
- buttons.add(credits);
- buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
- buttons.add(quit);
- play.addListener(new ChangeListener() {
- public void changed (ChangeEvent event, Actor actor) {
- gotoGameScreen();
- }
- });
- options.addListener(new ChangeListener() {
- public void changed (ChangeEvent event, Actor actor) {
- //gotoOptions();
- }
- });
- scores.addListener(new ChangeListener() {
- public void changed (ChangeEvent event, Actor actor) {
- gotoScores();
- }
- });
- credits.addListener(new ChangeListener() {
- public void changed (ChangeEvent event, Actor actor) {
- gotoCredits();
- }
- });
- quit.addListener(new ChangeListener() {
- public void changed (ChangeEvent event, Actor actor) {
- Gdx.app.exit();
- }
- });
SHARE
TWEET
Untitled
a guest
Sep 25th, 2014
189
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
