//
// SetupPulsePopup::onSelectTargetMode from 0x8ee4d0 to 0x8ee720 (592 bytes)
//
// 5 xrefs:
// > SetupPulsePopup::init @ 0x8f1448
// > ??> @ 0x354d8
// > SetupPulsePopup::init @ 0x8ef7a0
// > SetupPulsePopup::init @ 0x8ef810
// > ??> @ 0x12299d8
//
// 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::onSelectTargetMode(SetupPulsePopup *a1, cocos2d::CCObject *a2)
{
int v3; // w22
ButtonSprite *v4; // x0
_BOOL4 v5; // w20
_BOOL4 v6; // w23
char *v7; // x21
ButtonSprite *v8; // x0
cocos2d::CCLabelBMFont *m_mainOnlyLabel; // x0
cocos2d::CCLabelBMFont *m_secondaryOnlyLabel; // x0
ButtonSprite *v11; // x0
ButtonSprite *v12; // x1
ButtonSprite *v13; // x0
if ( !a2 )
{
v3 = -1;
v11 = (ButtonSprite *)a1->m_channelButton->getNormalImage(a1->m_channelButton);
ButtonSprite::updateBGImage(v11, "GJ_button_04.png");
v12 = (ButtonSprite *)a1->m_groupButton->getNormalImage(a1->m_groupButton);
LABEL_11:
v5 = 0;
v6 = 0;
ButtonSprite::updateBGImage(v12, "GJ_button_04.png");
v7 = "ID";
goto LABEL_4;
}
v3 = a2->getTag(a2);
v4 = (ButtonSprite *)a1->m_channelButton->getNormalImage(a1->m_channelButton);
if ( !v3 )
{
v5 = 0;
v6 = 1;
v7 = "Channel ID";
ButtonSprite::updateBGImage(v4, "GJ_button_02.png");
v8 = (ButtonSprite *)a1->m_groupButton->getNormalImage(a1->m_groupButton);
ButtonSprite::updateBGImage(v8, "GJ_button_04.png");
goto LABEL_4;
}
ButtonSprite::updateBGImage(v4, "GJ_button_04.png");
v13 = (ButtonSprite *)a1->m_groupButton->getNormalImage(a1->m_groupButton);
v12 = v13;
if ( v3 != 1 )
goto LABEL_11;
v5 = 1;
v6 = 0;
v7 = "Group ID";
ButtonSprite::updateBGImage(v13, "GJ_button_02.png");
LABEL_4:
a1->m_specialColorButton->setVisible(a1->m_specialColorButton, v6);
a1->m_specialColorButton->setEnabled(a1->m_specialColorButton, v6);
a1->m_mainOnlyToggler->setVisible(a1->m_mainOnlyToggler, v5);
a1->m_mainOnlyToggler->setEnabled(a1->m_mainOnlyToggler, v5);
m_mainOnlyLabel = a1->m_mainOnlyLabel;
if ( m_mainOnlyLabel )
m_mainOnlyLabel->setVisible(m_mainOnlyLabel, v5);
a1->m_secondaryOnlyToggler->setVisible(a1->m_secondaryOnlyToggler, v5);
a1->m_secondaryOnlyToggler->setEnabled(a1->m_secondaryOnlyToggler, v5);
m_secondaryOnlyLabel = a1->m_secondaryOnlyLabel;
if ( m_secondaryOnlyLabel )
m_secondaryOnlyLabel->setVisible(m_secondaryOnlyLabel, v5);
a1->m_idLabel->setString(a1->m_idLabel, (const unsigned __int8 *)v7);
a1->m_pulseTargetType = v3;
if ( !a1->m_modesInitializing )
{
a1->m_targetGroupID = 0;
SetupPulsePopup::updateTargetID(a1);
SetupPulsePopup::updateTextInputLabel(a1);
SetupPulsePopup::updatePulseTargetType(a1);
}
}