//
// ColorSelectLiveOverlay::onSelectTab from 0x1000f62a4 to 0x1000f63f0 (332 bytes)
//
// 1 xrefs:
// > ColorSelectLiveOverlay::init @ 0x1000f5bec
//
// 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 ColorSelectLiveOverlay::onSelectTab(ColorSelectLiveOverlay *a1, cocos2d::CCObject *a2)
{
int v4; // w0
_BOOL4 v5; // w8
__int64 v6; // x9
__int64 v7; // x9
__int64 v8; // x21
ButtonSprite *v9; // x22
int v10; // w23
const char *v11; // x1
__int64 v12; // x8
v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
v5 = v4 != 1;
if ( a1->m_detailColorSelected != v5 )
{
v6 = 656;
if ( v4 != 1 )
v6 = 664;
v7 = *(__int64 *)((char *)&a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ v6);
a1->m_detailColorSelected = v5;
a1->m_opacity = *(float *)(v7 + 96);
ColorSelectLiveOverlay::selectColor(
a1,
(cocos2d::ccColor3B)(*(unsigned __int16 *)(v7 + 72) | (*(unsigned __int8 *)(v7 + 74) << 16)));
if ( (unsigned int)sub_10024A36C(a1->m_12buttons) )
{
v8 = 0;
do
{
v9 = (ButtonSprite *)sub_10024A388(a1->m_12buttons, v8);
v10 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
if ( v10 == ((unsigned int (__fastcall *)(ButtonSprite *))v9->getTag)(v9) )
v11 = "GJ_button_01.png";
else
v11 = "GJ_button_04.png";
ButtonSprite::updateBGImage(v9, v11);
v8 = (unsigned int)(v8 + 1);
}
while ( (unsigned int)v8 < (unsigned int)sub_10024A36C(a1->m_12buttons) );
}
v12 = 672;
if ( a1->m_detailColorSelected )
v12 = 675;
((void (__fastcall *)(cocos2d::CCSprite *, char *))a1->m_oldColorSprite->setColor)(
a1->m_oldColorSprite,
(char *)a1 + v12);
ColorSelectLiveOverlay::updateColorLabel(a1);
}
}