Yet another idea, which will have to wait for implementation until that friggin laptop arrives.
Anyway, the idea is this: a library that knows how to draw text with different fonts, and how to insert images between them.
The lover would specify what to draw by doing something like:
Code: Select all
rt = rich.new("Hello, {font:big}world! {img:smile}", {big = bigFont, smile = smileyImage})
--or
rt = rich.new{"Hello, {font:big}world! {img:smile}", big = bigFont, smile = smileyImage})
--or
rt = rich.new{"Hello, {big}world! {smile}", big = bigFont, smile = smileyImage}
Then one would do:
Code: Select all
function love.draw()
rt:draw()
end
I'm also planning on having it word-wrap and handle NPO2 images gracefully.
What do you think? Useful or useless?
EDIT: closed poll. Popular vote decided RT to be licensed zlib.