Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Label font color
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
gamechampionx




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Tue Jun 22, 2004 6:56 pm   Post subject: (No subject)

label font color?

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

code:
color (red)
put "Hello"


to change fonts drawn on screen using Font.Draw, you have to do something like this:
code:
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)
the_short1




PostPosted: Tue Jun 22, 2004 7:02 pm   Post subject: (No 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...
Delos




PostPosted: Tue Jun 22, 2004 8:51 pm   Post subject: (No subject)

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




PostPosted: 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.
Delos




PostPosted: Wed Jun 23, 2004 10:12 am   Post subject: (No 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...
beard0




PostPosted: Wed Sep 01, 2004 8:19 pm   Post subject: (No 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.
the_short1




PostPosted: Thu Sep 02, 2004 2:16 pm   Post subject: (No 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~!
Sponsor
Sponsor
Sponsor
sponsor
beard0




PostPosted: Sat Sep 04, 2004 7:42 pm   Post subject: (No 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: