Author |
Message |
julian3366
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: Sat May 07, 2011 6:36 pm Post subject: RE:Keep cursor inside predefined area, box |
|
|
Yes, depending on the language you use. |
|
|
|
|
![](images/spacer.gif) |
julian3366
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
julian3366
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
|