mirror of https://github.com/axmolengine/axmol.git
add touch callback types
This commit is contained in:
parent
6c67c6921d
commit
a643f05330
|
@ -52,10 +52,14 @@ public:
|
||||||
//
|
//
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::function<bool(Touch*, Event*)> onTouchBegan;
|
|
||||||
std::function<void(Touch*, Event*)> onTouchMoved;
|
typedef std::function<bool(Touch*, Event*)> ccTouchBeganCallback;
|
||||||
std::function<void(Touch*, Event*)> onTouchEnded;
|
typedef std::function<void(Touch*, Event*)> ccTouchCallback;
|
||||||
std::function<void(Touch*, Event*)> onTouchCancelled;
|
|
||||||
|
ccTouchBeganCallback onTouchBegan;
|
||||||
|
ccTouchCallback onTouchMoved;
|
||||||
|
ccTouchCallback onTouchEnded;
|
||||||
|
ccTouchCallback onTouchCancelled;
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
EventListenerTouchOneByOne();
|
EventListenerTouchOneByOne();
|
||||||
|
@ -82,10 +86,13 @@ public:
|
||||||
virtual bool checkAvailable() override;
|
virtual bool checkAvailable() override;
|
||||||
//
|
//
|
||||||
public:
|
public:
|
||||||
std::function<void(const std::vector<Touch*>&, Event*)> onTouchesBegan;
|
|
||||||
std::function<void(const std::vector<Touch*>&, Event*)> onTouchesMoved;
|
typedef std::function<void(const std::vector<Touch*>&, Event*)> ccTouchesCallback;
|
||||||
std::function<void(const std::vector<Touch*>&, Event*)> onTouchesEnded;
|
|
||||||
std::function<void(const std::vector<Touch*>&, Event*)> onTouchesCancelled;
|
ccTouchesCallback onTouchesBegan;
|
||||||
|
ccTouchesCallback onTouchesMoved;
|
||||||
|
ccTouchesCallback onTouchesEnded;
|
||||||
|
ccTouchesCallback onTouchesCancelled;
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
EventListenerTouchAllAtOnce();
|
EventListenerTouchAllAtOnce();
|
||||||
|
|
Loading…
Reference in New Issue