Is that what it's called?
Is there a way to make a special format option to change text colors (and fonts? Fints aren't that inportant) on the fly, in a function that overwrites love.graphics.print/printf?
Yeah right!
https://kivy.org/doc/stable/api-kivy.co ... arkup.html
Special text formatting/markup/bbcode
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Special text formatting/markup/bbcode
Last edited by Gunroar:Cannon() on Fri Jan 14, 2022 4:04 pm, edited 1 time in total.
Re: Special text formatting/markup/bbcode
in https://love2d.org/wiki/love.graphics.printf there are already options to change text colors within a single call
there are more options to that call: but they will be applied to all the text in the call
edit: seems https://love2d.org/wiki/Text:addf could be uses to add newly formatted text onto existing
Code: Select all
love.graphics.printf({{1,0,0},"red pill " , {0,0,1}, " blue pill"}, 25,25, 200)
Code: Select all
limit, align, angle, sx, sy, ox, oy, kx, ky
edit: seems https://love2d.org/wiki/Text:addf could be uses to add newly formatted text onto existing
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Special text formatting/markup/bbcode
Oh, ok. Thank you. It's not as fancy as others but I guess it will do
Re: Special text formatting/markup/bbcode
To answer you first question, in case you want to dive further into the subject, in UI terminology this is called "rich text".
Some examples:
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Special text formatting/markup/bbcode
Ahhh, yes.
*rich*
But, really, thanks. I should have pieced that together (from rich text editors, rich text files, etc.)
*rich*
But, really, thanks. I should have pieced that together (from rich text editors, rich text files, etc.)
Who is online
Users browsing this forum: No registered users and 4 guests