2 registered members (AndrewAMD, alibaba),
1,184
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
How do I give digits color?
#277497
07/09/09 12:28
07/09/09 12:28
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
How do I add color to the letters and numbers in this:
//number of books digits(100,100,"Books: %.0f",("Arial#20"),1,got_books); digits(180,100,"/ %.0f",("Arial#20"),1,max_books);
As it is now it is only showing the text and number in the color white. I whant to be able to give it more color.
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I give digits color?
[Re: Eagelina]
#277509
07/09/09 12:56
07/09/09 12:56
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Digits get their color from the panels background color. mypanel.red, .green, .blue So all the digits get the same color.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: How do I give digits color?
[Re: EvilSOB]
#277511
07/09/09 13:00
07/09/09 13:00
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
But I dont have them on a panel, only showing directly in the game.
And I am shure it is a way to "control" the color, but I cant find it mentioned anywhere....
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I give digits color?
[Re: Eagelina]
#277513
07/09/09 13:01
07/09/09 13:01
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
And what shall I use if I whant to have colored text showing in the game?
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I give digits color?
[Re: Cowabanga]
#277519
07/09/09 13:30
07/09/09 13:30
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
so I must add another line wiht text? Isent there any ways to integrate this into digits().....? Like to compress the codes...
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I give digits color?
[Re: Cowabanga]
#277523
07/09/09 13:41
07/09/09 13:41
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
Bouth text and numbers needed to be colored.
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I give digits color?
[Re: Eagelina]
#277526
07/09/09 13:52
07/09/09 13:52
|
Joined: Aug 2008
Posts: 2,838 take me down to the paradise c...
Cowabanga
Expert
|
Expert
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
|
Here's the code (Tested):
TEXT* books_word =
{
pos_x = 100; //Edit this
pos_y = 100; //Edit this
font = "Arial#20";
string = ("Books:");
red = 50;
green = 50;
blue = 140;
flags = SHOW;
}
PANEL* books_amount =
{
digits(135,100,5,"Arial#20",1,got_books); //Edit this
digits(170,100,"/ %.0f","Arial#20",1,max_books); //Edit this
flags = SHOW;
red = 40;
green = 80;
blue = 225;
}
|
|
|
|