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'
On Thu, Jan 23, 2014 at 10:34 PM, Paul Pittlerson <[email protected]>wrote:
> I want to find some way to use the event when pressed X in the corner of
> the window.
>
> I'm making a multi threaded application, and it's fine sending the shut
> down signal to all threads in the scene on_exit function, but that is not
> called when exiting by the X button.
>
> --
> 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.
>
--
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.