//
// SetupPulsePopup::onSelectPulseMode from 0x4bdffc to 0x4be10e (274 bytes)
//
// 1 xrefs:
// > SetupPulsePopup::init @ 0x4c0636
//
// 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 SetupPulsePopup::onSelectPulseMode(SetupPulsePopup *a1, cocos2d::CCObject *a2)
{
int v3; // r5
ButtonSprite *v4; // r0
const char *v5; // r1
ButtonSprite *v6; // r0
const char *v7; // r1
unsigned int i; // r6
int v9; // r0
unsigned int j; // r6
int v11; // r0
_BOOL4 v12; // r6
_BOOL4 m_modesInitializing; // r3
if ( a2 )
v3 = a2->getTag(a2);
else
v3 = -1;
v4 = (ButtonSprite *)a1->m_colorButton->getNormalImage(a1->m_colorButton);
if ( v3 )
v5 = "GJ_button_04.png";
else
v5 = "GJ_button_02.png";
ButtonSprite::updateBGImage(v4, v5);
v6 = (ButtonSprite *)a1->m_hsvButton->getNormalImage(a1->m_hsvButton);
if ( v3 == 1 )
v7 = "GJ_button_02.png";
else
v7 = "GJ_button_04.png";
ButtonSprite::updateBGImage(v6, v7);
for ( i = 0; i < cocos2d::CCArray::count(a1->m_colorObjects); ++i )
{
v9 = cocos2d::CCArray::objectAtIndex(a1->m_colorObjects, i);
(*(void (__fastcall **)(int, bool))(*(_DWORD *)v9 + 164))(v9, v3 == 0);
}
for ( j = 0; j < cocos2d::CCArray::count(a1->m_hsvObjects); ++j )
{
v11 = cocos2d::CCArray::objectAtIndex(a1->m_hsvObjects, j);
(*(void (__fastcall **)(int, bool))(*(_DWORD *)v11 + 164))(v11, v3 == 1);
}
v12 = v3 == 0;
a1->m_colorIDInput->setTouchEnabled(a1->m_colorIDInput, v3 == 1);
a1->m_rInput->setTouchEnabled(a1->m_rInput, v12);
a1->m_gInput->setTouchEnabled(a1->m_gInput, v12);
a1->m_bInput->setTouchEnabled(a1->m_bInput, v12);
a1->m_hexInput->setTouchEnabled(a1->m_hexInput, v12);
m_modesInitializing = a1->m_modesInitializing;
a1->m_pulseMode = v3;
if ( !m_modesInitializing )
SetupPulsePopup::updatePulseMode(a1);
}