SHARE
TWEET

Untitled

a guest Sep 25th, 2014 189 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private final float minWidth=100;
  2.         private final float minHeight=20;
  3.         private final float prefWidth=300;
  4.         private final float prefHeight=20;
  5.         private final float maxWidth=300;
  6.         private final float maxHeight=20;
  7.         private final float padBottom=10;
  8.  
  9.         @Override
  10.         public void show() {
  11.         container.setFillParent(true);
  12.         stage.addActor(container);
  13.         Table titleContainer = new Table();
  14.         container.row().top();
  15.         container.add(titleContainer);
  16.         Label title = new Label("Mushroom Melodies",game.skin,"title");
  17.         titleContainer.add(title);
  18.         Table buttons = new Table();
  19.                 container.row().bottom();
  20.                 container.add(buttons);
  21.                
  22.                 final TextButton play = new TextButton("Play", game.skin);
  23.                 final TextButton options = new TextButton("Options", game.skin);
  24.                 final TextButton credits = new TextButton("Credits", game.skin);
  25.                 final TextButton quit = new TextButton("Quit", game.skin);
  26.                 final TextButton scores = new TextButton("Highscores", game.skin);
  27.                 System.out.println("padding: "+play.getLabelCell().getPadBottom());
  28.                 buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
  29.                 buttons.add(play);
  30.                 buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
  31.                 buttons.add(options);
  32.                 buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
  33.                 buttons.add(scores);
  34.                 buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
  35.                 buttons.add(credits);
  36.                 buttons.row().minSize(minWidth,minHeight).prefSize(prefWidth,prefHeight).maxSize(maxWidth,maxHeight).padBottom(padBottom);
  37.                 buttons.add(quit);
  38.                 play.addListener(new ChangeListener() {
  39.                         public void changed (ChangeEvent event, Actor actor) {
  40.                                 gotoGameScreen();
  41.                         }
  42.                 });
  43.                 options.addListener(new ChangeListener() {
  44.                         public void changed (ChangeEvent event, Actor actor) {
  45.                                 //gotoOptions();
  46.                         }
  47.                 });
  48.                 scores.addListener(new ChangeListener() {
  49.                         public void changed (ChangeEvent event, Actor actor) {
  50.                                 gotoScores();
  51.                         }
  52.                 });
  53.                 credits.addListener(new ChangeListener() {
  54.                         public void changed (ChangeEvent event, Actor actor) {
  55.                                 gotoCredits();
  56.                         }
  57.                 });
  58.                 quit.addListener(new ChangeListener() {
  59.                         public void changed (ChangeEvent event, Actor actor) {
  60.                                 Gdx.app.exit();
  61.                         }                      
  62.                 });
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. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top