Closed SomeTroglodyte closed 1 year ago
I ascertained BackgroundActor is working as intended with a little tester:
... so still no progress in understanding the cause
I'm getting closer to understanding this - but the best I can say so far is - Gdx is !("/&§/&!%"§/&%$"/%
Or - the top row with the stats gets packed, then it has a minWidth, and if that exceeds the stage, the WorldScreenTopBar will layout with a mix of that minWidth and the width it was told to use, and end up placing the filler cell actors outside the filler cell bounds. I can fix this, but I doubt I can do so without harmful injury to someone.
If only the Gdx way of scaling made some sense.. But no, a scaled container doesn't translate coordinate systems automatically so it talks to descendants in the inner, scaled coordinates, while projecting sizes reported by descendants to the outside coordinate system for ascendants - as I vaguely remember the archaic Windows Forms do. So - forget about centering or aligning, let alone a Table cell knowing how big a scaled actor actually is. Infuriating.
Compare to #7749 "Now" Debug lines show that the calculations are correct, it's the background that no longer fills what it should: (10 padding, 50 menu icon, 10 pad, 99.5 Label, 10 pad = 180)
I've tried reinstating the pre-#7714 backgroundactor and ninepatch code, or using the -mid or -small variants, nothing helped so far. (Though it's astonishing how assymmetrical roundedEdgeRectangle has become without toppling the entire UI - leftWidth 19, rightWidth 20, middleWidth 13, middle Height 10, bottomHeight 21, topHeight 19, padLeft 12, padRight 13, padBottom 7, padTop 7? All over the place - compare with roundedEdgeRectangle-small, that one's perfectly symmetrical...)