package menus;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class MenuInicio extends Menu{
	public MenuInicio() {
		super();
		this.n_opciones=3;
		this.local=Menu.INICIAL;
	}
	@Override
	public int draw(SpriteBatch batch, float delta) {
		Menu.selector.avanzar(10, delta);
		switch(this.position) {
		case 0:{
			Menu.selector.draw(batch, Gdx.graphics.getWidth()/5, Gdx.graphics.getHeight()/2.2f);
			Menu.selector.draw(batch, Gdx.graphics.getWidth()/5+200, Gdx.graphics.getHeight()/2.2f);
			break;
		}
		case 1:{
			Menu.selector.draw(batch, Gdx.graphics.getWidth()/5, Gdx.graphics.getHeight()/3f);
			Menu.selector.draw(batch, Gdx.graphics.getWidth()/5+220, Gdx.graphics.getHeight()/3f);
			break;
		}
		case 2:{
			Menu.selector.draw(batch, Gdx.graphics.getWidth()/5-50, Gdx.graphics.getHeight()/5);
			Menu.selector.draw(batch, Gdx.graphics.getWidth()/5+230, Gdx.graphics.getHeight()/5);
			break;
		}
		}
		font.draw(batch, "iniciar", Gdx.graphics.getWidth()/3.75f,Gdx.graphics.getHeight()/2);
		font.draw(batch, "iniciar 2Vs2", Gdx.graphics.getWidth()/4,Gdx.graphics.getHeight()/2.6f);
		font.draw(batch, "configuracion", Gdx.graphics.getWidth()/5,Gdx.graphics.getHeight()/4);
		return this.cambiarSeleccionado();
	}
	
	int darSeleccionado() {
		switch(this.position) {
		case 0:return Menu.SELEC;
		case 1:return Menu.SELEC2;
		case 2:return Menu.OPCIONES;
		default: return -1;
		}
	}

}
