\B.... but custom?

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: \B.... but custom?

by Ice Cream Jonsey » Mon May 08, 2006 8:18 pm

Oh! Well, then. Yes. I'm not married to breaking up lines of speech with the semicolon and a function call. I'm not married to that idea at all. I'm down at the bar on my fifth vodka gimlet just looking for an excuse.

by Guest » Mon May 08, 2006 7:44 pm

Actually, for what it's worth, if you check out the FB source code, the dialogue coloring is handled sort of like I described.

by Ice Cream Jonsey » Sun May 07, 2006 10:32 pm

Thanks, guys. Yeah, I ended up just with making a routine that lets me throw the text I want to be colored cyan as the routine's argument. Simple enough for what I'm trying to do, I think.

Robb

by Guest » Fri May 05, 2006 7:17 pm

You could also write a little pair of routines like

StartMyText
"Blah Blah Blah..."
EndMyText

where StartMyText would 'text to <somearray>' and EndMyText would purge the <somearray> buffer, paying attention to your custom formatting, before setting 'text to 0', in order to save on filling up the dictionary with those phrases passed as arguments. If that makes any sense.

by Merk » Thu May 04, 2006 5:03 am

I never found a way, when I was messing with colors before. A section starting at around line 240 in hemisc.c (the Hugo source code) shows where it handles format codes.

It would probably be possible to write your own front-end, but I don't know how slow it would be. Basically, you'd call a functon like MyPrint("whatever"), which converts "whatever" to an array and then processes it a character at a time. You could look for your own formatting codes there, and just "print" (with a semicolon after each character) anything that isn't your own code. It probably wouldn't even be a very difficult routine to write.

\B.... but custom?

by Ice Cream Jonsey » Thu May 04, 2006 12:52 am

You know how \B .. \b denotes bold text in Hugo? And \I (text) \i does the same for italics? Can you make your own version of that?

Let's say you want \Y \y to note that the text in between should be yellow. Can you do that by making a change to the library?

Top