Pardon the mess, Play My Code is in beta!

READY TO PLAY?
CLICK TO LOG IN!

sign up - lost password

isRightPressed

.isRightPressed()

Returns true if the right mouse button has been pressed down on this frame. It will fire just once for each mouse click.

It will only return true when it's pressed down, and on subsequent frames will return false, until the mouse is clicked again.

.isRightPressed() { |x, y| ... }

You can also attach a block which is yielded into if the method would return true. The x and y location of the mouse cursor are passed into the block.

See Also