Merge pull request #5552 from dumganhar/develop

Adds EventListenerTouchOneByOne::isSwallowTouches, fixes a typo for Director::EVENT_AFTER_UPDATE.
This commit is contained in:
James Chen 2014-03-05 11:31:34 +08:00
commit b2c13ee2e3
3 changed files with 7 additions and 1 deletions

View File

@ -88,7 +88,7 @@ extern const char* cocos2dVersion(void);
const char *Director::EVENT_PROJECTION_CHANGED = "director_projection_changed";
const char *Director::EVENT_AFTER_DRAW = "director_after_draw";
const char *Director::EVENT_AFTER_VISIT = "director_after_visit";
const char *Director::EVENT_AFTER_UPDATE = "director_after_udpate";
const char *Director::EVENT_AFTER_UPDATE = "director_after_update";
Director* Director::getInstance()
{

View File

@ -61,6 +61,11 @@ void EventListenerTouchOneByOne::setSwallowTouches(bool needSwallow)
_needSwallow = needSwallow;
}
bool EventListenerTouchOneByOne::isSwallowTouches()
{
return _needSwallow;
}
EventListenerTouchOneByOne* EventListenerTouchOneByOne::create()
{
auto ret = new EventListenerTouchOneByOne();

View File

@ -43,6 +43,7 @@ public:
virtual ~EventListenerTouchOneByOne();
void setSwallowTouches(bool needSwallow);
bool isSwallowTouches();
/// Overrides
virtual EventListenerTouchOneByOne* clone() override;