mirror of https://github.com/axmolengine/axmol.git
ScrollView uses new renderer now.
This commit is contained in:
parent
44a02ba466
commit
5c217f70d1
|
@ -485,10 +485,17 @@ void ScrollView::addChild(Node * child, int zOrder, int tag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScrollView::beforeDraw()
|
||||||
|
{
|
||||||
|
_beforeDrawCommand.init(0, _vertexZ);
|
||||||
|
_beforeDrawCommand.func = CC_CALLBACK_0(ScrollView::onBeforeDraw, this);
|
||||||
|
Director::getInstance()->getRenderer()->addCommand(&_beforeDrawCommand);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clip this view so that outside of the visible bounds can be hidden.
|
* clip this view so that outside of the visible bounds can be hidden.
|
||||||
*/
|
*/
|
||||||
void ScrollView::beforeDraw()
|
void ScrollView::onBeforeDraw()
|
||||||
{
|
{
|
||||||
if (_clippingToBounds)
|
if (_clippingToBounds)
|
||||||
{
|
{
|
||||||
|
@ -513,11 +520,18 @@ void ScrollView::beforeDraw()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScrollView::afterDraw()
|
||||||
|
{
|
||||||
|
_afterDrawCommand.init(0, _vertexZ);
|
||||||
|
_afterDrawCommand.func = CC_CALLBACK_0(ScrollView::onAfterDraw, this);
|
||||||
|
Director::getInstance()->getRenderer()->addCommand(&_afterDrawCommand);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retract what's done in beforeDraw so that there's no side effect to
|
* retract what's done in beforeDraw so that there's no side effect to
|
||||||
* other nodes.
|
* other nodes.
|
||||||
*/
|
*/
|
||||||
void ScrollView::afterDraw()
|
void ScrollView::onAfterDraw()
|
||||||
{
|
{
|
||||||
if (_clippingToBounds)
|
if (_clippingToBounds)
|
||||||
{
|
{
|
||||||
|
|
|
@ -254,11 +254,13 @@ protected:
|
||||||
* clip this view so that outside of the visible bounds can be hidden.
|
* clip this view so that outside of the visible bounds can be hidden.
|
||||||
*/
|
*/
|
||||||
void beforeDraw();
|
void beforeDraw();
|
||||||
|
void onBeforeDraw();
|
||||||
/**
|
/**
|
||||||
* retract what's done in beforeDraw so that there's no side effect to
|
* retract what's done in beforeDraw so that there's no side effect to
|
||||||
* other nodes.
|
* other nodes.
|
||||||
*/
|
*/
|
||||||
void afterDraw();
|
void afterDraw();
|
||||||
|
void onAfterDraw();
|
||||||
/**
|
/**
|
||||||
* Zoom handling
|
* Zoom handling
|
||||||
*/
|
*/
|
||||||
|
@ -351,6 +353,9 @@ protected:
|
||||||
|
|
||||||
/** Touch listener */
|
/** Touch listener */
|
||||||
EventListenerTouchOneByOne* _touchListener;
|
EventListenerTouchOneByOne* _touchListener;
|
||||||
|
|
||||||
|
CustomCommand _beforeDrawCommand;
|
||||||
|
CustomCommand _afterDrawCommand;
|
||||||
};
|
};
|
||||||
|
|
||||||
// end of GUI group
|
// end of GUI group
|
||||||
|
|
Loading…
Reference in New Issue