make the top offset actually be applied

This commit is contained in:
HJfod 2024-02-23 00:02:48 +02:00
parent f781a33239
commit af420ffbf7

View file

@ -204,6 +204,9 @@ CCSize BasedButtonSprite::getMaxTopSize() const {
void BasedButtonSprite::setTopOffset(CCPoint const& offset) {
m_topOffset = offset;
if (m_onTop) {
m_onTop->setPosition(this->getContentSize() / 2 + offset);
}
}
bool BasedButtonSprite::initWithSprite(