mirror of https://github.com/axmolengine/axmol.git
CCScrollView should inherit CCActionTweenDelegate
This commit is contained in:
parent
e8f55069e3
commit
562fdcf98b
|
@ -300,6 +300,11 @@ void ScrollView::setZoomScaleInDuration(float s, float dt)
|
|||
}
|
||||
}
|
||||
|
||||
void CCScrollView::updateTweenAction(float value, const char* key)
|
||||
{
|
||||
setZoomScale(value);
|
||||
}
|
||||
|
||||
void ScrollView::setViewSize(Size size)
|
||||
{
|
||||
_viewSize = size;
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
* ScrollView support for cocos2d-x.
|
||||
* It provides scroll view functionalities to cocos2d projects natively.
|
||||
*/
|
||||
class ScrollView : public Layer
|
||||
class ScrollView : public Layer, public CCActionTweenDelegate
|
||||
{
|
||||
public:
|
||||
enum class Direction
|
||||
|
@ -228,6 +228,10 @@ public:
|
|||
virtual void addChild(Node * child, int zOrder) override;
|
||||
virtual void addChild(Node * child) override;
|
||||
|
||||
/**
|
||||
* CCActionTweenDelegate
|
||||
*/
|
||||
void updateTweenAction(float value, const char* key);
|
||||
protected:
|
||||
/**
|
||||
* Relocates the container at the proper offset, in bounds of max/min offsets.
|
||||
|
|
Loading…
Reference in New Issue