mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 02:46:49 +00:00
e845da025a
Adds a runtime warning to `Engine.GetTextSize` indicating that the API is deprecated and will be removed in a future version. This API does not simulate GUI rendering accurately, as it treats markup tags like [color], [font], or [icon] as visible characters. This leads to incorrect size measurements in modern GUI layouts. New recommended alternatives: - Use `Engine.GetGUITextSize(...)` for accurate measurement of raw text blocks, fully simulating GUI rendering. - Use `guiObject.getTextSize()` when working within a specific GUI object, as it accounts for maxWidth, padding (bufferZone), and object constraints. A warning is now emitted at runtime to guide developers toward these updated APIs.