Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

Why table in libgdx game give wrong position

$
0
0

Can anybody guide me, I am creating a table in libgdx game on menu screen to set different buttons on my screen. here is the code for table draw

 table.setBounds(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());

and here is the code for background for this menu screen

batch.draw(bckTexture, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());

My bcktexture image size is 600 by 400.

Now this table draws in the middle of the screen. I dont understand this why. it should be drawn by 0 , 0 corner and fill the whole screen.
I have checked table by table.debug();

what I want is that the table should cover the whole screen so that I can adjust my buttons anywhere on the screen i want especially at the corners.


Viewing all articles
Browse latest Browse all 434

Trending Articles