From dd24b87caa13fce456c7bac3ebcf98c91b455966 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Mon, 22 Jul 2024 15:27:41 -0700 Subject: [PATCH] MeshStyle: overrides of addEventListener() and removeEventListener() should use Function instead of Dynamic --- src/starling/styles/MeshStyle.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/starling/styles/MeshStyle.hx b/src/starling/styles/MeshStyle.hx index 2eb45ae0..435c328c 100644 --- a/src/starling/styles/MeshStyle.hx +++ b/src/starling/styles/MeshStyle.hx @@ -10,6 +10,8 @@ package starling.styles; +import haxe.Constraints.Function; + import openfl.display3D.textures.TextureBase; import openfl.geom.Matrix; import openfl.geom.Point; @@ -257,7 +259,7 @@ 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); @@ -265,7 +267,7 @@ class MeshStyle extends EventDispatcher 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);