Examples of TextButton


Examples of com.badlogic.gdx.scenes.scene2d.ui.TextButton

  public static TextButton newButton( String text ) {
    return newButton( text, null );
  }

  public static TextButton newButton( String text, ClickListener listener ) {
    TextButton b = new TextButton( text, UISkin );
    if( listener != null ) {
      b.addListener( listener );
    }
    return b;
  }
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.ui.TextButton

        table.center();

        Label title = new Label("JFIGHTER2DX", game.getSkin());
        title.setFontScale(2.5f);

        TextButton quickButton = new TextButton("RESUME", game.getSkin());
        quickButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                game.setScreen(gameScreen);
            }
        });
        TextButton historyButton = new TextButton("RETURN TO MAIN MENU", game.getSkin());
        historyButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                game.setScreen(new MainMenuScreen(game));
            }
        });
        TextButton exitButton = new TextButton("QUIT GAME", game.getSkin());
        exitButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                System.exit(0);
            }
        });
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.ui.TextButton

        table.center();

        Label title = new Label("JFIGHTER2DX\nMAIN MENU", game.getSkin());
        title.setFontScale(2.5f);

        TextButton quickButton = new TextButton("QUICK PLAY", game.getSkin());
        quickButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                game.setScreen(new GameScreen(game, GameType.QUICK));
            }
        });
        TextButton historyButton = new TextButton("PLAY HISTORY", game.getSkin());
        historyButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                game.setScreen(new GameScreen(game, GameType.HISTORY));
            }
        });
        TextButton optionsButton = new TextButton("OPTIONS", game.getSkin());
        optionsButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                game.setScreen(new ConfigurationScreen(game));

            }
        });
        TextButton exitButton = new TextButton("QUIT GAME", game.getSkin());
        exitButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                System.exit(0);
            }
        });
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.ui.TextButton

                    default:
                }
            }
        });

        TextButton exitButton = new TextButton("MAIN MENU", game.getSkin());
        exitButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                prefs.flush();
                dispose();
                game.setScreen(new MainMenuScreen(game));
            }
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.ui.TextButton

    style.up = skin.getDrawable("buttonnormal");
    style.down = skin.getDrawable("buttonpressed");

    style.font = bonzai;
    style.fontColor= Color.BLACK;
    button = new TextButton("Press Me", style);
    button.setWidth(400);
    button.setHeight(100);
    button.setX(Gdx.graphics.getWidth() / 2 - button.getWidth() / 2);
    button.setY(Gdx.graphics.getHeight() / 2 - button.getHeight() / 2);
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.ui.TextButton

    BitmapFont font = Configuration.bonzai24;

    style.font = font;

    TextButton no = new TextButton("No", style);
    no.setWidth(4 * Configuration.gameScale);
    no.setHeight(2 * Configuration.gameScale);
    no.setScale(Configuration.gameScale / 20);

    no.setPosition((playArea.x + (playArea.width / 2)), (playArea.y + playArea.height * .45f));

    no.addListener(new InputListener() {
      public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
        System.out.println("down");
        return true;
      }

View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.ui.TextButton

    BitmapFont font = Configuration.bonzai24;

    style.font = font;

    TextButton yes = new TextButton("Yes", style);
    yes.setWidth(4 * Configuration.gameScale);
    yes.setHeight(2 * Configuration.gameScale);

    yes.setPosition((playArea.x + (playArea.width / 2) - (4 * Configuration.gameScale)),
        (playArea.y + playArea.height * .45f));
    yes.setScale(Configuration.gameScale / 20);
    yes.addListener(new InputListener() {
      public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
        System.out.println("down");
        return true;
      }

View Full Code Here

Examples of com.drakulo.games.ais.ui.component.button.TextButton

  public GameMenu() {
    super(132, 150);

    final int btnSize = 120;
   
    this.optionButton = new TextButton(I18n.get("global.options"));
    this.optionButton.disable();
    this.optionButton.setWidth(btnSize);
   
    this.loadButton = new TextButton(I18n.get("global.load"));
    this.loadButton.disable();
    this.loadButton.setWidth(btnSize);
   
    this.saveButton = new TextButton(I18n.get("global.save"));
    this.saveButton.disable();
    this.saveButton.setWidth(btnSize);
   
    this.exitButton = new TextButton(I18n.get("global.exit"));
    this.exitButton.setWidth(btnSize);

    // Positionning buttons
    int y = this.getOY() + 5;
    final int pitch = Button.DEFAULT_HEIGHT + 10;
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.button.TextButton

    getButtonBar().clear();

    for (int i = 0; i < buttons.size(); i++) {
      PredefinedButton b = buttons.get(i);
      TextButton tb = new TextButton(getText(b));
      tb.setItemId(b.name());
      tb.addSelectHandler(handler);
      if (i == 0 && focus) {
        setFocusWidget(tb);
      }
      addButton(tb);
    }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.button.TextButton

    getButtonBar().clear();
    setFocusWidget(null);

    for (int i = 0; i < buttons.size(); i++) {
      PredefinedButton b = buttons.get(i);
      TextButton tb = new TextButton(getText(b));
      tb.setItemId(b.name());
      tb.addSelectHandler(handler);
      if (i == 0) {
        setFocusWidget(tb);
      }
      addButton(tb);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.