我正在使用libgdx游戏框架绘制表格,已经成功地实现了我想要的一切渲染效果。现在我只需要显示表格单元格的边框,但是目前为止我还没有找到相关资料。我也尝试使用调试边框线来实现目的,但是也无法更改它们的颜色。
这是我的代码。
这是我的代码。
Table table = new Table();
table.setFillParent(true);
table.left().top();
table.add(new Label("Results", new LabelStyle(font, Color.BLACK))).colspan(2).expandX();
table.row();
table.add(new Label(text_you_score, new LabelStyle(font, Color.BLACK)));
table.add(new Label(text_actual_score, new LabelStyle(font, Color.BLACK)));
return table;
表格和单元格有许多可用属性,但没有边框属性。我们也可以手动绘制网格线,但我认为这在每个设备分辨率上都不完美。非常感谢任何帮助或想法。