Computer Science Canada


Author:  DarkHelmet [ 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.

Author:  DarkHelmet [ Mon Jan 13, 2003 11:48 am ]
Post subject: 

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

Author:  swizzbeats [ 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

Author:  Tony [ Mon Jan 13, 2003 8:54 pm ]
Post subject: 

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

such as

if b=1 then
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

Author:  DarkHelmet [ Tue Jan 14, 2003 4:23 pm ]
Post 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.

Author:  Tony [ Tue Jan 14, 2003 6:18 pm ]
Post 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