forked from mirrors/0ad
b42a2b9adb
Updates GUI code to apply the correct usage of `guiObject.getTextSize()` and `guiObject.GetPreferedTextSize()`. - `guiObject.getPreferedTextSize()` is now used when the goal is to compute the bounding box of a text string to dynamically resize or layout a GUI object accordingly. It simulates how the text would be rendered, accounting for markup and layout rules. - `guiObject.getTextSize()` remains in use when text is being measured within a fixed-size GUI element (e.g., a button or label). It respects internal constraints like buffer zone and maxWidth, and is typically used to align other elements based on its visual appearance. These changes ensure more accurate text sizing and consistent layout behavior across GUI components.