//
// SetupPulsePopup::onUpdateCustomColor from 0x14043c320 to 0x14043c3b0 (144 bytes)
//
// 3 xrefs:
// > SetupPulsePopup::init @ 0x140438d27
// > SetupPulsePopup::init @ 0x140438dc1
// > ??> @ 0x1406da0a0
//
// 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::onUpdateCustomColor(SetupPulsePopup *a1, cocos2d::CCObject *a2)
{
int v2; // edi
int v3; // esi
int v5; // eax
int m_targetGroupID; // ecx
int v7; // edx
int v8; // ecx
v2 = 0;
v3 = 999;
if ( a1->m_targetGroupID > 999 && a1->m_pulseTargetType != 1 )
a1->m_targetGroupID = 0;
v5 = a2->getTag(a2);
m_targetGroupID = a1->m_targetGroupID;
v7 = m_targetGroupID + 1;
v8 = m_targetGroupID - 1;
if ( v5 != 1 )
v8 = v7;
if ( a1->m_pulseTargetType == 1 )
v3 = 9999;
if ( v8 >= 0 )
v2 = v8;
if ( v3 < v2 )
v2 = v3;
a1->m_targetGroupID = v2;
SetupPulsePopup::updateTargetID(a1);
SetupTriggerPopup::updateEditorLabel(a1);
SetupPulsePopup::updateTextInputLabel(a1);
}