Computer Science Canada

Label font color

Author:  gamechampionx [ Tue Jun 22, 2004 5:55 pm ]
Post subject:  Label font color

Is there any way to set the font color of a label? I need this because I'm trying to make text centered with a transparent background, and a specific color. I've checked the help file and every possible resource, and found nothing.

Author:  AsianSensation [ Tue Jun 22, 2004 6:56 pm ]
Post subject: 

label font color?

to change colors in Turing, if it's text, you have to do something like this:

color (red)
put "Hello"

to change fonts drawn on screen using Font.Draw, you have to do something like this:
var fontID := Font.New ("sans serif:18:bold")
Font.Draw ("Hello", 0, 0, fontID, red)

other than those, you can't change the color of text/fonts in turing. (Though I'm not too sure about GUI buttons, never used them)

Author:  the_short1 [ Tue Jun 22, 2004 7:02 pm ]
Post subject: 

i dont think u can chagne the color of the GUI button text...

but u can change the background color of a GUI button to something other then the ugly gray.,..

its GUI.SetColor or something similiar to that... look in the reference...

Author:  Delos [ Tue Jun 22, 2004 8:51 pm ]
Post subject: 

Or you could just use GUI.DrawFont()...(I belive that's the name of the command...hehehe).

Author:  gamechampionx [ Tue Jun 22, 2004 9:43 pm ]
Post subject:  font color

The text I am referring to is on a GUI label widget. I can hardly believe that Turing does not have the ability to change its color, but it seems like that's the answer. I am going to have to rewrite chunks of my program because of this problem.

Using and Font Draw type procedure will be a severe problem in this program due to the use of background images. This seems really rediculous overall, and I would like to see if there is a way other than redoing these sections to change the font color.

Author:  Delos [ Wed Jun 23, 2004 10:12 am ]
Post subject: 

I remember a thread like this a couple weeks back. Same problem. I guess the guys at Holt figured you'd never need to change the colour of the text...
Well, you could always just Font.Draw() stuff when you need it, then redraw the bg over it after...tedious, but hey, no one said Turing wasn't...

Then again, no one said programming wasn't...

Author:  beard0 [ Wed Sep 01, 2004 8:19 pm ]
Post subject: 

I have had a lto of troubloe with limitations on turing GUI. So much so, that I've gone into the GUI files, figured out how they work, and added new commands of my own (for example, GUI.GetLine for textboxes). If you are a competant programmer, it's not that hard. You'll probably get some errors at first, but once you get the hang of it, ading new commands to GUI is easy.

Author:  the_short1 [ Thu Sep 02, 2004 2:16 pm ]
Post subject: 

heres the solution!

u can create an empty button box.. wihtout any text.....

then just use font .draw overtop of it!

u (mite) have to redraw the fonts after each time u do :

if GUI.ProcessEvent then
end if

but still.. then u can do GUI.SetColor for the buttoing... and have a different color for text!

hpep that helps~!

Author:  beard0 [ Sat Sep 04, 2004 7:42 pm ]
Post subject: 

I decided to make the necessary changes to GUI files in my library, so I'll give them to you here there's a readme to explain how to inplement them, and an example program. Gamechampionx - tell me if this is what you meant.