Java Code Examples for com.badlogic.gdx.utils.viewport.FitViewport

The following examples show how to use com.badlogic.gdx.utils.viewport.FitViewport. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: xibalba   Source File: WorldRenderer.java    License: MIT License 6 votes vote down vote up
/**
 * Setup world renderer.
 *
 * @param worldCamera Instance of camera
 * @param batch       Instance of sprite batch
 */
public WorldRenderer(OrthographicCamera worldCamera, SpriteBatch batch) {
  this.worldCamera = worldCamera;
  this.batch = batch;

  viewport = new FitViewport(960, 540, worldCamera);

  playerDetails = ComponentMappers.player.get(WorldManager.player);
  playerAttributes = ComponentMappers.attributes.get(WorldManager.player);
  playerPosition = ComponentMappers.position.get(WorldManager.player);
  god = ComponentMappers.god.get(WorldManager.god);

  shadow = Main.asciiAtlas.createSprite("1113");
  question = Main.asciiAtlas.createSprite("1503");

  BitmapFont font = new BitmapFont();
  font.getData().setScale(.25f);
}
 
Example 2
Source Project: xibalba   Source File: MainMenuScreen.java    License: MIT License 6 votes vote down vote up
/**
 * Main Menu Screen.
 *
 * @param main Instance of main class
 */
public MainMenuScreen(Main main) {
  stage = new Stage(new FitViewport(960, 540));

  Table table = new Table();
  table.setFillParent(true);
  stage.addActor(table);

  ActionButton newGameButton = new ActionButton("N", "New Game");
  newGameButton.setKeys(Input.Keys.N);
  newGameButton.setAction(table, () -> main.setScreen(new YouScreen(main)));

  ActionButton quitButton = new ActionButton("Q", "Quit");
  quitButton.setKeys(Input.Keys.Q);
  quitButton.setAction(table, () -> Gdx.app.exit());

  table.add(new Label("[LIGHT_GRAY]Xibalba v0.1.0[]", Main.skin)).pad(0, 0, 10, 0);
  table.row();

  table.add(newGameButton).pad(0, 0, 10, 0);
  table.row();
  table.add(quitButton);

  Gdx.input.setInputProcessor(stage);
  stage.setKeyboardFocus(table);
}
 
Example 3
Source Project: gdx-pd   Source File: GdxPdTests.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void create () 
{
	PdConfiguration config = new PdConfiguration();
	config.inputChannels = 1;
	Pd.audio.create(config);

	// new ScreenViewport()
	stage = new Stage(new FitViewport(800, 600));
	
	skin = new Skin(Gdx.files.internal("skins/uiskin.json"));
	
	Table root = new Table();
	root.defaults().pad(10);
	
	
	Gdx.input.setInputProcessor(stage);
}
 
Example 4
Source Project: Bomberman_libGdx   Source File: GameOverScreen.java    License: MIT License 6 votes vote down vote up
@Override
public void show() {
    viewport = new FitViewport(640, 480);
    stage = new Stage(viewport, batch);

    font = new BitmapFont(Gdx.files.internal("fonts/foo.fnt"));

    Label.LabelStyle labelStyle = new Label.LabelStyle(font, Color.WHITE);
    Label gameOverLabel = new Label("Game Over", labelStyle);
    gameOverLabel.setPosition((640 - gameOverLabel.getWidth()) / 2, 226f);

    GameManager.getInstance().playMusic("GameOver.ogg", false);

    stage.addActor(gameOverLabel);

    stage.addAction(Actions.sequence(
            Actions.delay(1f),
            Actions.fadeOut(2f),
            Actions.run(new Runnable() {
                @Override
                public void run() {
                    game.setScreen(new MainMenuScreen(game));
                }
            })));

}
 
Example 5
Source Project: killingspree   Source File: ClientDiscoveryScreen.java    License: MIT License 6 votes vote down vote up
@Override
public void show() {
    client = new Client();
    client.start();
    font = game.getFont(120);
    batch = new SpriteBatch();
    camera = new OrthographicCamera();
    viewport = new FitViewport(1280, 720, camera);
    camera.setToOrtho(false, 1280, 720);
    buttons = new ArrayList<MyButton>();
    ipAddresses = new ArrayList<MyButton>();
    markForDispose = false;
    addAllButtons();
    addIpButtons();
    pressedButton = false;
}
 
Example 6
Source Project: ud406   Source File: RectangleCircleCollisionScreen.java    License: MIT License 6 votes vote down vote up
public RectangleCircleCollisionScreen() {
    startTime = TimeUtils.nanoTime();
    shapeRenderer = new ShapeRenderer();
    viewport = new FitViewport(WORLD_SIZE, WORLD_SIZE);

    rectangles = new Array<Rectangle>(new Rectangle[]{
            new Rectangle(40, 40, 20, 20), // Middle
            new Rectangle(10, 40, 10, 20), // Left
            new Rectangle(70, 45, 20, 10) // Right
    });

    circles = new Array<OscillatingCircle>(new OscillatingCircle[]{
            new OscillatingCircle(50, 65, 7, 0, 40, 3), // High horizontal
            new OscillatingCircle(50, 35, 7, 0, 40, 3.1f), // Low horizontal
            new OscillatingCircle(50, 50, 3, MathUtils.PI / 4, 40, 5f), // Diagonal
            new OscillatingCircle(25, 50, 5, 0, 11, 7f), // Middle horizontal
    });
}
 
Example 7
Source Project: ud406   Source File: RectangleCircleCollisionScreen.java    License: MIT License 6 votes vote down vote up
public RectangleCircleCollisionScreen() {
    startTime = TimeUtils.nanoTime();
    shapeRenderer = new ShapeRenderer();
    viewport = new FitViewport(WORLD_SIZE, WORLD_SIZE);

    rectangles = new Array<Rectangle>(new Rectangle[]{
            new Rectangle(40, 40, 20, 20), // Middle
            new Rectangle(10, 40, 10, 20), // Left
            new Rectangle(70, 45, 20, 10) // Right
    });

    circles = new Array<OscillatingCircle>(new OscillatingCircle[]{
            new OscillatingCircle(50, 65, 7, 0, 40, 3), // High horizontal
            new OscillatingCircle(50, 35, 7, 0, 40, 3.1f), // Low horizontal
            new OscillatingCircle(50, 50, 3, MathUtils.PI / 4, 40, 5f), // Diagonal
            new OscillatingCircle(25, 50, 5, 0, 11, 7f), // Middle horizontal
    });
}
 
Example 8
Source Project: talos   Source File: TalosDemo.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void create() {
    /**
     * We need a viewport for proper camerawork
     */
    viewport = new FitViewport(10f, 10f);
    viewport.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false);

    /**
     * We may need polygon sprite batch to render more complex VFX such us beams
     */
    batch = new PolygonSpriteBatch();

    /**
     * Prepare the texture atlas.
     * Normally just load Texture Atlas,  but for the sake of demo this will be creating fake atlas from just one texture.
     */
    TextureRegion textureRegion = new TextureRegion(new Texture(Gdx.files.internal("fire.png")));
    TextureAtlas textureAtlas = new TextureAtlas();
    textureAtlas.addRegion("fire", textureRegion);

    /**
     * Creating particle effect instance from particle effect descriptor
     */
    ParticleEffectDescriptor effectDescriptor = new ParticleEffectDescriptor(Gdx.files.internal("fire.p"), textureAtlas);
    effect = effectDescriptor.createEffectInstance();
}
 
Example 9
Source Project: xibalba   Source File: LoadingScreen.java    License: MIT License 5 votes vote down vote up
/**
 * Loading screen.
 *
 * @param main Instance of Main
 */
public LoadingScreen(Main main) {
  this.main = main;

  stage = new Stage(new FitViewport(960, 540));

  Table table = new Table();
  table.setFillParent(true);
  stage.addActor(table);

  label = new Label("", Main.skin);
  table.add(label);

  new Thread(() -> Gdx.app.postRunnable(this::loadAssets)).start();
}
 
Example 10
Source Project: xibalba   Source File: PauseScreen.java    License: MIT License 5 votes vote down vote up
/**
 * Main Menu Screen.
 *
 * @param main Instance of main class
 */
public PauseScreen(Main main) {
  stage = new Stage(new FitViewport(960, 540));

  Table table = new Table();
  table.setFillParent(true);
  stage.addActor(table);

  ActionButton returnToGameButton = new ActionButton("ESC", "Return to Game");
  returnToGameButton.setKeys(Input.Keys.ESCAPE);
  returnToGameButton.setAction(table, () -> main.setScreen(Main.playScreen));

  ActionButton mainMenuButton = new ActionButton("M", "Main Menu");
  mainMenuButton.setKeys(Input.Keys.M);
  mainMenuButton.setAction(table, () -> {
    Main.playScreen.dispose();
    main.setScreen(new MainMenuScreen(main));
  });

  ActionButton quitButton = new ActionButton("Q", "Quit");
  quitButton.setKeys(Input.Keys.Q);
  quitButton.setAction(table, () -> Gdx.app.exit());

  table.add(new Label("[LIGHT_GRAY]PAUSED[]", Main.skin)).pad(0, 0, 10, 0);
  table.row();
  table.add(returnToGameButton).pad(0, 0, 10, 0);
  table.row();
  table.add(mainMenuButton).pad(0, 0, 10, 0);
  table.row();
  table.add(quitButton);

  Gdx.input.setInputProcessor(stage);
  stage.setKeyboardFocus(table);
}
 
Example 11
Source Project: xibalba   Source File: GeneratingWorldScreen.java    License: MIT License 5 votes vote down vote up
/**
 * World generation screen.
 *
 * @param main        Instance of Main
 * @param playerSetup Holds data for player creation
 */
public GeneratingWorldScreen(Main main, PlayerSetup playerSetup) {
  this.main = main;
  this.playerSetup = playerSetup;

  stage = new Stage(new FitViewport(960, 540));

  Table table = new Table();
  table.setFillParent(true);
  stage.addActor(table);

  table.add(new Label("HUN-CAME IS PREPARING.", Main.skin));

  new Thread(() -> Gdx.app.postRunnable(this::generateWorld)).start();
}
 
Example 12
Source Project: xibalba   Source File: DepthScreen.java    License: MIT License 5 votes vote down vote up
/**
 * Screen for depth transitions.
 */
public DepthScreen() {
  stage = new Stage(new FitViewport(960, 540));

  Table table = new Table();
  table.setFillParent(true);
  stage.addActor(table);

  Label label = new Label(
      "Going " + (WorldManager.state == WorldManager.State.GOING_DOWN ? "Down" : "Up"),
      Main.skin
  );
  table.add(label);
}
 
Example 13
Source Project: gdx-gltf   Source File: GLTFPostProcessingExample.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void create() {
	
	sceneManager = createSceneManager();
	sceneManager.camera = camera = new PerspectiveCamera();
	camera.fieldOfView = 50;
	camera.near = 0.01f;
	camera.far = 10f;
	camera.position.set(1, 1, 1).scl(.1f);
	camera.up.set(Vector3.Y);
	camera.lookAt(Vector3.Zero);
	camera.update();
	
	// load user scene
	SceneAsset asset = new GLTFLoader().load(Gdx.files.internal("models/BoomBox/glTF/BoomBox.gltf"));
	sceneManager.addScene(new Scene(asset.scene));
	
	cameraController = new CameraInputController(camera);
	cameraController.translateUnits = .1f;
	Gdx.input.setInputProcessor(cameraController);

	viewport = new FitViewport(1000, 500, camera);
	
	// post processing
	if(postProcessingEnabled){
		fbo = new FrameBuffer(Format.RGBA8888, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true);
		effectShader = new ShaderProgram(Gdx.files.classpath("shaders/effect.vs.glsl"), Gdx.files.classpath("shaders/effect.fs.glsl"));
		batch = new SpriteBatch();
	}
	
}
 
Example 14
Source Project: ud405   Source File: DifficultyScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    renderer = new ShapeRenderer();
    batch = new SpriteBatch();

    // TODO: Initialize a FitViewport with the difficulty world size constant
    viewport = new FitViewport(Constants.DIFFICULTY_WORLD_SIZE, Constants.DIFFICULTY_WORLD_SIZE);
    Gdx.input.setInputProcessor(this);

    font = new BitmapFont();
    // TODO: Set the font scale using the constant we defined
    font.getData().setScale(Constants.DIFFICULTY_LABEL_SCALE);
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
}
 
Example 15
Source Project: ud405   Source File: DifficultyScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    renderer = new ShapeRenderer();
    batch = new SpriteBatch();

    viewport = new FitViewport(Constants.DIFFICULTY_WORLD_SIZE, Constants.DIFFICULTY_WORLD_SIZE);
    Gdx.input.setInputProcessor(this);

    font = new BitmapFont();
    font.getData().setScale(Constants.DIFFICULTY_LABEL_SCALE);
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
}
 
Example 16
Source Project: ud405   Source File: AccelerometerAxesScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    axisViewport = new FitViewport(WORLD_SIZE, WORLD_SIZE);
    renderer = new ShapeRenderer();
    renderer.setAutoShapeType(true);
    batch = new SpriteBatch();
    textViewport = new ScreenViewport();
    font = new BitmapFont();
    font.getData().setScale(TEXT_SCALE);
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
    maxAcceleration = 0;
    minAcceleration = Float.MAX_VALUE;

}
 
Example 17
Source Project: ud405   Source File: CircularMotion.java    License: MIT License 5 votes vote down vote up
@Override
public void create() {
    renderer = new ShapeRenderer();
    viewport = new FitViewport(WORLD_SIZE, WORLD_SIZE);

    // Set the initialTime
    initialTime = TimeUtils.nanoTime();
}
 
Example 18
Source Project: ud405   Source File: BubbleLevelScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    axisViewport = new FitViewport(WORLD_SIZE, WORLD_SIZE);
    renderer = new ShapeRenderer();
    renderer.setAutoShapeType(true);
    batch = new SpriteBatch();
    textViewport = new ScreenViewport();
    font = new BitmapFont();
    font.getData().setScale(TEXT_SCALE);
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
    maxAcceleration = 0;
    minAcceleration = Float.MAX_VALUE;

}
 
Example 19
Source Project: ud405   Source File: DifficultyScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    renderer = new ShapeRenderer();
    batch = new SpriteBatch();

    viewport = new FitViewport(Constants.DIFFICULTY_WORLD_SIZE, Constants.DIFFICULTY_WORLD_SIZE);
    Gdx.input.setInputProcessor(this);

    font = new BitmapFont();
    font.getData().setScale(Constants.DIFFICULTY_LABEL_SCALE);
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
}
 
Example 20
Source Project: ud405   Source File: BubbleLevelScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    axisViewport = new FitViewport(WORLD_SIZE, WORLD_SIZE);
    renderer = new ShapeRenderer();
    renderer.setAutoShapeType(true);
    batch = new SpriteBatch();
    textViewport = new ScreenViewport();
    font = new BitmapFont();
    font.getData().setScale(TEXT_SCALE);
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
    maxAcceleration = 0;
    minAcceleration = Float.MAX_VALUE;

}
 
Example 21
Source Project: GdxDemo3D   Source File: LoadingGameScreen.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void show () {
	camera = new OrthographicCamera();
	camera.position.set(GdxDemo3D.WIDTH * .5f, GdxDemo3D.HEIGHT * .5f, 0);
	camera.update();
	viewport = new FitViewport(GdxDemo3D.WIDTH, GdxDemo3D.HEIGHT, camera);
	shapeRenderer = new ShapeRenderer();
}
 
Example 22
Source Project: killingspree   Source File: WorldRenderer.java    License: MIT License 5 votes vote down vote up
public void loadLevel(String level, boolean isServer, String name) {
    this.isServer = isServer;
    map = new TmxMapLoader().load(level);
    TiledMapTileLayer layer = (TiledMapTileLayer) map.
                                getLayers().get("terrain");
    VIEWPORT_WIDTH = (int) (layer.getTileWidth() * layer.getWidth());
    VIEWPORT_HEIGHT = (int) (layer.getTileHeight() * layer.getHeight());
    viewport = new FitViewport(VIEWPORT_WIDTH, VIEWPORT_HEIGHT, camera);
    renderer = new OrthogonalTiledMapRenderer(map);
    name = name.trim();
    if (name.length() == 0)
        name = "noname";
    if (name.length() >= 10){
        name = name.substring(0, 10);
    }
    ClientDetailsMessage clientDetails = new ClientDetailsMessage();
    clientDetails.name = name;
    clientDetails.protocolVersion = Constants.PROTOCOL_VERSION;
    if (isServer) {
        MapLayer collision =  map.
                getLayers().get("collision");
        for(MapObject object: collision.getObjects()) {
            worldManager.createWorldObject(object);
        }
        worldManager.addIncomingEvent(MessageObjectPool.instance.
                eventPool.obtain().set(State.RECEIVED, clientDetails));
    } else {
        client.sendTCP(clientDetails);
    }
    controls = new onScreenControls();
    
}
 
Example 23
Source Project: killingspree   Source File: MainMenuScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    font = game.getFont(170);
    batch = new SpriteBatch();
    camera = new OrthographicCamera();
    viewport = new FitViewport(1280, 720, camera);
    camera.setToOrtho(false, 1280, 720);
    buttons = new ArrayList<MyButton>();
    addAllButtons();
    final Preferences prefs = Gdx.app.getPreferences("profile");
    String name = prefs.getString("name");
    name = name.trim();
    if (name.length() == 0) {
        Gdx.input.getTextInput(new TextInputListener() {
            
            @Override
            public void input(String text) {
                prefs.putString("name", text);
                prefs.flush();
            }
            
            @Override
            public void canceled() {
            }
        }, "Enter name", "");
    }
}
 
Example 24
Source Project: killingspree   Source File: LobbyScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    font = game.getFont(120);
    batch = new SpriteBatch();
    camera = new OrthographicCamera();
    viewport = new FitViewport(1280, 720, camera);
    camera.setToOrtho(false, 1280, 720);
    buttons = new ArrayList<MyButton>();
    isServer = false;
    ipAddresses = new ArrayList<String>();
    markForDispose = false;
    startGame = false;
    host = "127.0.0.1";
}
 
Example 25
Source Project: killingspree   Source File: OptionsScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    font = game.getFont(170);
    batch = new SpriteBatch();
    camera = new OrthographicCamera();
    viewport = new FitViewport(1280, 720, camera);
    camera.setToOrtho(false, 1280, 720);
    buttons = new ArrayList<MyButton>();
    addAllButtons();
    buttonPressed = false;
}
 
Example 26
Source Project: killingspree   Source File: SplashScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
    font = game.getFont(200);
    batch = new SpriteBatch();
    camera = new OrthographicCamera();
    viewport = new FitViewport(1280, 720, camera);
    camera.setToOrtho(false, 1280, 720);
}
 
Example 27
Source Project: ud406   Source File: NinePatchDemo.java    License: MIT License 5 votes vote down vote up
@Override
public void create() {
    batch = new SpriteBatch();
    viewport = new FitViewport(WORLD_SIZE, WORLD_SIZE);

    // TODO: Load the platform texture (Look for the file in android/assets)
    platformTexture = new Texture("platform.png");

    // TODO: Initialize the NinePatch using the texture and the EDGE constant
    platformNinePatch = new NinePatch(platformTexture, EDGE, EDGE, EDGE, EDGE);
}
 
Example 28
Source Project: libgdx-utils   Source File: SplashScreen.java    License: MIT License 5 votes vote down vote up
@Override
public void show() {
	LibgdxUtils.assets.load("textures/splash.png", Texture.class);
	LibgdxUtils.assets.finishLoading();
	splash = LibgdxUtils.assets.get("textures/splash.png", Texture.class);

	LibgdxUtils.assets.load("skins/uiskin.json", Skin.class);
	LibgdxUtils.assets.load("icons/icons.atlas", TextureAtlas.class);

	camera = new OrthographicCamera();
	viewport = new FitViewport(splash.getWidth(), splash.getHeight(), camera);
}
 
Example 29
Source Project: seventh   Source File: GdxCanvas.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
     * 
     */
    public GdxCanvas() {
        this.batch = new SpriteBatch();
        this.color = new Color();
        this.tmpColor = new Color();
        
        this.shaderStack = new Stack<>();
        this.zoomStack = new Stack<>();
        
        this.camera = new OrthographicCamera(getWidth(), getHeight());
        this.camera.setToOrtho(true, getWidth(), getHeight());
        this.camera.position.x = this.camera.viewportWidth/2;
        this.camera.position.y = this.camera.viewportHeight/2;
        this.camera.update();
        
        this.viewport = new FitViewport(getWidth(), getHeight(), camera);
        this.viewport.apply();
                
        this.generators = new HashMap<String, FreeTypeFontGenerator>();
        this.fonts = new HashMap<String, BitmapFont>();
        this.bounds = new GlyphLayout();
                
        this.transform = new Matrix4();
        //this.batch.setTransformMatrix(transform);
                
        //Matrix4 projection = new Matrix4();
        //projection.setToOrtho( 0, getWidth(), getHeight(), 0, -1, 1);
        //this.batch.setProjectionMatrix(projection);
        
//        this.wHeight = getHeight();
        this.batch.setProjectionMatrix(this.camera.combined);
        
        this.shapes = new ShapeRenderer();
        //this.shapes.setTransformMatrix(transform);    
//        this.shapes.setProjectionMatrix(projection);
        //this.shapes.setProjectionMatrix(camera.combined);
        
        this.fbo = new FrameBuffer(Format.RGBA8888, getWidth(), getHeight(), false);
    }
 
Example 30
Source Project: xibalba   Source File: HudRenderer.java    License: MIT License 4 votes vote down vote up
/**
 * Renders the HUD.
 *
 * @param main  Instance of Main class
 * @param batch The sprite batch to use (set in PlayScreen)
 */
public HudRenderer(Main main, SpriteBatch batch) {
  this.main = main;

  viewport = new FitViewport(960, 540, new OrthographicCamera());
  stage = new Stage(viewport, batch);

  player = WorldManager.player;
  playerDetails = ComponentMappers.player.get(player);
  playerAttributes = ComponentMappers.attributes.get(player);
  playerPosition = ComponentMappers.position.get(player);
  god = ComponentMappers.god.get(WorldManager.god);

  Table topTable = new Table();
  topTable.top().left();
  topTable.setFillParent(true);
  stage.addActor(topTable);

  playerInfo = new VerticalGroup().top().left().columnLeft();
  enemyInfo = new VerticalGroup().top().center().columnCenter();
  gameInfo = new VerticalGroup().top().right().columnRight();

  int width = Gdx.graphics.getWidth() / 3 - 20;

  topTable.add(playerInfo).pad(10, 10, 10, 10).width(width).top();
  topTable.add(enemyInfo).pad(10, 10, 10, 10).width(width).top();
  topTable.add(gameInfo).pad(10, 10, 10, 10).width(width).top();

  bottomTable = new Table();
  bottomTable.bottom().left();
  bottomTable.setFillParent(true);
  stage.addActor(bottomTable);

  actionLog = new VerticalGroup().top().left().columnLeft();
  focusedTable = new Table().top().center();
  buttonsAndAreaDetails = new VerticalGroup().top().right().columnRight();

  areaDetails = new VerticalGroup().top().right().columnRight().pad(0, 0, 5, 0);
  buttonsAndAreaDetails.addActor(areaDetails);

  menuButtons = new Table().right();
  setupMenuButtons();

  bottomTable.add(actionLog).pad(10, 10, 10, 10).width(width).bottom();
  bottomTable.add(focusedTable).pad(10, 10, 10, 10).width(width).top();
  bottomTable.add(buttonsAndAreaDetails).pad(10, 10, 10, 10).width(width).bottom();

  setupDeathDialog();

  stage.setKeyboardFocus(bottomTable);
}