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

LibGDX ImageButton not scaling properly on table?

$
0
0

I’m facing the same problem like in this link:

question

and I think the problem is in the skin passed in a table like this

skin = new Skin();
skin.add("pausebuttonup", AssetLoader.pauseButtonUp);
skin.add("pausebuttondown", AssetLoader.pauseButtonDown);
pausebutton= new ImageButton(skin.getDrawable("pausebuttonup"), skin.getDrawable("pausebuttondown"));
table.add(pausebutton).size(200, 150);

I think the scale of the image passed from skin to button is not re-sizing with the scale from table. How can I solve this? Can I re scale it on using skin.


Viewing all articles
Browse latest Browse all 434

Trending Articles