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

Username:   Password: 
 RegisterRegister   
 Keep cursor inside predefined area, box
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
julian3366




PostPosted: Sat May 07, 2011 5:36 pm   Post subject: Keep cursor inside predefined area, box

Hi, I am creating a game with a moving cannon, the angel of cannon is determined with the location of the mouse in a rectangular box below the cannon. There is no other need for the mouse anywhere else in the game. Is there a way to keep the mouse cursor in a certain area?
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Sat May 07, 2011 6:36 pm   Post subject: RE:Keep cursor inside predefined area, box

Yes, depending on the language you use.
julian3366




PostPosted: Mon May 09, 2011 7:17 pm   Post subject: Re: Keep cursor inside predefined area, box

wow... how did I forget to mention the language... I am using Turing 4.1. thanks
Tony




PostPosted: Mon May 09, 2011 7:22 pm   Post subject: RE:Keep cursor inside predefined area, box

The short answer is: no.

The long answer involves your operating system's API access.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
julian3366




PostPosted: Mon May 09, 2011 7:26 pm   Post subject: Re: Keep cursor inside predefined area, box

haha, thanks for the answer. It was worth a try right?
Tony




PostPosted: Mon May 09, 2011 7:47 pm   Post subject: RE:Keep cursor inside predefined area, box

Right. Feel free to ask more questions in the Turing Help forum. (You can also follow the Turing Walkthrough to get ahead and try to implement some more advanced features in your game)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> General Discussion
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: