mouseTouched
void mouseTouched(Actor actor,
GGMouse mouse,
java.awt.Point spot)
Event callback method to report events with the mouse touch area
of an actor's sprite. Mouse touch area types available: IMAGE (default,
events on non-transparent pixels of sprite image),
RECTANGLE, CIRCLE. The non-default types can be selected for each sprite ID
with Actor.setMouseTouchRectangle(), Actor.setMouseTouchCircle().
The parameter mouse is used to get the type of the mouse event and
the current mouse cursor position. spot contains the event coordinates relative
to the mouse touch area with the following fixed coordinate system:
x-axis to the left, y-axis downward, origin at center of mouse touch area.
The actor's location offset is respected.
If the mouse touch area of several actors overlays, all actors get the
notification unless the MouseTouchListener is registered by setting the
onTopOnly flag to true.
Move events are not reported. Drag events ar only reported if the
mouse was pressed inside the mouse touch area.
- Parameters:
actor
- the reference of the actor that reports the touchmouse
- the mouse reference to get to get information about the eventspot
- the pixel coordinates relative to the mouse touch area where the event occurred