package zero1hd.polyjet.ui.pages;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;

import zero1hd.polyjet.util.MiniSender;

public class Page extends Group {
	private Label pageTitle;
	
	public MiniSender miniSender;

	public Page() {
		setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
		miniSender = new MiniSender();
		setTouchable(Touchable.childrenOnly);
	}
	
	public Page(String titleText, Skin skin) {
		miniSender = new MiniSender();
		setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
		setTouchable(Touchable.childrenOnly);
		pageTitle = new Label(titleText, skin, "large-font", skin.getColor("default"));
		pageTitle.setPosition(18f, getHeight()-pageTitle.getHeight()-15f);
		addActor(pageTitle);
	}
	
	public float getHeightBelowTitle() {
		return pageTitle.getY();
	}
}
