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=2; 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()/5f); Menu.selector.draw(batch, Gdx.graphics.getWidth()/5+400, Gdx.graphics.getHeight()/5f); } } font.draw(batch, "iniciar", Gdx.graphics.getWidth()/3.75f,Gdx.graphics.getHeight()/2); font.draw(batch, "configuracion", Gdx.graphics.getWidth()/5,Gdx.graphics.getHeight()/4); return this.cambiarSeleccionado(); } int darSeleccionado() { switch(this.position) { case 0:return Menu.BATTLE; case 1:return Menu.OPCIONES; default: return -1; } } }