mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Introduces (CButton|CText).getPreferredTextSize, a new method for estimating the natural width of a caption if the object had no width constraints. Unlike .getTextSize, which reports the size after applying current layout constraints (e.g., fixed width or anchors), getPreferredTextSize answers the question: "How wide would this object need to be to display the caption on a single line?" This is particularly useful for modders and layout logic that wants to dynamically size elements *before* assigning a fixed width or anchoring. |
||
|---|---|---|
| .. | ||
| collada | ||
| graphics | ||
| gui | ||
| i18n | ||
| lib | ||
| lobby | ||
| maths | ||
| mocks | ||
| network | ||
| pch | ||
| ps | ||
| renderer | ||
| rlinterface | ||
| scriptinterface | ||
| simulation2 | ||
| soundmanager | ||
| third_party | ||
| tools | ||
| main.cpp | ||
| test_setup.cpp | ||