I’m having a lot of trouble making this work. Scene2d is supposed to make things easier, but somehow it never does.
I want to have a piece of paper in a ScrollPane that can be scrolled and scaled. The piece of paper needs to have a bunch of Labels and Images that of course need to scroll/scale together.
The ScrollPane can have one child. The child should be the piece of paper, but which type of Actor should it be?
-
If I use Group or Table, the ScrollPane doesn’t scroll. getWidth() and getHeight() of Group or Table returns zeroes, regardless of the dimensions of the Group’s/Table’s children. If I set the Group’s/Table’s dimensions manually, it still doesn’t scroll.
-
If I use Container as the ScrollPane’s child widget, then I get some scrolling but it’s always fixed regardless of the Container’s (or its children’s) scaling. Besides, Container can have only one child so it doesn’t solve anything.
I wish someone would create proper documentation for scene2d, because everything I learned how to do in scene2d was either by someone else’s help of by accident.