//
// SetupPulsePopup::onSelectTargetMode from 0x1003b6108 to 0x1003b62cc (452 bytes)
//
// 2 xrefs:
// > SetupPulsePopup::init @ 0x1003b5bfc
// > SetupPulsePopup::init @ 0x1003b4024
//
// 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 __fastcall SetupPulsePopup::onSelectTargetMode(SetupPulsePopup *a1, cocos2d::CCObject *a2)
{
int v3; // w20
ButtonSprite *v4; // x0
const char *v5; // x23
const char *v6; // x10
const char *v7; // x1
const char *v8; // x21
ButtonSprite *v9; // x0
cocos2d::CCLabelBMFont *m_mainOnlyLabel; // x0
cocos2d::CCLabelBMFont *m_secondaryOnlyLabel; // x0
if ( a2 )
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
else
v3 = -1;
v4 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_channelButton->getNormalImage)(a1->m_channelButton);
if ( v3 == 1 )
v5 = "GJ_button_02.png";
else
v5 = "GJ_button_04.png";
v6 = "ID";
if ( v3 == 1 )
v6 = "Group ID";
if ( v3 )
v7 = "GJ_button_04.png";
else
v7 = "GJ_button_02.png";
if ( v3 )
v8 = v6;
else
v8 = "Channel ID";
ButtonSprite::updateBGImage(v4, v7);
v9 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_groupButton->getNormalImage)(a1->m_groupButton);
ButtonSprite::updateBGImage(v9, v5);
((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))a1->m_specialColorButton->setVisible)(
a1->m_specialColorButton,
v3 == 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))a1->m_specialColorButton->setEnabled)(
a1->m_specialColorButton,
v3 == 0);
((void (__fastcall *)(CCMenuItemToggler *, bool))a1->m_mainOnlyToggler->setVisible)(a1->m_mainOnlyToggler, v3 == 1);
((void (__fastcall *)(CCMenuItemToggler *, bool))a1->m_mainOnlyToggler->setEnabled)(a1->m_mainOnlyToggler, v3 == 1);
m_mainOnlyLabel = a1->m_mainOnlyLabel;
if ( m_mainOnlyLabel )
((void (__fastcall *)(cocos2d::CCLabelBMFont *, bool))m_mainOnlyLabel->setVisible)(m_mainOnlyLabel, v3 == 1);
((void (__fastcall *)(CCMenuItemToggler *, bool))a1->m_secondaryOnlyToggler->setVisible)(
a1->m_secondaryOnlyToggler,
v3 == 1);
((void (__fastcall *)(CCMenuItemToggler *, bool))a1->m_secondaryOnlyToggler->setEnabled)(
a1->m_secondaryOnlyToggler,
v3 == 1);
m_secondaryOnlyLabel = a1->m_secondaryOnlyLabel;
if ( m_secondaryOnlyLabel )
((void (__fastcall *)(cocos2d::CCLabelBMFont *, bool))m_secondaryOnlyLabel->setVisible)(
m_secondaryOnlyLabel,
v3 == 1);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_idLabel->setString)(a1->m_idLabel, v8);
a1->m_pulseTargetType = v3;
if ( !a1->m_modesInitializing )
{
a1->m_targetGroupID = 0;
SetupPulsePopup::updateTargetID(a1);
SetupPulsePopup::updateTextInputLabel(a1);
SetupPulsePopup::updatePulseTargetType(a1);
}
}