//
// GJColorSetupLayer::onColor from 0x8a1938 to 0x8a19c0 (136 bytes)
//
// 3 xrefs:
// > ??> @ 0x7e348
// > GJColorSetupLayer::init @ 0x8a1fb8
// > ??> @ 0x122c410
//
// 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 GJColorSetupLayer::onColor(GJColorSetupLayer *a1, cocos2d::CCObject *a2)
{
int v3; // w20
int v4; // w1
ColorSelectPopup *ColorAction; // x0
ColorAction *v6; // x1
__int64 v7; // x2
ColorAction *v8; // x3
__int64 v9; // x0
__int64 v10; // x2
v3 = a1->m_page * a1->m_colorsPerPage;
v4 = v3 + ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
if ( a1->m_closeOnSelect )
{
a1->m_colorID = v4;
GJColorSetupLayer::onClose(a1, nullptr);
}
else
{
ColorAction = (ColorSelectPopup *)GJEffectManager::getColorAction(a1->m_settingsObject->m_effectManager, v4);
v9 = ColorSelectPopup::create(ColorAction, v6, v7, v8);
v10 = *(_QWORD *)v9;
*(_QWORD *)(v9 + 1072) = &a1->ColorSelectDelegate;
*(_DWORD *)(v9 + 584) = 106;
(*(void (**)(void))(v10 + 1288))();
}
}