Sunday, 18 August 2013

How resize automatically textures?

How resize automatically textures?

I'm working with Libgdx and the textures are placed correctly when
resizing, but not resized. How can I solve this?
My code:
public void resize(int width, int height) {
stage.setViewport(width, height, true);
stage.getCamera().translate(-stage.getGutterWidth(),
-stage.getGutterHeight(), 0);
start.setPosition(stage.getWidth()/10f * 2f, stage.getHeight()/10f
* 5f);
soundOff.setPosition(stage.getWidth()/10f * 3.5f,
stage.getHeight()/10f * 2f);
soundOn.setPosition(stage.getWidth()/10f * 3.5f,
stage.getHeight()/10f * 2);
}

No comments:

Post a Comment