Back to project page NGAWWH.
The source code is released under:
GNU General Public License
If you think the Android project NGAWWH listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.me.ngawwh; /*from w w w. j a v a 2 s . co m*/ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Screen; import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture.TextureFilter; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector3; public class InvGamePage implements Screen{ private MainGame MG; private OrthographicCamera camera; private Texture textureInventory; private SpriteBatch b; private Loader load; private boolean isLoaded = false; public InvGamePage(){} public boolean isLoad(){ return isLoaded; } public void load(MainGame mg, OrthographicCamera camera, Loader load){ this.camera = camera; camera.update(); this.load = load; b = load.b; b.setProjectionMatrix(camera.combined); textureInventory = load.manager.get("data/backgroundquestmenu.png",Texture.class); isLoaded = true; } public void contains(float x, float y){ } @Override public void render(float delta) { Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); b.begin(); b.draw(textureInventory,0,0,Gdx.graphics.getWidth(),Gdx.graphics.getHeight()); b.end(); if(Gdx.input.justTouched()){ Vector3 posicion = new Vector3(Gdx.input.getX(),Gdx.input.getY(),0); camera.unproject(posicion); contains(posicion.x,posicion.y); } } @Override public void resize(int width, int height) { // TODO Auto-generated method stub } @Override public void show() { // TODO Auto-generated method stub } @Override public void hide() { // TODO Auto-generated method stub } @Override public void pause() { // TODO Auto-generated method stub } @Override public void resume() { // TODO Auto-generated method stub } @Override public void dispose() { // TODO Auto-generated method stub } }