gurkenlabs / litiengine

LITIENGINE 🕹 The pure 2D java game engine.
https://litiengine.com/
MIT License
741 stars 93 forks source link

Fix alignment of text that overflows the boundaries #816

Closed hedfol closed 7 months ago

hedfol commented 8 months ago

Add getLocation method overload to Align and Valign enums. Implement an option to prevent the values that are out of bounds.

Make getLocation calls in text scenarios use preventOverflow option. Do not alter the default uses of getLocation for entities.

Add basic tests for Align.getLocation with preventOverflow:true. Create similar tests for Valign.getLocation: default and no-overflow.

hedfol commented 8 months ago

Let me know what should be changed.