package menus;

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

public class MenuOpcions extends Menu{
	
	public MenuOpcions() {
		super();
		this.n_opciones=2;
		this.pres=true;
		this.local=Menu.OPCIONES;
	}
	
	@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()/4.2f);
			Menu.selector.draw(batch, Gdx.graphics.getWidth()/5+400, Gdx.graphics.getHeight()/4.2f);
		}
		}
		font.draw(batch, "resolucion", Gdx.graphics.getWidth()/3.75f,Gdx.graphics.getHeight()/2);
		font.draw(batch, "fondo:", Gdx.graphics.getWidth()/5,Gdx.graphics.getHeight()/4);
		return this.cambiarSeleccionado();
	}
	
	int darSeleccionado() {
		switch(this.position) {
		case 0:return 3;
		case 1:return Menu.OPCIONES;
		default: return -1;
		}
	}

}
