Suggestion Mouse#moveOffScreen()

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

  1. Defeat3d

    Defeat3d Celestial

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

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

    Arbiter Mod Automation

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

    Defeat3d Celestial

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

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,302
    Likes Received:
    735
    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 The Developer

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

    Joined:
    Nov 5, 2014
    Messages:
    504
    Likes Received:
    159
    Nice one, thanks.
     

Share This Page

Loading...