richardeakin/Cinder-View

More than one Graph Elements

Closed this issue · 2 comments

Hi Richard,

Thanks for your reply on my previous issue. I need your help for one more issue.

I have two graph objects with different subviews. All the subviews has their touch events and its working fine.But the places where rendered graph elements overlaps, touch events works only for first rendered graph object. events are not working for any other graph object rendered on this object.

Is there a way to stack graph objects and set the priority based on their rendering order.

Kindly Help.

Thanks,
Abhishek Shrimali

Not sure yet what problem you're seeing, although I can verify that touch events works with multiple Graphs as this is how I currently use it. Things to try:

  • Try changing the priority on Graph::EventOptions, which you pass in to connectEvents.
  • Make sure you mark whatever touches are handled by the first receiver, as done here. You also need to return true if any touches within the event are handled.

Sorry for the lack of documentation on this. It is our first approach to supporting multi-touch and so we are awaiting more user testing and feedback before deciding if it is the correct way to go for v1. Keep me updated!

Hey Richard,

Thanks a lot, I followed steps provided by you and its working fine :)