//
// ColorSelectLiveOverlay::onSelectTab from 0x14008d130 to 0x14008d26e (318 bytes)
//
// 5 xrefs:
// > ColorSelectLiveOverlay::init @ 0x14008cbbf
// > ColorSelectLiveOverlay::init @ 0x14008cc9a
// > ??> @ 0x140669014
// > ??> @ 0x140669050
// > ??> @ 0x1406c6e34
//
// 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 ColorSelectLiveOverlay::onSelectTab(ColorSelectLiveOverlay *a1, cocos2d::CCObject *a2)
{
int v4; // eax
ColorAction *m_baseColorAction; // rcx
unsigned int i; // ebp
ButtonSprite *v7; // rdi
int v8; // ebx
int v9; // eax
const char *v10; // rdx
__int64 v11; // rdx
cocos2d::ccColor3B m_fromColor; // [rsp+40h] [rbp+8h] BYREF
v4 = a2->getTag(a2);
if ( a1->m_detailColorSelected != (v4 != 1) )
{
a1->m_detailColorSelected = v4 != 1;
if ( v4 == 1 )
m_baseColorAction = a1->m_baseColorAction;
else
m_baseColorAction = a1->m_detailColorAction;
a1->m_opacity = m_baseColorAction->m_fromOpacity;
m_fromColor = m_baseColorAction->m_fromColor;
ColorSelectLiveOverlay::selectColor(a1, &m_fromColor);
for ( i = 0; i < cocos2d::CCArray::count(a1->m_12buttons); ++i )
{
v7 = (ButtonSprite *)cocos2d::CCArray::objectAtIndex(a1->m_12buttons, i);
v8 = a2->getTag(a2);
v9 = v7->getTag(v7);
v10 = "GJ_button_04.png";
if ( v8 == v9 )
v10 = "GJ_button_01.png";
ButtonSprite::updateBGImage(v7, v10);
}
v11 = 675;
if ( !a1->m_detailColorSelected )
v11 = 672;
a1->m_oldColorSprite->setColor(
&a1->m_oldColorSprite->cocos2d::CCRGBAProtocol,
(const cocos2d::ccColor3B *)((char *)a1 + v11));
ColorSelectLiveOverlay::updateColorLabel(a1);
}
}