MouseClickInZone
MouseClickInZone

Checks if the mouse has been clicked within the given zone this frame.

bClick = myMouseKeyboard.MouseClickInZone( Zone )
bClick = myMouseKeyboard.MouseClickInZone( Zone, Button )
bClick = myMouseKeyboard.MouseClickInZone( X, Y, Width, Height, bGUI )
bClick = myMouseKeyboard.MouseClickInZone( X, Y, Width, Height, bGUI, Button )

Return value
TRUE if the specified mouse button has just been clicked within the zone, FALSE if not.

Parameters
  • Zone
    A zone object representing the check area
  • X
    The x coordinate of the zone to check
  • Y
    The y coordinate of the zone to check
  • Width
    The width of the zone to check
  • Height
    The height of the zone to check
  • bGUI
    TRUE to check the position relative to the GUI layer. FALSE (default) to check relative to the game layer
  • Button
    The button to check.
    • Window.LEFTBUTTON / Keyboard.LBUTTON
      Checks the left mouse button (default)
    • Window.MIDDLEBUTTON / Keyboard.MBUTTON
      Checks the middle mouse button
    • Window.RIGHTBUTTON / Keyboard.RBUTTON
      Checks the right mouse button
Comments

This will return TRUE for the frame when the mouse is pressed, then FALSE for future frames until the mouse is released.

See also
MouseKeyboard:MouseClick
MouseKeyboard:MouseClickOnObject
MouseKeyboard:MouseClickInZoneRep
MouseKeyboard:MouseInZone



JAM © 2005 no one in particular
Project started by David Evans in 2005