mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5058 from zhiqiangxu/develop
ScrollView should implement ActionTweenDelegate
This commit is contained in:
commit
e59a14f205
|
@ -310,6 +310,11 @@ void ScrollView::setZoomScaleInDuration(float s, float dt)
|
|||
}
|
||||
}
|
||||
|
||||
void ScrollView::updateTweenAction(float value, const std::string& key)
|
||||
{
|
||||
this->setZoomScale(value);
|
||||
}
|
||||
|
||||
void ScrollView::setViewSize(Size size)
|
||||
{
|
||||
_viewSize = size;
|
||||
|
|
|
@ -65,7 +65,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 ActionTweenDelegate
|
||||
{
|
||||
public:
|
||||
enum class Direction
|
||||
|
@ -230,6 +230,10 @@ public:
|
|||
using Node::addChild;
|
||||
virtual void addChild(Node * child, int zOrder, int tag) override;
|
||||
|
||||
/**
|
||||
* CCActionTweenDelegate
|
||||
*/
|
||||
void updateTweenAction(float value, const std::string& key);
|
||||
protected:
|
||||
/**
|
||||
* Relocates the container at the proper offset, in bounds of max/min offsets.
|
||||
|
|
Loading…
Reference in New Issue