This behaves differently for SFML (code) and SDL (code) builds due to differences between the implementations. SFML considers the full text box, while SDL considers each line (which results in the proper result)
Possible solution
Change the SFML implementation class to contain a vector of sf::Text objects instead of only one. One sf::Text per line.
Text needs to be split on linebreaks.
Make the doUpdate() function set the position of the individual sf::Text objects depending on the width of the longest line and the m_textAlign value.
Make the doDraw() functions (including flash and shadwo) draw those multiple sf::Text objects.
Please check
[ ] Adapt the Scroll/MoveCam demo to contain multiline text with different alignments
[ ] Check that all unit tests pass
[ ] Check that new code branches are tested. This might require some additions to the text_test and potentially the drawable_impl_test
Multiline text defintion:
jt::Text
This behaves differently for SFML (code) and SDL (code) builds due to differences between the implementations. SFML considers the full text box, while SDL considers each line (which results in the proper result)
Possible solution
sf::Text
objects instead of only one. Onesf::Text
per line.doUpdate()
function set the position of the individualsf::Text
objects depending on the width of the longest line and them_textAlign
value.doDraw()
functions (including flash and shadwo) draw those multiplesf::Text
objects.Please check