Example usage for com.badlogic.gdx.utils.viewport ScalingViewport ScalingViewport

List of usage examples for com.badlogic.gdx.utils.viewport ScalingViewport ScalingViewport

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils.viewport ScalingViewport ScalingViewport.

Prototype

public ScalingViewport(Scaling scaling, float worldWidth, float worldHeight) 

Source Link

Document

Creates a new viewport using a new OrthographicCamera .

Usage

From source file:com.agateau.ui.gallery.TabbedMenuScreen.java

License:Apache License

TabbedMenuScreen() {
    super(new ScalingViewport(Scaling.fit, 800, 480));
    UiAssets assets = new UiAssets();
    mSkin = assets.skin;
    setupUi();
}

From source file:com.agateau.pixelwheels.screens.PwStageScreen.java

License:Open Source License

public PwStageScreen(UiAssets uiAssets) {
    super(new ScalingViewport(Scaling.fit, WIDTH, HEIGHT));

    Image image = new Image();
    image.setDrawable(new TiledDrawable(uiAssets.background));
    image.setFillParent(true);//  w  w  w.j  a  va2s  . c om
    getStage().addActor(image);
}