So, I build point-and-click adventure games. I want to try to add ouya support. But to do this, I need to be able to find and loop through all the display objects. So, I can have a floating pointer on the screen, that changes to a finger or magnifying glass when it hovers over a clickable display object. Plus the ability to call the tap or touch event on any functions on those display objects.
I’m having a hard time figuring out how to even find the display objects.
I’m using storyboard. And upon scene creation it sets up the group object as follows:
local group = self.view
Every display object gets added to group
group:insert( room );
But when I try to loop through group to find these display objects, I find two variables with type = “userdata” and “table”.
When I then loop through the table variable, I get more tables, and functions.
So I built some code that keeps looping through all the nested tables looking for anything familiar, and it appears there are literally over 13,000 nested tables in the group object. Eventually I get a stack overflow error. And I’m not finding anything familiar.
Help me figure out how to find the display objects I’ve added to the group.
Thanks