Package com.badlogic.gdx.scenes.scene2d.ui

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


        table.center();

        Label title = new Label("JUMPER2DX", 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();
                gameScreen.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


        table.center();

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

        TextButton playButton = new TextButton("PLAY GAME", game.getSkin());
        playButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                //dispose();
                game.setScreen(new GameScreen(game));
            }
        });
        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();
                // FIXME ¿Menú de opciones?

            }
        });
        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

      pointCountLabel = new Label("", skin);
      billboardCountLabel = new Label("", skin);
      modelInstanceCountLabel = new Label("", skin);
     
      maxLabel = new Label("", skin);
      playPauseButton = new TextButton("Pause", skin);
      playPauseButton.addListener(new ClickListener(){
        @Override
        public void clicked (InputEvent event, float x, float y) {
          isUpdate = !isUpdate;
          playPauseButton.setText(isUpdate ? "Pause" : "Play");
View Full Code Here

                prefs.putBoolean("sound", checkSound.isChecked());
            }
        });

        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

        // Etiqueta de texto
        Label label = new Label("JBOMBERMANX", game.getSkin());
        label.setFontScale(2.5f);

        // Botones de menú
        TextButton playButton = new TextButton("NEW GAME", game.getSkin());
        playButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                game.setScreen(new GameScreen(game));
            }
        });

        TextButton settingsButton = new TextButton("SETTINGS", game.getSkin());
        settingsButton.addListener(new ClickListener() {
            public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
                dispose();
                game.setScreen(new ConfigurationScreen(game));
            }
        });

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

        table.add(useNormals = checkbox(" Use normals", true));
        table.add(yInvert = checkbox(" Invert Y", true));
        root.add(table).colspan(2).row();
      }

      TextButton resetButton = new TextButton("Reset", skin);
      resetButton.getColor().a = 0.66f;
      window.getButtonTable().add(resetButton).height(20);

      window.add(root).expand().fill();
      window.pack();
      stage.addActor(window);

      // Events.

      window.addListener(new InputListener() {
        public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
          event.cancel();
          return true;
        }
      });

      resetButton.addListener(new ChangeListener() {
        public void changed (ChangeEvent event, Actor actor) {
          window.remove();
          prefs.clear();
          prefs.flush();
          create();
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.scenes.scene2d.ui.TextButton

Copyright © 2018 www.massapicom. 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.