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

How to Properly use .isPressed();

Discussion in 'Developer Support' started by DesignDecay, Jun 24, 2015.

  1. DesignDecay

    Joined:
    May 6, 2015
    Messages:
    16
    Likes Received:
    0
    I may be mistaken, but it appears the purpose of Mouse.isPressed() is to tell whether or not the mouse has been pressed. However, it seems to always return false. I am having similar issues with Mouse.isMoving() and Powers.Magic.isSelected(). If someone could lend me some guidance I'd appreciate it.
     
  2. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    Likes Received:
    84
    Not sure about the mouse but Powers.Magic.ANYKINDOFSPELLHERE.isSelected() should return true when selected..
     
  3. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Mouse.isPressed only reports if the virtual mouse is pressed. To know whether the mouse was pressed by an actual press you need to use a MouseListener.
     
  4. DesignDecay

    Joined:
    May 6, 2015
    Messages:
    16
    Likes Received:
    0
    Ahh, great. Thanks.
     

Share This Page

Loading...