Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #114 from IkonOne/dev
Browse files Browse the repository at this point in the history
Using the new Shape class to replace EitherType
  • Loading branch information
adireddy authored Mar 7, 2017
2 parents d81320f + 8ac42c2 commit b3f8692
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions src/pixi/interaction/InteractiveTarget.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import pixi.core.math.shapes.Ellipse;
import pixi.core.math.shapes.Polygon;
import pixi.core.math.shapes.Rectangle;
import pixi.core.math.shapes.RoundedRectangle;
import pixi.core.math.shapes.Shape;
import pixi.interaction.EventEmitter;
import haxe.extern.EitherType;

@:native("PIXI.interaction.interactiveTarget")
extern class InteractiveTarget extends EventEmitter
{

/**
* Fired when a pointer device button (usually a mouse button) is pressed on the display
* object.
Expand All @@ -19,7 +19,7 @@ extern class InteractiveTarget extends EventEmitter
* @memberof InteractiveTarget#
*/
dynamic function mousedown(event:EventTarget):Void;

/**
* Fired when a pointer device secondary button (usually a mouse right-button) is pressed
* on the display object.
Expand Down Expand Up @@ -149,47 +149,47 @@ extern class InteractiveTarget extends EventEmitter
* @memberof InteractiveTarget#
*/
dynamic function pointermove(event:EventTarget):Void;

/**
* Fired when a pointer device is moved onto the display object
*
* @event pointerover
* @memberof InteractiveTarget#
*/
dynamic function pointerover(event:EventTarget):Void;

/**
* Fired when a pointer device is moved off the display object
*
* @event pointerout
* @memberof InteractiveTarget#
*/
dynamic function pointerout(event:EventTarget):Void;

/**
* Fired when a touch point is placed on the display object.
*
* @event touchstart
* @memberof InteractiveTarget#
*/
dynamic function touchstart(event:EventTarget):Void;

/**
* Fired when a touch point is removed from the display object.
*
* @event touchend
* @memberof InteractiveTarget#
*/
dynamic function touchend(event:EventTarget):Void;

/**
* Fired when a touch point is placed and removed from the display object.
*
* @event tap
* @memberof InteractiveTarget#
*/
dynamic function tap(event:EventTarget):Void;

/**
* Fired when a touch point is removed outside of the display object that initially
* registered a [touchstart]{@link PIXI.interaction.InteractionManager#event:touchstart}.
Expand All @@ -198,16 +198,16 @@ extern class InteractiveTarget extends EventEmitter
* @memberof InteractiveTarget#
*/
dynamic function touchendoutside(event:EventTarget):Void;

/**
* Fired when a touch point is moved along the display object.
*
* @event touchmove
* @memberof InteractiveTarget#
*/
dynamic function touchmove(event:EventTarget):Void;


/**
* Indicates if the displayObject is interactive or not.
*
Expand All @@ -228,17 +228,12 @@ extern class InteractiveTarget extends EventEmitter

/**
* Interaction shape. Children will be hit first, then this shape will be checked.
*
* @member {EitherType<Rectangle, EitherType<Circle, EitherType<Ellipse, EitherType<Polygon, RoundedRectangle>>>>}
*
* @member {Shape}
* @memberof InteractiveTarget#
* @default null
*/
var hitArea: EitherType< Rectangle,
EitherType< Circle,
EitherType< Ellipse,
EitherType< Polygon,
RoundedRectangle
>>>>;
var hitArea: Shape;

/**
* Indicates if the displayObject uses button mode or normal mode.
Expand Down

0 comments on commit b3f8692

Please sign in to comment.