OXRS-IO / OXRS-IO-TouchPanel-ESP32-FW

OXRS compatible firmware for WT32-xxx touch screen displays
https://oxrs.io/docs/firmware/touch-panel-esp32.html
BSD 3-Clause "New" or "Revised" License
20 stars 3 forks source link

Ability to display plain text or HTML on a screen #25

Closed hazymat closed 2 years ago

hazymat commented 2 years ago

In addition to being able to display tiles / keypads etc., would be useful to be able to display plain text or even HTML on a screen.

Useful for serving latest news / weather...

sumnerboy12 commented 2 years ago

I was thinking this would be a new tile style, which shows a label/icon/summary on the tile and when clicked launches a fullscreen popup where you can fill it with text/HTML/markup.

hazymat commented 2 years ago

That would be even better than what I said!

moinmoin-sh commented 2 years ago

Rendering anything else than plain text is an issue here. LVGL doesn't offer any format changes within a label widget (basically a text box). The only formating options are "\n" for a line break and the recoloring as we use it for the textIcon and that doesn't work across line breaks.

caitken-com commented 2 years ago

Even without what @moinmoin-sh just said about unable to format text, remembering that html requires a massive parser. Doubt you could get one to work on an ESP. Best bet would have been a sub-set of Mark-Down.

moinmoin-sh commented 2 years ago

Given the constaints we have there will be no chance to parse and display any standard mark-up text. To show anything other than plain text a FW specific formating has to done by the backend. As an alternative to plain text the information could be presented in a "feed style" like pop-up. Each "post" has a headingand a body. Character based coloring is possible. Could look like this grafik

sumnerboy12 commented 2 years ago

That looks pretty cool I think Moin, should be able to do plenty with those tools.