openfl / starling

Known as the "Cross-Platform Game Engine", Starling is a popular Stage3D framework for OpenFL and Haxe
Other
237 stars 68 forks source link

#140 #141

Closed TomByrne closed 2 years ago

TomByrne commented 4 years ago

Fixed issue where touches that hit OpenFL DisplayObjects were triggering touch began events in Starling layer.

https://github.com/openfl/starling/issues/140

jgranick commented 4 years ago

Starling should have a nativeOverlayBlocksTouches property -- is this set to true?

If true and clicks are still going through, perhaps the hitTestPoint test in Starling is failing to work properly in OpenFL?

dimensionscape commented 3 years ago

@jgranick Actually the problem here is pretty simple. The default value for nativeOverlayBlocksTouches should be true. In this case, the Starling constructor sets a private field nativeOverlayBlocksTouches to true thus does not hit the setter. Overall, nativeOverlayBlocks is not even necessary, if only to prevent it from hitting the getter. At any rate, the fix here is to make sure the setter actually sets __nativeOverlayBlocks, which it currently doesn't and then to make sure the setter gets hit when the constructor sets the default value. I've submitted the PR #162 to resolve this since I do not have access to this repo.

joshtynjala commented 2 years ago

Closing this because it sounds like it was resolved by the merge of #162