//
// CustomSongWidget::updateError from 0x744408 to 0x744560 (344 bytes)
//
// 3 xrefs:
// > CustomSongWidget::downloadSongFailed @ 0x748588
// > CustomSongWidget::loadSongInfoFailed @ 0x749680
// > ??> @ 0x4cc98
//
// 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 CustomSongWidget::updateError(CustomSongWidget *a1, GJSongError a2)
{
cocos2d::CCLabelBMFont *m_errorLabel; // x0
void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x2
_BYTE v6[8]; // [xsp+30h] [xbp+30h] BYREF
m_errorLabel = a1->m_errorLabel;
setColor = m_errorLabel->setColor;
v6[0] = -1;
v6[1] = 50;
v6[2] = 25;
setColor(m_errorLabel, (const cocos2d::ccColor3B *)v6);
switch ( a2 )
{
case NotAllowed:
a1->m_errorLabel->setString(a1->m_errorLabel, "Song is not allowed for use.");
break;
case DownloadCancelled:
a1->m_errorLabel->setString(a1->m_errorLabel, "Download canceled.");
break;
case FailedToFetch:
a1->m_errorLabel->setString(a1->m_errorLabel, "Failed to fetch song info.");
if ( !a1->m_isMusicLibrary )
goto LABEL_6;
LABEL_9:
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_errorLabel, 140.0, 0.35, 0.0);
goto LABEL_7;
default:
a1->m_errorLabel->setString(a1->m_errorLabel, "Download failed. Please try later.");
break;
}
if ( a1->m_isMusicLibrary )
goto LABEL_9;
LABEL_6:
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_errorLabel, 230.0, 0.4, 0.0);
LABEL_7:
CustomSongWidget::showError(a1, 0);
}