//
// ColorChannelSprite::updateCopyLabel from 0x8a3190 to 0x8a3360 (464 bytes)
//
// 3 xrefs:
// > ColorChannelSprite::updateValues @ 0x8a3654
// > ColorChannelSprite::updateValues @ 0x8a3708
// > ??> @ 0xc85b0
//
// 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 ColorChannelSprite::updateCopyLabel(ColorChannelSprite *a1, int a2, bool a3)
{
_BOOL4 v5; // w22
cocos2d::CCLabelBMFont *m_copyLabel; // x0
const unsigned __int8 *CString; // x0
const cocos2d::ccColor3B *v8; // x1
cocos2d::CCString *v9; // x0
cocos2d::CCLabelBMFont *v10; // x0
cocos2d::CCLabelBMFont *v11; // x24
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25
const cocos2d::CCSize *v13; // x0
float v14; // [xsp+50h] [xbp+50h]
cocos2d::CCPoint v15; // [xsp+70h] [xbp+70h] BYREF
v5 = a3;
m_copyLabel = a1->m_copyLabel;
if ( a2 )
{
if ( !m_copyLabel )
{
v10 = cocos2d::CCLabelBMFont::create();
a1->m_copyLabel = v10;
a1->addChild_0(a1, v10, 1);
v11 = a1->m_copyLabel;
setPosition = v11->setPosition;
v14 = a1->getContentSize(a1)->width * 0.5;
v13 = a1->getContentSize(a1);
cocos2d::CCPoint::CCPoint(&v15, v14, (float)(v13->height * 0.5) + 3.0);
setPosition(v11, &v15);
a1->m_copyLabel->setScale(a1->m_copyLabel, 0.5);
}
if ( a2 <= 999 )
{
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)a2);
CString = (const unsigned __int8 *)cocos2d::CCString::getCString(v9);
}
else
{
CString = (const unsigned __int8 *)GJSpecialColorSelect::textForColorIdx(a2);
}
a1->m_copyLabel->setString(a1->m_copyLabel, CString);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_copyLabel, 28.0, 0.5, 0.0);
a1->m_copyLabel->setVisible(a1->m_copyLabel, 1);
v8 = (const cocos2d::ccColor3B *)&unk_EEDDA8;
if ( !v5 )
v8 = (const cocos2d::ccColor3B *)&off_EEDDB0;
a1->m_copyLabel->setColor(a1->m_copyLabel, v8);
}
else if ( m_copyLabel )
{
m_copyLabel->setVisible(m_copyLabel, 0);
}
}