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

Username:   Password: 
 RegisterRegister   
 Pic.Draw help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cycro1234




PostPosted: Sun Jan 16, 2005 4:27 pm   Post subject: Pic.Draw help

I'm trying to use Pic.New and Pic.Draw to help me move something on my screen, but it's not working. Here is the code that doesn't work, and the file attached.

code:
procedure arrowDown (x, x2, x3, x4 : int)
    var arrow : int   
    arrow := Pic.New (x, 560, x2, 670)
    for decreasing a : 560 .. 550
        Pic.Draw (arrow, x, a, picMerge) 
    end for
end arrowDown


When the user has the arrow on top of the first column and presses enter, the arrowd should move down a little bit. It moves down, but it leaves traces after it. Please help!



connect4 robert.t
 Description:

Download
 Filename:  connect4 robert.t
 Filesize:  4.01 KB
 Downloaded:  195 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Neo




PostPosted: Sun Jan 16, 2005 4:50 pm   Post subject: (No subject)

Dont use a for loop .You need to refresh the screen each time the picture moves down 1 unit or else you wont see it. Stick the draw procedure in ur main loop and subtract 'a' by 1 if it meets whatever condition.
cycro1234




PostPosted: Sun Jan 16, 2005 5:22 pm   Post subject: (No subject)

OK. Thanks
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  [ 3 Posts ]
Jump to:   


Style:  
Search: