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

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




PostPosted: Mon Jan 13, 2003 11:21 am   Post subject: buttonmoved

I'm trying to write a yahtzee program for my computer class. In this program, I want the dice to change randomly until the mouse clicks a certain area. I don't want to use GUI.CreateButton for a button, because I tried them, and they were a majour pain. My problem is with the buttonmoved command. I'm trying to use that, with buttonwhere, to determine whether the user is clicking in a certain area at any given time. The problem is that once they click the button once, buttonmoved never returns to false. So after the button has been clicked once, it thinks it is always being clicked. If anyone knows how to set buttonmoved back to false, or find a way around it, help would be appreciated.
Sponsor
Sponsor
Sponsor
sponsor
DarkHelmet




PostPosted: Mon Jan 13, 2003 11:48 am   Post subject: (No subject)

Forget this one. I figured out how to do it. The tutorial that comes with the program isn't much help.
swizzbeats




PostPosted: Mon Jan 13, 2003 2:25 pm   Post subject: Re; Move Button

Where did you get the program? I;m trying to learn how to make a drawing program as well
Tony




PostPosted: Mon Jan 13, 2003 8:54 pm   Post subject: (No subject)

you can declear your own flag to keep track of button clicking...

such as

code:
Mouse.Where(x,y,b)
if b=1 then
flag:=true
else
flag:=false
end if


this way boolean variable flag keeps track of where mouse have been pressed or not... same as b though, but you can change flag based on conditions Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DarkHelmet




PostPosted: Tue Jan 14, 2003 4:23 pm   Post subject: (No subject)

That's a good idea. I got it working, but that way is a lot more convenient than how i did it, and it probably works better. Thanks for your help. My teacher in school is absolutely no help with Turing. He doesn't know anything more complex than using files, and sorting them. I got Turing from a friend at school. I don't know where he got it from.
Tony




PostPosted: Tue Jan 14, 2003 6:18 pm   Post subject: (No subject)

Hey, if your teacher is no help, you can try to convince him/her to tell students to go to SWAT for help Wink

and hey, its not only help, we got lots of tutorials for advanced stuff and stuff like Contest preparation and general chat Very Happy
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 6 Posts ]
Jump to:   


Style:  
Search: