Yep that's perfect. I had tried basically the same thing, but I put it in the Scene instead of a layer, which didn't work. (Why?)

Thank you as always Claudio.

On 24.01.2014 08:12, claudio canepa wrote:
Doing

class TestLayer(cocos.layer.Layer):
      is_event_handler = True

      def on_close(self):
          print('on_close called')

The console shows 'on_close called' when pressing that 'x' , but not if pressing the key 'ESC'

--
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.

Reply via email to