我在我的代码中,y
滚动位置(以像素为单位)是滚动窗格的顶部:
stage = new Stage(new StretchViewport(480, 800));
Image map = new Image(new Texture(Gdx.files.internal("assets-levels/map.png")));
scrollpane = new ScrollPane(map, new ScrollPaneStyle());
scrollpane.setFillParent(true);
stage.addActor(scrollpane);
Gdx.input.setInputProcessor(stage);
如何可以更改滚动窗格底部的y
滚动位置?
答案 0 :(得分:0)
MyScrollPane
的类,该类将从ScrollPane
。myScrollpane.amountY = map.getHeight();