//
// ColorSelectLiveOverlay::onSelectTab from 0x100569e90 to 0x100569fb5 (293 bytes)
//
// 1 xrefs:
// > ColorSelectLiveOverlay::init @ 0x1005695d2
//
// 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 v3; // eax
__int64 v4; // rax
unsigned int v5; // r15d
ButtonSprite *v6; // r12
int v7; // r13d
const char *v8; // rsi
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
if ( a1->m_detailColorSelected != (v3 != 1) )
{
a1->m_detailColorSelected = v3 != 1;
v4 = *((_QWORD *)&a1->m_baseColorAction + (v3 != 1));
a1->m_opacity = *(float *)(v4 + 96);
ColorSelectLiveOverlay::selectColor(
a1,
(cocos2d::ccColor3B)(*(unsigned __int16 *)(v4 + 72) | (*(unsigned __int8 *)(v4 + 74) << 16)));
if ( (unsigned int)sub_100720070(a1->m_12buttons) )
{
v5 = 0;
do
{
v6 = (ButtonSprite *)sub_1007200C0(a1->m_12buttons, v5);
v7 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
v8 = "GJ_button_04.png";
if ( v7 == ((unsigned int (__fastcall *)(ButtonSprite *))v6->getTag)(v6) )
v8 = "GJ_button_01.png";
ButtonSprite::updateBGImage(v6, v8);
++v5;
}
while ( v5 < (unsigned int)sub_100720070(a1->m_12buttons) );
}
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_oldColorSprite->setColor)(
a1->m_oldColorSprite,
&a1->m_mainColor + a1->m_detailColorSelected);
ColorSelectLiveOverlay::updateColorLabel(a1);
}
}