1 registered members (tomaslolo),
1,542
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Colourful TEXT
[Re: lemming]
#423301
05/27/13 18:19
05/27/13 18:19
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
if you have a two-digit hex value the maximum number is (16 * 16 + 16); So if you divide 'h' by this value, you have it in range [0-1].
The I just added a '* 256' to get to the default [0-255] range.
...and the '/ 2' is somehow necessary, I don't know why.
Edit: make sure you read Wiseguy's post, we wrote something at the same time.
Last edited by Kartoffel; 05/27/13 18:20.
POTATO-MAN saves the day! - Random
|
|
|
Re: Colourful TEXT
[Re: lemming]
#423309
05/27/13 18:57
05/27/13 18:57
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
now I don't understand it either I think the problem is the way 3dgs colors texts... and I just made a little workaround for that
POTATO-MAN saves the day! - Random
|
|
|
Re: Colourful TEXT
[Re: Kartoffel]
#423364
05/28/13 14:44
05/28/13 14:44
|
Joined: Nov 2011
Posts: 274 de
lemming
OP
Member
|
OP
Member
Joined: Nov 2011
Posts: 274
de
|
So, I did a test with my unchanged original hextovar function and the following string:
"[clff0000]ff0000 [cl00ff00]00ff00 [cl0000ff]0000ff [clffffff]ffffff [cl22ff33]22ff33 [cl123456]123456 [cl2234dc]2234dc [cldcf1ac]dcf1ac [cl103004]103004"
I made a screenshot and loaded it into gimp to check all the colours. And they were all correct. So I donno what's happening in your script, Kartoffel. Can you also do a test like that?
|
|
|
Re: Colourful TEXT
[Re: lemming]
#423370
05/28/13 19:38
05/28/13 19:38
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
umm, I used a bitmap-font, maybe thats it? (just use a completely white image)
POTATO-MAN saves the day! - Random
|
|
|
Re: Colourful TEXT
[Re: Kartoffel]
#423380
05/28/13 21:46
05/28/13 21:46
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
The color of the bitmap font should be 0x808080. Then it will work.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Colourful TEXT
[Re: lemming]
#428058
08/17/13 06:19
08/17/13 06:19
|
Joined: May 2008
Posts: 257
djfeeler
Member
|
Member
Joined: May 2008
Posts: 257
|
Thanks for this contribution ^^ I made this function just to not display the text. You can display it in the code.
void cltext_reset(CLTEXT* cltext)
{
CLLIST* current = cltext.texts;
do
{
reset(current.element, SHOW | LIGHT | TRANSLUCENT);
if (current.next != NULL) current = current.next;
}while (current.next != NULL);
}
Last edited by djfeeler; 08/21/13 04:35.
|
|
|
|