On Sun, Oct 6, 2013 at 4:32 PM, Paul Pittlerson <[email protected]>wrote:
> If I have multiple layers that includes this: > > on_menu(self): > director.window.remove_handlers(self) > > close_menu(self): > director.window.push_handlers(self) > > What decides the order they get registered? I'm trying to disable all > layers (except menu) when the menu is open, but after opening the menu > once, some of the layers seems to have switched position in the event > handing stack, and I don't understand why. > > I will soon post the whole program to google code, so that if I'm making > some fundamental design errors it will be easier to show them in context > rather than small snippets. > > Why you are explicitly pushing and popping windows handlers ? What you don't like about menu = MyMenuLayer() menu.is_event_handler = True # when you want the menu visible and active scene.add(menu, z=10) #when you want to hide and disable the menu scene.remove(menu) ? > -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cocos-discuss. For more options, visit https://groups.google.com/groups/opt_out.
