Skip to content

Commit

Permalink
MeshStyle: overrides of addEventListener() and removeEventListener() …
Browse files Browse the repository at this point in the history
…should use Function instead of Dynamic
  • Loading branch information
joshtynjala committed Jul 22, 2024
1 parent dcbbf86 commit dd24b87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/starling/styles/MeshStyle.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

package starling.styles;

import haxe.Constraints.Function;

import openfl.display3D.textures.TextureBase;
import openfl.geom.Matrix;
import openfl.geom.Point;
Expand Down Expand Up @@ -257,15 +259,15 @@ class MeshStyle extends EventDispatcher

// enter frame event

override public function addEventListener(type:String, listener:Dynamic):Void
override public function addEventListener(type:String, listener:Function):Void
{
if (type == Event.ENTER_FRAME && _target != null)
_target.addEventListener(Event.ENTER_FRAME, onEnterFrame);

super.addEventListener(type, listener);
}

override public function removeEventListener(type:String, listener:Dynamic):Void
override public function removeEventListener(type:String, listener:Function):Void
{
if (type == Event.ENTER_FRAME && _target != null)
_target.removeEventListener(type, onEnterFrame);
Expand Down

0 comments on commit dd24b87

Please sign in to comment.