|
cocos2d-mac
1.0.1
Improved Cocos2D API Reference (Mac OS X version) for Kobold2D developers
|
#include <CCEventDispatcher.h>
Public Member Functions | |
| void | addMouseDelegate:priority: (id< CCMouseEventDelegate > delegate,[priority] NSInteger priority) |
| void | removeMouseDelegate: (id delegate) |
| void | removeAllMouseDelegates () |
| void | addKeyboardDelegate:priority: (id< CCKeyboardEventDelegate > delegate,[priority] NSInteger priority) |
| void | removeKeyboardDelegate: (id delegate) |
| void | removeAllKeyboardDelegates () |
| void | addTouchDelegate:priority: (id< CCTouchEventDelegate > delegate,[priority] NSInteger priority) |
| void | removeTouchDelegate: (id delegate) |
| void | removeAllTouchDelegates () |
Static Public Member Functions | |
| CCEventDispatcher * | sharedDispatcher () |
Protected Attributes | |
| BOOL | dispatchEvents_ |
| struct _listEntry * | keyboardDelegates_ |
| struct _listEntry * | mouseDelegates_ |
| struct _listEntry * | touchDelegates_ |
Properties | |
| BOOL | dispatchEvents |
This is object is responsible for dispatching the events:
Only available on Mac
| void CCEventDispatcher::addKeyboardDelegate:priority: | ( | id< CCKeyboardEventDelegate > | delegate, |
| [priority] NSInteger | priority | ||
| ) | [virtual] |
Adds a Keyboard delegate to the dispatcher's list. Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.
IMPORTANT: The delegate will be retained.
| void CCEventDispatcher::addMouseDelegate:priority: | ( | id< CCMouseEventDelegate > | delegate, |
| [priority] NSInteger | priority | ||
| ) | [virtual] |
Adds a mouse delegate to the dispatcher's list. Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.
IMPORTANT: The delegate will be retained.
| void CCEventDispatcher::addTouchDelegate:priority: | ( | id< CCTouchEventDelegate > | delegate, |
| [priority] NSInteger | priority | ||
| ) | [virtual] |
Adds a Touch delegate to the dispatcher's list. Delegates with a lower priority value will be called before higher priority values. All the events will be propgated to all the delegates, unless the one delegate returns YES.
IMPORTANT: The delegate will be retained.
| void CCEventDispatcher::removeAllKeyboardDelegates | ( | ) | [virtual] |
Removes all mouse delegates, releasing all the delegates
| void CCEventDispatcher::removeAllMouseDelegates | ( | ) | [virtual] |
Removes all mouse delegates, releasing all the delegates
| void CCEventDispatcher::removeAllTouchDelegates | ( | ) | [virtual] |
Removes all touch delegates, releasing all the delegates
| void CCEventDispatcher::removeKeyboardDelegate: | ( | id | delegate | ) | [virtual] |
removes a mouse delegate
| void CCEventDispatcher::removeMouseDelegate: | ( | id | delegate | ) | [virtual] |
removes a mouse delegate
| void CCEventDispatcher::removeTouchDelegate: | ( | id | delegate | ) | [virtual] |
Removes a touch delegate
| CCEventDispatcher* CCEventDispatcher::sharedDispatcher | ( | ) | [static, virtual] |
CCEventDispatcher singleton