isRightClick

.isRightClick()

Return true if the right mouse button has been released on the current frame, and otherwise returns false.

A click differs from being down by only being recorded for one frame, rather then permanently, whilst the button is pressed.

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

Optionally, you can attach a block onto 'isRightClick' which is executed if the right mouse button is currently being clicked. The X and Y location of the mouse is passed in, to allow you to use it.

getControls().isRightClick() do |x, y|
    // executed if right button is clicked
end

See also

isRightDown - isRightPressed - isLeftClick - isMiddleClick