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

Username:   Password: 
 RegisterRegister   
 Help with changing text colours
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mike200015




PostPosted: Mon Jan 24, 2005 7:08 pm   Post subject: Help with changing text colours

I made this little program, which is an addition to one of my programs. what it is, is an imitation loading bar when a program is loading, there is a number tht counts up as the bar fills in with black, i wnt to put the number in the bar, and when the black goes over the number, i want the number to change to white so you can still see it. if anyone knows how and can help id appreciate it .. thank you. here is the loading bar code.:
code:

var x3 : int := 200
drawbox (200, 200, 400, 220, black)
for i : 0 .. 100
    drawfillbox (200, 200, x3, 220, black)
    locate (11, 34)
    put "Loading..", i, "%"
    x3 += 2
    delay (150)
end for
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Mon Jan 24, 2005 7:20 pm   Post subject: (No subject)

code:

colour (7)
put "Hello"
colour (0)
put "World"
colour (14)
put "Meh"
cycro1234




PostPosted: Mon Jan 24, 2005 7:30 pm   Post subject: (No subject)

Or u can make an if statement that checks to see if the bar is past a certain point, then change the colour to white.
cycro1234




PostPosted: Mon Jan 24, 2005 7:49 pm   Post subject: (No subject)

Why are you flaming me? Crying or Very sad

I bet if...if...if you told Bill Gates that, he wuda never invented Microsoft!!!
compuwiz




PostPosted: Mon Jan 24, 2005 8:02 pm   Post subject: (No subject)

cycro1234 wrote:
I bet if...if...if you told Bill Gates that, he wuda never invented Microsoft!!!

well that's fine.....good reason to go back in time to send this stuff to bill gates.... Very Happy
cycro1234




PostPosted: Mon Jan 24, 2005 8:37 pm   Post subject: (No subject)

Don't spam the help section!
ste_louis26




PostPosted: Mon Jan 24, 2005 9:09 pm   Post subject: (No subject)

you could also use the what dotcolour command to find that point before you switch the text to white and . . . . . .robert do u have a life?
ste_louis26




PostPosted: Mon Jan 24, 2005 9:13 pm   Post subject: (No subject)

Cound't you just have red or something to start with instead of changing it from black to white. It's a lot easier. Grey would do good.
Sponsor
Sponsor
Sponsor
sponsor
basketball4ever




PostPosted: Tue Jan 25, 2005 1:02 am   Post subject: (No subject)

code:
    var col :int := 20
    var introline : string := "Hello mr.anderson ??? ."
    for a : 1 .. length (introline)
        colour (col)
        locate (10, a + 20)
        put introline (a) ..
        delay (100)
        col := col + 3
    end for
    loop
        exit when hasch
    end loop
ste_louis26




PostPosted: Tue Jan 25, 2005 12:12 pm   Post subject: (No subject)

You also have to reposition the bar so that it falls on the line of the say's loading (locate is by characters so it isn't as flexable as pixals.)Do you want to change letter by letter or just the entire word.
gladiator_889




PostPosted: Tue Jan 25, 2005 12:39 pm   Post subject: (No subject)

Ruben sucks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing Twisted Evil Laughing
basketball4ever




PostPosted: Tue Jan 25, 2005 12:42 pm   Post subject: (No subject)

spam.... stop spamming x_X
ste_louis26




PostPosted: Tue Jan 25, 2005 12:42 pm   Post subject: (No subject)

don't spam the help section
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  [ 13 Posts ]
Jump to:   


Style:  
Search: