Adam's Lair Forum

game development and casual madness
It is currently 2018/01/23, 12:00

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: No borders for mouse
PostPosted: 2017/08/23, 08:48 
Newbie
Newbie

Joined: 2017/08/23, 08:32
Posts: 3
Role: Hobbyist
In my game, I use a cursor that does not match the system one. Often there is a situation that my cursor can still move to the right, but the system cursor rests on the right edge of the screen. How do I force the system cursor to move to the center of the screen? (sorry for bad English. Just google-translate :) )


Top
 Profile  
 
 Post subject: Re: No borders for mouse
PostPosted: 2017/08/23, 13:00 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 856
Location: Italy
Role: Hobbyist
Hi, and welcome :mrgreen:

Why don't you just hide the system cursor while inside the game? That way you just have to deal with your own cursor.

Unless the translation went awry and I don't understand the issue :D

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
 Post subject: Re: No borders for mouse
PostPosted: 2017/08/23, 17:45 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2037
Location: Germany
Role: Professional
Hey there and welcome as well ^^

SirePi wrote:
Hi, and welcome :mrgreen:

Why don't you just hide the system cursor while inside the game? That way you just have to deal with your own cursor.

Unless the translation went awry and I don't understand the issue :D


I think the issue is that the system cursor is hitting a screen edge when the intended behavior is a continuous infinite movement, like in a first-person shooter where only mouse movement, but not mouse position is evaluated.

prifio wrote:
Often there is a situation that my cursor can still move to the right, but the system cursor rests on the right edge of the screen. How do I force the system cursor to move to the center of the screen?


You can achieve this by setting DualityApp.Mouse.X/Y values to a value relative to your game window. This will work as long as the game window is in keyboard focus and simply do nothing when the user Alt-Tabs out of it.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
 Post subject: Re: No borders for mouse
PostPosted: 2017/08/23, 22:12 
Newbie
Newbie

Joined: 2017/08/23, 08:32
Posts: 3
Role: Hobbyist
Yes, all right.
Adam wrote:
I think the issue is that the system cursor is hitting a screen edge when the intended behavior is a continuous infinite movement, like in a first-person shooter where only mouse movement, but not mouse position is evaluated.

This help me. Thank you, Adam!
Adam wrote:
You can achieve this by setting DualityApp.Mouse.X/Y values to a value relative to your game window.

P.S. Thank for quick answer. It's really great


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group