Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top