表格布局中的缩放图像actor不会扩展单元格

you*_*786 1 libgdx scene2d

抱歉密集的标题:)

假设我有一个像这样创建的Image Actor:

Image image = new Image(texture);
image.setScale(2);
Run Code Online (Sandbox Code Playgroud)

将其添加到表格中并正确显示,但图像的缩放不会扩展表格的大小.

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

这是一个已知的问题,有什么方法可以解决这个问题吗?

Bar*_*ide 5

尝试设置图像单元格的宽度/高度,使其适合表格.