ericklein / air_quality

displays and logs local indoor and outdoor weather and air quality information
MIT License
0 stars 0 forks source link

Text wrapping for screen display #68

Closed ericklein closed 9 months ago

ericklein commented 1 year ago

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

ericklein commented 9 months ago

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.