我正在使用 Libgdx,并且在调整大小时正确放置了纹理,但未调整大小。我该如何解决这个问题?
我的代码:
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);
}