mirror of https://github.com/axmolengine/axmol.git
parent
094716a500
commit
c1f37a6926
|
@ -33,6 +33,7 @@ namespace ui {
|
|||
|
||||
Scale9Sprite::Scale9Sprite()
|
||||
: _spritesGenerated(false)
|
||||
, _spriteFrameRotated(false)
|
||||
, _positionsAreDirty(true)
|
||||
, _scale9Image(nullptr)
|
||||
, _topLeft(nullptr)
|
||||
|
@ -130,11 +131,11 @@ namespace ui {
|
|||
return init(sprite, rect, rotated, Vec2::ZERO, rect.size, capInsets);
|
||||
}
|
||||
|
||||
bool Scale9Sprite::init(Sprite* sprite, const Rect& rect, bool rotated, const Vec2 &offset, const Size &origianlSize, const Rect& capInsets)
|
||||
bool Scale9Sprite::init(Sprite* sprite, const Rect& rect, bool rotated, const Vec2 &offset, const Size &originalSize, const Rect& capInsets)
|
||||
{
|
||||
if(sprite)
|
||||
{
|
||||
this->updateWithSprite(sprite, rect, rotated, offset, origianlSize, capInsets);
|
||||
this->updateWithSprite(sprite, rect, rotated, offset, originalSize, capInsets);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -917,7 +918,7 @@ y+=ytranslate; \
|
|||
}
|
||||
else
|
||||
{
|
||||
if (_scale9Image)
|
||||
if (_scale9Image && _scale9Image->getLocalZOrder() < 0 )
|
||||
{
|
||||
_scale9Image->visit(renderer, _modelViewTransform, flags);
|
||||
}
|
||||
|
@ -939,7 +940,7 @@ y+=ytranslate; \
|
|||
}
|
||||
else
|
||||
{
|
||||
if (_scale9Image)
|
||||
if (_scale9Image && _scale9Image->getLocalZOrder() >= 0 )
|
||||
{
|
||||
_scale9Image->visit(renderer, _modelViewTransform, flags);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ namespace ui {
|
|||
*/
|
||||
static Scale9Sprite* create(const std::string& file, const Rect& rect, const Rect& capInsets);
|
||||
|
||||
|
||||
/**
|
||||
* Creates a 9-slice sprite with a texture file. The whole texture will be
|
||||
* broken down into a 3×3 grid of equal blocks.
|
||||
|
@ -234,7 +233,7 @@ namespace ui {
|
|||
virtual bool init();
|
||||
virtual bool init(Sprite* sprite, const Rect& rect, bool rotated, const Rect& capInsets);
|
||||
virtual bool init(Sprite* sprite, const Rect& rect, const Rect& capInsets);
|
||||
virtual bool init(Sprite* sprite, const Rect& rect, bool rotated, const Vec2 &offset, const Size &origianlSize, const Rect& capInsets);
|
||||
virtual bool init(Sprite* sprite, const Rect& rect, bool rotated, const Vec2 &offset, const Size &originalSize, const Rect& capInsets);
|
||||
CC_DEPRECATED_ATTRIBUTE virtual bool initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, bool rotated, const Rect& capInsets);
|
||||
CC_DEPRECATED_ATTRIBUTE virtual bool initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, const Rect& capInsets);
|
||||
|
||||
|
|
Loading…
Reference in New Issue