Issue:
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.
Issue:
When using
DecoAlignedTextorDecoCAlignedText, text will not be correctly aligned due to the usage ofsdlext.totalWidthwithin 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.totalWidthwould 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.