//
// CustomSFXWidget::onDownload from 0x1002f0938 to 0x1002f09ec (180 bytes)
//
// 2 xrefs:
// > CustomSFXWidget::FLAlert_Clicked @ 0x1002f1848
// > CustomSFXWidget::init @ 0x1002f00f4
//
// 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 __fastcall CustomSFXWidget::onDownload(CustomSFXWidget *a1, cocos2d::CCObject *a2)
{
GameManager *v3; // x0
MusicDownloadManager *v4; // x0
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_errorLabel->setVisible)(a1->m_errorLabel, 0);
if ( a1->m_sfxObject )
{
v3 = GameManager::sharedState();
if ( GameManager::getGameVariable(v3, "0016") )
{
CustomSFXWidget::showLoadingArt(a1);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_downloadButton->setVisible)(a1->m_downloadButton, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_cancelButton->setVisible)(a1->m_cancelButton, 1);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_deleteButton->setVisible)(a1->m_deleteButton, 0);
CustomSFXWidget::startDownload(a1);
}
else
{
v4 = MusicDownloadManager::sharedState();
MusicDownloadManager::showTOS(v4, &a1->FLAlertLayerProtocol);
}
}
}