//
// SetupSequenceTriggerPopup::onDeleteSelected from 0x140444ec0 to 0x140444f69 (169 bytes)
//
// 2 xrefs:
// > SetupSequenceTriggerPopup::init @ 0x140443b73
// > ??> @ 0x1406da55c
//
// 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 SetupSequenceTriggerPopup::onDeleteSelected(SetupSequenceTriggerPopup *a1, cocos2d::CCObject *a2)
{
CCMenuItemSpriteExtra *m_selectedButton; // rcx
int v4; // eax
EffectGameObject *m_gameObject; // rdi
EffectGameObject_vtbl *v6; // rax
m_selectedButton = a1->m_selectedButton;
if ( m_selectedButton )
{
v4 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCObject *))m_selectedButton->getTag)(
m_selectedButton,
a2);
m_gameObject = a1->m_gameObject;
LODWORD(m_selectedButton) = v4;
if ( v4 < 0 )
goto LABEL_8;
}
else
{
m_gameObject = a1->m_gameObject;
}
v6 = m_gameObject[1].EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( (unsigned int)m_selectedButton <= (unsigned __int64)(((__int64)(*(_QWORD *)&m_gameObject[1].m_uID - (_QWORD)v6) >> 4)
- 1)
&& v6 != *(EffectGameObject_vtbl **)&m_gameObject[1].m_uID )
{
memmove(
(char *)v6 + 16 * (unsigned int)m_selectedButton,
&v6->isEqual + 2 * (unsigned int)m_selectedButton,
*(_QWORD *)&m_gameObject[1].m_uID - (_QWORD)(&v6->isEqual + 2 * (unsigned int)m_selectedButton));
*(_QWORD *)&m_gameObject[1].m_uID -= 16LL;
m_gameObject[1].m_sInverse.b = NAN;
}
LABEL_8:
a1->m_selectedButton = nullptr;
SetupSequenceTriggerPopup::updateGroupIDButtons(a1);
}