1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Suggestion Mouse#moveOffScreen()

Discussion in 'Client & Site Suggestions' started by Defeat3d, Nov 14, 2014.

  1. Defeat3d

    Defeat3d Primate

    Joined:
    Oct 30, 2014
    Messages:
    3,073
    Likes Received:
    1,895
    Very useful for skills you can afk.
     
    Falixus, Hakuna Matata and Ozzy like this.
  2. Ozzy

    Joined:
    Nov 5, 2014
    Messages:
    505
    Likes Received:
    162
    Support.
     
    Defeat3d likes this.
  3. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    @Defeat3d you can always use Mouse.move(InteractableRectangle).
     
  4. Defeat3d

    Defeat3d Primate

    Joined:
    Oct 30, 2014
    Messages:
    3,073
    Likes Received:
    1,895
    I would still like to see it in the api. :)
     
  5. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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.
     
  6. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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.
     
    The_Crumb, Defeat3d and Ozzy like this.
  7. Ozzy

    Joined:
    Nov 5, 2014
    Messages:
    505
    Likes Received:
    162
    Nice one, thanks.
     

Share This Page

Loading...