移动表(拥有滚动窗格)中的小部件后,Libgdx Scrollpane滚动不足

我有个问题。在移动了表中的小部件(拥有滚动窗格)之后,Libgdx Scrollpane滚动不足。


这是我的代码示例。


Table scrollPaneTable = new Table();

Scrollpane itemsScrollPane = new ScrollPane(scrollPaneTable);

...

mainTable.add(itemsScrollPane).width(WIDTH).height(HEIGHT);

...

//adding items in the scrollPaneTable

// everything is work perfect at this moment.

....

for (final Actor actor : scrollPaneTable.getChildren()) {

...

actor.moveBy(MAIN_QUEST_ITEM_WIDTH * chapterData.quests.size * direction, 0);

...

}

...

//after I move actor in the table, scrollpane scrolls like before, I can't reach the last items.

谢谢你的帮助。


偶然的你
浏览 225回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java