Search found 3 matches
- Tue Dec 12, 2023 3:22 am
- Forum: Support and Development
- Topic: Justified text displaying one character at a time
- Replies: 13
- Views: 74443
Re: Justified text displaying one character at a time
I don't like how the line "about it" looks out: I solved this by printing a paragraph at a time, left aligning the last line for each paragraph. For basic text printing it's a lot of extra work, but I was already handling paragraphs to get text to wrap around images. Screen Shot 2023-12-1...
- Mon Dec 11, 2023 3:24 pm
- Forum: Support and Development
- Topic: Justified text displaying one character at a time
- Replies: 13
- Views: 74443
Re: Justified text displaying one character at a time
Great idea! I modified the love.graphics.print in your example to get the exact effect I was looking for: love.graphics.printf({{1,1,1,1}, whiteString, {1,1,1,0}, blackString}, 10, 10, 200, "justify") For anyone else looking at this, the key idea is to print all the text at once, but make ...
- Mon Dec 11, 2023 11:50 am
- Forum: Support and Development
- Topic: Justified text displaying one character at a time
- Replies: 13
- Views: 74443
Justified text displaying one character at a time
I'm trying to implement the effect you see in many games where text is printed a character at a time. (See the original Dragon Quest for an example.) On its own this is easy: all one needs to do is keep a counter then use string.sub and utf8.offset to print a substring that gets longer and longer. T...