Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Suggestion Mouse#moveOffScreen()

Engineer
Joined
Jul 28, 2013
Messages
2,776
I'm not really considering adding a moveOffScreen method because the moment we standardize that is the moment they have something that is always consistent that they can detect, however I'm going to give you a utility method that will help you do something along those lines.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Okay I've gone ahead and implemented a Screen#getPhysicalBounds method that returns an InteractableRectangle in the next release. Although this isn't quite what you asked for, attempting to hover it will often take it outside of the screen bounds and if you really want to guarentee that it will be offscreen you can convert the InteractableRectangles from Screen#getBounds & Screen#getPhysicalBounds into java geometry Areas and subtract them from one another, then convert the Area into an InteractableShape and call hover on it.
 
Joined
Nov 5, 2014
Messages
505
Okay I've gone ahead and implemented a Screen#getPhysicalBounds method that returns an InteractableRectangle in the next release. Although this isn't quite what you asked for, attempting to hover it will often take it outside of the screen bounds and if you really want to guarentee that it will be offscreen you can convert the InteractableRectangles from Screen#getBounds & Screen#getPhysicalBounds into java geometry Areas and subtract them from one another, then convert the Area into an InteractableShape and call hover on it.

Nice one, thanks.
 
Top