mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
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 |
||
|---|---|---|
| .. | ||
| ObjectBases | ||
| ObjectTypes | ||
| Scripting | ||
| SettingTypes | ||
| tests | ||
| CGUI.cpp | ||
| CGUI.h | ||
| CGUIScrollBarHorizontal.cpp | ||
| CGUIScrollBarHorizontal.h | ||
| CGUIScrollBarVertical.cpp | ||
| CGUIScrollBarVertical.h | ||
| CGUISetting.cpp | ||
| CGUISetting.h | ||
| CGUISprite.cpp | ||
| CGUISprite.h | ||
| CGUIText.cpp | ||
| CGUIText.h | ||
| GUIManager.cpp | ||
| GUIManager.h | ||
| GUIObjectEventBroadcaster.h | ||
| GUIObjectTypes.cpp | ||
| GUIRenderer.cpp | ||
| GUIRenderer.h | ||
| GUIStringConversions.cpp | ||
| GUITooltip.cpp | ||
| GUITooltip.h | ||
| IGUIScrollBar.cpp | ||
| IGUIScrollBar.h | ||
| SGUIIcon.h | ||
| SGUIMessage.h | ||
| SGUIStyle.h | ||