package com.pesets.idle.scenes;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.scenes.scene2d.Stage;

public class Scene implements Screen {

	protected Stage ui = null;

	public Scene()
	{
		super();
		ui = new Stage(Gdx.graphics.getWidth(), 
						Gdx.graphics.getHeight(), true);
	}
	
	@Override
	public void render(float delta) {
		if (ui != null)
		{
			ui.act(delta);
			ui.draw();
		}
		update(delta);
	}
	
	public void update(float dt) {
		
	}

	@Override
	public void resize(int width, int height) {
		if (ui != null)
		{
			//ui.setViewport(width, height, false);
		}
	}

	@Override
	public void show() {
		if (ui != null)
		{
			Gdx.input.setInputProcessor(ui);
		}
	}

	@Override
	public void hide() {
	}

	@Override
	public void pause() {
	}

	@Override
	public void resume() {
	}

	@Override
	public void dispose() {
		ui.dispose();
	}
	
	
}
