Contents

hitTestOSC(atMousePositionX:mousePositionY:activePart:at:)

Figures out which part of the onscreen control was hit.

Declaration

func hitTestOSC(atMousePositionX mousePositionX: Double, mousePositionY: Double, activePart: UnsafeMutablePointer<Int>!, at time: CMTime)

Parameters

  • mousePositionX:

    The x position of the mouse

  • mousePositionY:

    The y position of the mouse

  • activePart:

    The part that was hit - set to 0 if no part was hit

  • time:

    The time at which we are checking for a hit

Discussion

This method is called by the host to determine which part of your controls were hit by the mouse. Return a constant that represents a part number for your onscreen control in the activePart parameter. It will be sent to you in the -draw, -mouse, and -key methods so you can handle those events properly.

See Also

Instance Methods