Computer Science Canada

Keep cursor inside predefined area, box

Author:  julian3366 [ 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?

Author:  Insectoid [ Sat May 07, 2011 6:36 pm ]
Post subject:  RE:Keep cursor inside predefined area, box

Yes, depending on the language you use.

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

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

Author:  julian3366 [ 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?

Author:  Tony [ 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)


: