Examples of StretchViewport


Examples of com.badlogic.gdx.utils.viewport.StretchViewport

    @Override
    public void create() {
        setScreen(new Screen() {

            private final Stage stage = new Stage(new StretchViewport(GAME_VIEWPORT_WIDTH, GAME_VIEWPORT_HEIGHT));
            private final BitmapFont bitmapFont = new BitmapFont();
            private final Label fps = new Label("", new Label.LabelStyle(bitmapFont, Color.WHITE));
            private final Road road = new Road();

            @Override
View Full Code Here

Examples of com.badlogic.gdx.utils.viewport.StretchViewport

   */
  public void setWidthHeight(int width, int height)
  {
    if (viewport == null)
    {
      viewport = new StretchViewport(width, height);
    }

    if (scene != null)
    {
      viewport.update(width, height, true);
View Full Code Here

Examples of com.badlogic.gdx.utils.viewport.StretchViewport

   */
  public Viewport getViewport()
  {
    if (viewport == null)
    {
      viewport = new StretchViewport(DEFAULT_WIDTH, DEFAULT_HEIGHT);
    }

    return viewport;
  }
View Full Code Here

Examples of com.badlogic.gdx.utils.viewport.StretchViewport

*/
public class R2ViewportHandler {
  private Stage stage; // TODO: Change to R2Stage

  public R2ViewportHandler(float width, float height) {
  stage = new Stage(new StretchViewport(width, height));
  }
View Full Code Here

Examples of com.badlogic.gdx.utils.viewport.StretchViewport

  this(null);
  }

  public void create() {
  batch = new SpriteBatch();
  MASTER_STAGE = new Stage(new StretchViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()));
  Skin MASTERSKIN = new Skin(Gdx.files.internal("uiskin.json"));
  fps = new Label("FPS: ", MASTERSKIN);
  Table tmp = new Table();
  tmp.setFillParent(true);
  tmp.top().left();
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.