1
0
forked from 0ad/0ad
0ad/source/gui
wraitii f4128208de Fix text alignment handling of spaces around wrapping.
Follows f8d2927748.

There is an issue with text-wrapping and word separators (aka spaces).
Because 0 A.D. collates the space after a word to the same TextCall, we
occasionally need to ignore it when considering line-wrapping, because
we don't want empty spaces on the right-side of right-aligned text.
However, the logic to handle this is currently broken and inconsistent.

The method introduced here uses the SFeedback structure to properly
report it and generalises the checks.

Note that multiples spaces are not collapsed in 0 A.D., and for
consistency the word-separator-collapsing behaviour is ignored.

Comments by: phosit, vlasdislavbelov
Fixes #6551

Differential Revision: https://code.wildfiregames.com/D4662
This was SVN commit r26915.
2022-06-02 12:56:53 +00:00
..
ObjectBases Adds header for forward declarations of CStr. 2021-09-09 17:39:08 +00:00
ObjectTypes Fixes A8 framebuffer format used for LOS interpolation and enables smooth LOS by default. 2022-05-26 16:36:57 +00:00
Scripting Fix non-visual autostart, as well as client/host autostart. 2022-05-15 06:34:17 +00:00
SettingTypes Fix text alignment handling of spaces around wrapping. 2022-06-02 12:56:53 +00:00
tests Fix text alignment handling of spaces around wrapping. 2022-06-02 12:56:53 +00:00
CGUI.cpp Allied chat opens with t bug (on linux) 2022-03-03 11:36:08 +00:00
CGUI.h Allied chat opens with t bug (on linux) 2022-03-03 11:36:08 +00:00
CGUIScrollBarVertical.cpp Provides Canvas2D for sprite rendering. 2021-05-29 19:47:36 +00:00
CGUIScrollBarVertical.h Provides Canvas2D for sprite rendering. 2021-05-29 19:47:36 +00:00
CGUISetting.cpp Split off JSON-related function from ScriptInterface, clean up headers. 2021-05-14 10:18:03 +00:00
CGUISetting.h Split JS conversions from ScriptInterface. 2021-05-13 09:43:33 +00:00
CGUISprite.cpp Removes raw pointers management from sprites owned by CGUI. 2021-06-06 00:32:49 +00:00
CGUISprite.h Moves texture management to CDeviceCommandContext, adds quality options. 2022-02-13 19:30:28 +00:00
CGUIText.cpp Fix text alignment handling of spaces around wrapping. 2022-06-02 12:56:53 +00:00
CGUIText.h Fix BufferZone in right alignment 2022-03-02 16:14:05 +00:00
GUIManager.cpp Allied chat opens with t bug (on linux) 2022-03-03 11:36:08 +00:00
GUIManager.h Uses CDeviceCommandContext as an input parameter for CCanvas2D. 2022-02-25 08:14:11 +00:00
GUIMatrix.cpp Make scale variables constant 2022-02-06 11:11:35 +00:00
GUIMatrix.h Move GetDefaultGuiMatrix to a separate file. 2019-08-04 03:52:00 +00:00
GUIObjectTypes.cpp Map flares 2021-06-05 17:37:18 +00:00
GUIRenderer.cpp Moves texture management to CDeviceCommandContext, adds quality options. 2022-02-13 19:30:28 +00:00
GUIRenderer.h Fixes builds after d0115185b9 by removing includes to res handle. 2022-02-14 06:29:50 +00:00
GUIStringConversions.cpp Replaces CPos by more a consistent CVector2D, reduces geometry code duplication. 2021-03-28 21:55:13 +00:00
GUITooltip.cpp Change GUI settings to explicitly be member variables. 2021-05-06 08:22:37 +00:00
GUITooltip.h Generalize icon-specific tooltips to a tag, streamline code. 2021-05-01 12:38:05 +00:00
IGUIScrollBar.cpp Replaces CPos by more a consistent CVector2D, reduces geometry code duplication. 2021-03-28 21:55:13 +00:00
IGUIScrollBar.h Provides Canvas2D for sprite rendering. 2021-05-29 19:47:36 +00:00
SGUIIcon.h Moves CSize into a separate file and renames it to CSize2D according to other geometric entities. 2021-03-27 16:08:06 +00:00
SGUIMessage.h Allow right-click on disabled buttons. 2020-11-14 18:16:24 +00:00
SGUIStyle.h Move GUIbase structs and enums to separate files. 2019-10-01 12:46:55 +00:00