문제

Sorry for the dense title :)

Say I have an Image Actor created like so:

Image image = new Image(texture);
image.setScale(2);

adding it to a Table works, and shows properly, but the scaling of the image doesn't expand the size of the table.

table.add(image);
table.add(anotherimage);
//these images are now overlapping because 'image' is too large for its cell

Is this a known issue, and is there any way to solve this?

도움이 되었습니까?

해결책

Try setting the width/height of the image's cell so that it fits properly in the table.

다른 팁

table.add(image).fill().expand();

fill() is for the image to fill the cell.

expand() is for the cell to expand over the available space.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top