jwlodek / py_cui

A python library for intuitively creating CUI/TUI interfaces with widgets, inspired by gocui.
https://jwlodek.github.io/py_cui-docs
BSD 3-Clause "New" or "Revised" License
759 stars 42 forks source link

Text Formatting #70

Open jhilker98 opened 3 years ago

jhilker98 commented 3 years ago

Is your feature request related to a problem? Please describe. My feature request is not related to a problem; instead, I think that being able to format text for something other than a selected widget would be nice.

Describe the solution you'd like A way of formatting text in a widget (such as italics or bold or underlined text), possibly something similar to the way that colors are currently implemented (something like py_cui.text.ITALIC).

Additional context Add any other context or screenshots about the feature request here.

jwlodek commented 3 years ago

I like this idea... I guess the current ColorRule solution could be expanded to be something like TextFormatRule, which would then be extended to ColorRule and something for the formatting options. Probably two new classes would need to be created, and functions for widgets for adding such rules.

Also the rendering functions would need to be adjusted to take these into effect during drawing. I'll try and get around to this when I finish with the things I'm working on currently