ericklein/air_quality

Text wrapping for screen display

Closed this issue · 1 comments

screenAlert can accept messages with lengths longer than available space. will need a better wrapping function than provided by .print.

Across all projects, implemented setTextWrap(false) to stop wrapped text from overwriting other UI elements. screenAlert now centers text on both x and y axis and throws an ERROR debug message if the message is too long. It will still display the message text, just truncated at x=0 and x=display.width(). This allows some error messaging to be displayed, and the user will immediately notice the UI problem and can also alert a developer who missed it visually or in DEBUG.