Skip to content

Commit

Permalink
Pointer: recurse FlxSpriteGroup members
Browse files Browse the repository at this point in the history
(rather than selecting / moving the entire group)
  • Loading branch information
Gama11 committed Oct 12, 2016
1 parent 25ab631 commit 89a4ee2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flixel/system/debug/interaction/tools/Pointer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ class Pointer extends Tool
if (member == null || !member.visible || !member.exists)
continue;

if (Std.is(member, FlxTypedGroup))
target = pinpointItemInGroup((cast member).members, cursor);
@:privateAccess var group = FlxTypedGroup.resolveGroup(member);
if (group != null)
target = pinpointItemInGroup(group.members, cursor);
else if (Std.is(member, FlxSprite) &&
(cast(member, FlxSprite).overlapsPoint(cursor, true)))
target = cast member;
Expand Down

0 comments on commit 89a4ee2

Please sign in to comment.