You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using DecoAlignedText or DecoCAlignedText, text will not be correctly aligned due to the usage of sdlext.totalWidth within them. If the call to sdlext.totalWidth(surface) is changed to surface:w(), the text becomes perfectly aligned. This causes a lot of trial and error when creating new ui, nudging texts slightly to make them line up correctly.
Why sdlext.totalWidth was introduced to the best of my knowledge:
When the mod loader was created all text surfaces had slight padding to the left and right of the text. This padding was removed in itb-community/DLL-Extensions#8
sdlext.totalWidth was then created likely in order to make all the current UI in the mod loader identical to before.
Proposed Change:
Removing the usage of sdlext.totalWidth would require going over all of the existing ui, and make updates to make sure everything is still aligned, since many of the current texts are slightly nudged to account for the misalignment.
The text was updated successfully, but these errors were encountered:
KnightMiner
added
the
cleanup
Issues and pull requests related to improving the codebase without direct functional changes
label
Sep 20, 2022
Issue:
When using
DecoAlignedText
orDecoCAlignedText
, text will not be correctly aligned due to the usage ofsdlext.totalWidth
within them. If the call tosdlext.totalWidth(surface)
is changed tosurface:w()
, the text becomes perfectly aligned. This causes a lot of trial and error when creating new ui, nudging texts slightly to make them line up correctly.Why sdlext.totalWidth was introduced to the best of my knowledge:
When the mod loader was created all text surfaces had slight padding to the left and right of the text. This padding was removed in itb-community/DLL-Extensions#8
sdlext.totalWidth was then created likely in order to make all the current UI in the mod loader identical to before.
Proposed Change:
Removing the usage of
sdlext.totalWidth
would require going over all of the existing ui, and make updates to make sure everything is still aligned, since many of the current texts are slightly nudged to account for the misalignment.The text was updated successfully, but these errors were encountered: