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

Username:   Password: 
 RegisterRegister   
 Mouse.Where buttons do not disappear after cls'ing.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Redd




PostPosted: Tue May 30, 2017 4:46 pm   Post subject: Mouse.Where buttons do not disappear after cls'ing.

What is it you are trying to achieve?
Erase existing buttons (differences boxes) after they have been used in a Spot the Differences game program


What is the problem you are having?
The buttons are remaining on the screen when I have cls'd and drawn a new screen with new buttons. For example, my start screen has 4 buttons: Play, how to play, highscores and quit game. If the user hits Play, I cls and draw a menu asking the player for the level of difficulty they want, but in this menu screen I can hit an invisible quit game button. This is obviously very bad as I will have many Mouse.Where buttons for my differences hitbox, and if they all overlap a user may accidently click on a difference from a previous level, providing them points in game as well as a false "you have found a difference" notification.

Describe what you have tried to solve this problem
I have tried positioning the buttons so none will interfere with each other, but soon found it would be impossible.



Please specify what version of Turing you are using
4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Wed May 31, 2017 2:32 pm   Post subject: RE:Mouse.Where buttons do not disappear after cls\'ing.

cls only erases the screen. That is it. Erasing the buttons does not make them stop working. If you want the buttons to stop working, you need to stop checking for collisions with the mouse.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: