Well that depends on what you are working on. If you are dealing with a string cosntant, then there's no problem and your method should be faster than the iterator(maybe) function.
I want the game to display a dialogue (like many 2D RPGs do, a box plus some strings), but additionally, I don't want the whole sentence to be displayed at one time, I want the characters to appear one by one.
Box-drawing characters/other UTF-8?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Box-drawing characters/other UTF-8?
Exactly. And what if your dialog is in, say, any language other than English? These are legitimate concerns for Lovers, including me.utunnels wrote:I want the game to display a dialogue (like many 2D RPGs do, a box plus some strings), but additionally, I don't want the whole sentence to be displayed at one time, I want the characters to appear one by one.
Re: Box-drawing characters/other UTF-8?
Yeah, you are right.
But I'm using ttf, so things get a bit more complex (the font is not monospace, so probably I have to 'force' it to be by drawing the characters one by one). For example, I want a certain word to be displayed in red. I guess I have to break down the sentence to characters, unless there's some easiler way I don't know.
But I'm using ttf, so things get a bit more complex (the font is not monospace, so probably I have to 'force' it to be by drawing the characters one by one). For example, I want a certain word to be displayed in red. I guess I have to break down the sentence to characters, unless there's some easiler way I don't know.
- legendman3
- Citizen
- Posts: 68
- Joined: Sun Jan 22, 2012 8:29 pm
Re: Box-drawing characters/other UTF-8?
What if i have custom unicode characters?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Box-drawing characters/other UTF-8?
Seems like a good use for RichText (although it has no functions for displaying text one character at a time).utunnels wrote:I want a certain word to be displayed in red. I guess I have to break down the sentence to characters, unless there's some easiler way I don't know.
Help us help you: attach a .love.
Re: Box-drawing characters/other UTF-8?
Hah, thank you. That is far more plenty than what I need, at least it gives me ideas on how to do such rendering.
Re: Box-drawing characters/other UTF-8?
The Image Font (if you are talking about your another topic) only supports single-byte characters as its glyphs data.legendman3 wrote:What if i have custom unicode characters?
This has not been updated last time when I glanced at the code. So I think you need to wait for a bit longer. Or you can try ttf instead.
Or you can check my private build which has this support already.
- legendman3
- Citizen
- Posts: 68
- Joined: Sun Jan 22, 2012 8:29 pm
Re: Box-drawing characters/other UTF-8?
Eh im going to use ttf.utunnels wrote:The Image Font (if you are talking about your another topic) only supports single-byte characters as its glyphs data.legendman3 wrote:What if i have custom unicode characters?
This has not been updated last time when I glanced at the code. So I think you need to wait for a bit longer. Or you can try ttf instead.
Or you can check my private build which has this support already.
Who is online
Users browsing this forum: Ahrefs [Bot] and 10 guests