mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-19 19:14:42 -05:00
make the top offset actually be applied
This commit is contained in:
parent
f781a33239
commit
af420ffbf7
1 changed files with 3 additions and 0 deletions
|
@ -204,6 +204,9 @@ CCSize BasedButtonSprite::getMaxTopSize() const {
|
||||||
|
|
||||||
void BasedButtonSprite::setTopOffset(CCPoint const& offset) {
|
void BasedButtonSprite::setTopOffset(CCPoint const& offset) {
|
||||||
m_topOffset = offset;
|
m_topOffset = offset;
|
||||||
|
if (m_onTop) {
|
||||||
|
m_onTop->setPosition(this->getContentSize() / 2 + offset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BasedButtonSprite::initWithSprite(
|
bool BasedButtonSprite::initWithSprite(
|
||||||
|
|
Loading…
Reference in a new issue