Open gl326 opened 10 months ago
Thanks for your thoughts, Greg. I think I'd want to do this as a separate draw call (or maybe many if the text is wrapped onto another line) behind the text using a nine-sliced sprite. This'd allow Scribble users to give some extra texture to their highlights.
I love the idea of regions as added in newer scribble releases, and something I expected to be able to do with them was to highlight a region of text with a standard "highlight" effect, e.g. a colored background behind the region of text that's highlighted.
I was able to mostly create the effect I wanted with this addition to _scribble_class_element:
It can take a typist() into account to draw the region as highlighted only if the typist has rendered the highlighted region. It would be even neater if it could draw the region partially as the typist moves through it but for my needs this works ok.
This seems like a good standard effect to have. If you want to communicate to players that a region of text is highlightable, or highlighted, this is what I think they'd recognize most easily rather than just changing the color of the text.