Files
0ad/source
trompetin17 4fd3533f37 Fix wrapping by passing window width to text size
Why
Passing 0 as the width to `CGUIText` meant "no wrapping".
Buttons and text objects therefore treated every caption as a
single unbroken line, ignoring embedded new-line characters and
overflowing their allotted space.

What
`GetPreferredTextSize` in both `CButton` and `CText` now forwards
`m_pGUI.GetWindowSize().Width` instead of 0.
With a real width the underlying `CGUIText::GetSize()` can measure
the caption using normal word-wrap rules, restoring correct
multi-line behaviour and preventing layout glitches.

Fixes: #8193
2025-07-14 15:02:13 -05:00
..
2025-06-26 20:05:53 +02:00
2025-07-01 09:01:00 +02:00
2025-07-11 11:06:04 -05:00
2025-07-06 18:24:31 +02:00
…
2025-07-09 09:04:50 +02:00
2025-06-26 17:25:05 +02:00
2025-07-11 11:06:04 -05:00