//
// ButtonSprite::updateBGImage from 0x56fcc0 to 0x56fdf0 (304 bytes)
//
// 102 xrefs:
// > GJMessageCell::onDeleteMessage @ 0x60aefc
// > GJUserCell::onCancelFriendRequest @ 0x60b06c
// > GJRequestCell::onDeleteRequest @ 0x60b1d8
// > GJUserCell::onUnblockUser @ 0x60c334
// > GJUserCell::onRemoveFriend @ 0x60c7e8
// > EditorUI::toggleSwipe @ 0x685f94
// > EditorUI::toggleSwipe @ 0x685fbc
// > EditorUI::toggleFreeMove @ 0x68601c
// > EditorUI::toggleFreeMove @ 0x686044
// > EditorUI::toggleSnap @ 0x6860cc
// > EditorUI::toggleSnap @ 0x6860e4
// > EditorUI::updateDeleteButtons @ 0x68877c
// > EditorUI::updateDeleteButtons @ 0x6887b4
// > EditorUI::updateDeleteButtons @ 0x6887d0
// > EditorUI::updateDeleteButtons @ 0x6887ec
// > EditorUI::updateDeleteButtons @ 0x688810
// > EditorUI::updateDeleteButtons @ 0x688b40
// > EditorUI::updateDeleteButtons @ 0x688b6c
// > EditorUI::updateDeleteButtons @ 0x688b9c
// > EditorUI::toggleEnableRotate @ 0x6b5910
// > EditorUI::toggleEnableRotate @ 0x6b5930
// > MoreSearchLayer::onSongMode @ 0x6d377c
// > MoreSearchLayer::onSongMode @ 0x6d379c
// > MoreSearchLayer::onSongMode @ 0x6d37fc
// > LevelInfoLayer::confirmOwnerDelete @ 0x6d6bd4
// > ShareLevelLayer::selectRating @ 0x6e3530
// > LevelBrowserLayer::onDeleteSelected @ 0x6e7bb4
// > InfoLayer::updateCommentModeButtons @ 0x7e3bf4
// > InfoLayer::updateCommentModeButtons @ 0x7e3c14
// > InfoLayer::updateCommentModeButtons @ 0x7e3c60
// > InfoLayer::updateCommentModeButtons @ 0x7e3c80
// > InfoLayer::init @ 0x7e5274
// > InfoLayer::init @ 0x7e52f0
// > InfoLayer::init @ 0x7e55fc
// > LeaderboardsLayer::toggleTabButtons @ 0x81e884
// > GJRateLevelLayer::selectRating @ 0x8202e8
// > GJRateLevelLayer::onCustomButton @ 0x820b40
// > RateStarsLayer::selectRating @ 0x8243f4
// > SongSelectNode::onSongMode @ 0x83ec98
// > SongSelectNode::onSongMode @ 0x83ecc0
// > SongSelectNode::onSongMode @ 0x83ed88
// > CustomizeObjectLayer::highlightSelected @ 0x8416c4
// > CustomizeObjectLayer::highlightSelected @ 0x8416f0
// > CustomizeObjectLayer::onSelectMode @ 0x841b7c
// > CustomizeObjectLayer::onSelectMode @ 0x841ba8
// > CustomizeObjectLayer::onSelectMode @ 0x841bd4
// > AccountHelpLayer::onUnlink @ 0x84a734
// > AccountLayer::onBackup @ 0x84abd0
// > AccountHelpLayer::verifyUnlink @ 0x84ccc8
// > GJMessagePopup::onRemove @ 0x8c4f4c
// > GJWriteMessagePopup::onClearBody @ 0x8c50a8
// > GJMessagePopup::onBlock @ 0x8c56c8
// > FriendRequestPopup::onBlock @ 0x8c5ad0
// > GJSpecialColorSelect::highlightSelected @ 0x8e68b0
// > GJSpecialColorSelect::highlightSelected @ 0x8e68ec
// > SetupPulsePopup::onSelectPulseMode @ 0x8ee088
// > SetupPulsePopup::onSelectPulseMode @ 0x8ee0ac
// > SetupPulsePopup::onSelectPulseMode @ 0x8ee1f8
// > SetupPulsePopup::onSelectPulseMode @ 0x8ee224
// > SetupPulsePopup::onSelectTargetMode @ 0x8ee530
// > SetupPulsePopup::onSelectTargetMode @ 0x8ee550
// > SetupPulsePopup::onSelectTargetMode @ 0x8ee698
// > SetupPulsePopup::onSelectTargetMode @ 0x8ee6c8
// > SetupPulsePopup::onSelectTargetMode @ 0x8ee6dc
// > SetupPulsePopup::onSelectTargetMode @ 0x8ee718
// > MessagesProfilePage::onDeleteSelected @ 0x8f2588
// > FRequestProfilePage::onDeleteSelected @ 0x8f4a80
// > ProfilePage::onFriend @ 0x8fd300
// > ProfilePage::onBlockUser @ 0x8fd648
// > ColorSelectLiveOverlay::onSelectTab @ 0x90c354
// > FollowRewardPage::onSpecialItem @ 0x965120
// > SetGroupIDLayer::updateZLayerButtons @ 0x977478
// > CreateParticlePopup::onMode @ 0x9c0680
// > CreateParticlePopup::onMode @ 0x9c06ac
// > CreateParticlePopup::onMode @ 0x9c06e0
// > CreateParticlePopup::onMode @ 0x9c070c
// > CreateParticlePopup::onPage @ 0x9c4da0
// > MPLobbyLayer::onBtn1 @ 0x9ca380
// > SetupGradientPopup::updateZLayerButtons @ 0x9fa16c
// > SetupGradientPopup::updateZLayerButtons @ 0x9fa1a0
// > SetupShaderEffectPopup::updateZLayerButtons @ 0x9fc384
// > SetupShaderEffectPopup::updateZLayerButtons @ 0x9fc3bc
// > SetupShaderEffectPopup::updateZLayerButtons @ 0x9fc3d0
// > SetupAreaMoveTriggerPopup::onMode @ 0xa09c28
// > SetupAreaMoveTriggerPopup::onMode @ 0xa09c70
// > HSVLiveOverlay::createHSVWidget @ 0xa23bf4
// > CharacterColorPage::updateColorMode @ 0xa24a84
// > CharacterColorPage::updateColorMode @ 0xa24b88
// > SelectArtLayer::onSelectCustom @ 0xa3436c
// > SelectArtLayer::onSelectCustom @ 0xa3439c
// > LevelSettingsLayer::updateGameplayModeButtons @ 0xa3522c
// > LevelSettingsLayer::updateGameplayModeButtons @ 0xa35260
// > LevelSettingsLayer::updateGameplayModeButtons @ 0xa35270
// > LevelSettingsLayer::updateGameplayModeButtons @ 0xa352a4
// > SetupAudioTriggerPopup::onProxMode @ 0xa3d96c
// > SetupSequenceTriggerPopup::onSelect @ 0xa585f8
// > SetupSequenceTriggerPopup::onSelect @ 0xa5862c
// > MusicBrowser::setupList @ 0xa5b200
// > MusicBrowser::setupList @ 0xa5b22c
// > MusicBrowser::setupList @ 0xa5b284
// > MusicBrowser::setupList @ 0xa5b294
// > ??> @ 0x41208
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void ButtonSprite::updateBGImage(ButtonSprite *a1, const char *a2)
{
cocos2d::extension::CCScale9Sprite *m_BGSprite; // x0
cocos2d::extension::CCScale9Sprite *v4; // x22
void (__fastcall *setContentSize)(cocos2d::extension::CCScale9Sprite *__hidden, const cocos2d::CCSize *); // x23
cocos2d::CCSprite *m_subBGSprite; // x19
void (__fastcall *setTexture)(cocos2d::CCSprite *__hidden, cocos2d::CCTexture2D *); // x21
cocos2d::CCTextureCache *v8; // x0
cocos2d::CCTexture2D *v9; // x0
cocos2d::CCRect v11; // [xsp+58h] [xbp+58h] BYREF
cocos2d::CCRect v12; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
m_BGSprite = a1->m_BGSprite;
if ( m_BGSprite )
{
m_BGSprite->removeMeAndCleanup(m_BGSprite);
cocos2d::CCRect::CCRect(&v11, 0.0, 0.0, 40.0, 40.0);
v4 = (cocos2d::extension::CCScale9Sprite *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)a2,
(const char *)&v11,
v12);
a1->m_BGSprite = v4;
setContentSize = v4->setContentSize;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v11, 16.0, 16.0);
setContentSize(v4, (const cocos2d::CCSize *)&v11);
a1->addChild_0(a1, a1->m_BGSprite, 0);
if ( a1->m_mode == 1 )
ButtonSprite::setString(a1, (const char *)a1->m_caption.m_data.m_data);
else
ButtonSprite::updateSpriteBGSize(a1);
}
else
{
m_subBGSprite = a1->m_subBGSprite;
if ( m_subBGSprite )
{
setTexture = m_subBGSprite->setTexture;
v8 = cocos2d::CCTextureCache::sharedTextureCache();
v9 = cocos2d::CCTextureCache::addImage(v8, a2, 0);
setTexture(m_subBGSprite, v9);
}
}
}