Monday, July 11, 2022
HomeGame Developmentjava - Libgdx desk contents are increasing past widget bounds

java – Libgdx desk contents are increasing past widget bounds


I’ve a libgdx desk that originally appears to be like like this…

enter image description here

And I might just like the final cell to broaden in order that the logical bounds fill the widget bounds. As quickly as I set the final cell to expandX it appears to be like like this..

enter image description here

The widget bounds are right, however now the logical bounds have gone past it. Why is the desk all of a sudden doing this? The one distinction within the code between the 2 is the increasing of the final cell…

contentTable
   .add(new Label("Abc",ui.getUiSkin(), UiSkin.Label.detailH3))
   .expandX() //that is eliminated within the first screenshot
 ;

Edit: It appears to be like like that is associated to utilizing colspan, although I nonetheless dont perceive why. Within the screenshots above, the center cell on each rows is ready to colspan(2). If I take away that setting the desk expands accurately. I’ve no clue why setting colspan would break the desk in that approach, however I will depart this query open as a result of I really do want to make use of the colspan setting there.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments