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

Username:   Password: 
 RegisterRegister   
 How do I add a background color?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
qmanjr5




PostPosted: Wed Dec 02, 2009 12:07 pm   Post subject: How do I add a background color?

If I HAVE to do a draw.fillbox or whatever, can you guys give me the full command with X Y coordinates to fill the entire run window?
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Wed Dec 02, 2009 12:23 pm   Post subject: RE:How do I add a background color?

Two ways:

Draw.FillBox(0,0,maxx,maxy,green)

setcolourback(green)
cls

The second will make it so everytime you run cls, it automatically sets the backround to that colour.
DemonWasp




PostPosted: Wed Dec 02, 2009 12:25 pm   Post subject: RE:How do I add a background color?

To add a background colour to text, use Text.ColourBack(). Otherwise, you should be able to draw a filled box from (0,0) to (maxx,maxy).
qmanjr5




PostPosted: Wed Dec 02, 2009 12:25 pm   Post subject: RE:How do I add a background color?

what does cls mean? and how would i put setcolourback at the beginning of the whole code? before i declare vars and everything?

and what is the code to put text as white?
Megaman_Zero




PostPosted: Wed Dec 02, 2009 2:38 pm   Post subject: Re: How do I add a background color?

qmanjr5 wrote:

what does cls mean?


It means that once the program reaches that line, the whole run window will be cleared of text, images, etc.

qmanjr5 wrote:

and how would i put setcolourback at the beginning of the whole code? before i declare vars and everything?


You don't have to put it before declaring the variables, but only before the main body of your actual code.

Ex.:

var blah : int

setcolourback (green)

if blah = 0 then
ha
end if
qmanjr5




PostPosted: Wed Dec 02, 2009 7:31 pm   Post subject: RE:How do I add a background color?

setcolourback is only for text? or for the whole window?
it's not working anyway.
qmanjr5




PostPosted: Wed Dec 02, 2009 7:33 pm   Post subject: RE:How do I add a background color?

For the background, i just used
Turing:


but how do I change the text colour?

I know these are newb questions, but this is the first time I've dabbled in coloring
Zren




PostPosted: Wed Dec 02, 2009 7:40 pm   Post subject: RE:How do I add a background color?

Text.Colour(brightgreen) %Text
Text.ColourBack(black) %BG

alternatively you can also use:
colour()
colourback()

or even drop the u and go with the american spelling.
Sponsor
Sponsor
Sponsor
sponsor
qmanjr5




PostPosted: Wed Dec 02, 2009 7:52 pm   Post subject: RE:How do I add a background color?

So, for the text.colour will that do ALL the text?
qmanjr5




PostPosted: Wed Dec 02, 2009 7:54 pm   Post subject: RE:How do I add a background color?

Never mind, got it Smile

I appreciate all the help Smile Smile Smile
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  [ 10 Posts ]
Jump to:   


Style:  
Search: