(BUG?)mouse buttons all trigger the same listener(Hashlink only)

#1

Hi,

I encountered a problem with the mouse event listeners, where all the mouse buttons all fire the same event listener

I tried the following snippet of code, compiled with Haxe 4.0.0-rc2 and using Lime 7.3.0
sprite.addEventListener(MouseEvent.MOUSE_DOWN, function(event:MouseEvent):Void
{
sprite.startDrag();
}) ;

sprite.addEventListener(MouseEvent.MOUSE_UP, function(event:MouseEvent):Void
{
sprite.stopDrag();
});

This behavior works correctly for the left mouse button but all other mouse buttons unintentionally demonstrate the same behavior. The same effect occurs with mouseEvent.RIGHT_MOUSE_DOWN and mouseEvent.RIGHT_MOUSE_UP

This is only the case on the hashlink target. On the other targets I tested (Neko and windows) this functions as expected.

If I am missing something obvious here I hope there is a kind soul to point it out, If not, I can file an issue but not completely sure on what steps to take

0 Likes

#2

Thank you!

I found the bug and it should be working after this commit:

0 Likes

#3

This works now great, thank you for this fix

Just for reference, I did the following after this

haxelib git lime https://github.com/openfl/lime.git develop
haxelib dev lime path_to_lime_repo
lime setup
lime rebuild lime hl

basically the routine for building lime from source, got me up and running again.

1 Like