//
// SetupTriggerPopup::createPlusButton from 0x140477310 to 0x1404774a3 (403 bytes)
//
// 9 xrefs:
// > SetupObjectOptions2Popup::init @ 0x140400df9
// > SetupGradientPopup::init @ 0x1404215c7
// > SetupInteractObjectPopup::init @ 0x140423f57
// > SetupPickupTriggerPopup::init @ 0x140436ea5
// > SetupRotateGameplayPopup::init @ 0x140441cf0
// > SetupSFXPopup::init @ 0x140447aa0
// > SetupSFXPopup::init @ 0x140447f81
// > SetupSFXPopup::init @ 0x140447ff7
// > ??> @ 0x1406db714
//
// 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
//
// Hidden C++ exception states: #wind=1
CCMenuItemSpriteExtra *__fastcall SetupTriggerPopup::createPlusButton(
SetupTriggerPopup *a1,
int a2,
struct cocos2d::CCPoint a3,
__int64 a4,
void **a5,
unsigned int a6,
int a7)
{
__int64 v9; // rcx
struct cocos2d::CCObject *v10; // rax
cocos2d::CCArray *v11; // r12
cocos2d::CCArray *GroupContainer; // rbp
const char *v13; // rcx
struct cocos2d::CCSprite *v14; // rbx
CCMenuItemSpriteExtra *v15; // r14
CCMenuItemSpriteExtra_vtbl *v16; // rbx
struct cocos2d::CCPoint v17; // rax
struct cocos2d::CCPoint v19[2]; // [rsp+20h] [rbp-78h] BYREF
v19[0] = a3;
v19[1] = (struct cocos2d::CCPoint)a5;
while ( cocos2d::CCArray::count(a1->m_pageContainers) <= a6 )
{
v10 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v9);
cocos2d::CCArray::addObject(a1->m_pageContainers, v10);
}
v11 = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(a1->m_pageContainers, a6);
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, a7);
if ( !a5[2] )
sub_14003CCE0(a5, "GJ_plus2Btn_001.png", 0x13u);
v13 = (const char *)a5;
if ( (unsigned __int64)a5[3] > 0xF )
v13 = (const char *)*a5;
v14 = cocos2d::CCSprite::createWithSpriteFrameName(v13);
((void (__fastcall *)(struct cocos2d::CCSprite *))v14->setScale_0)(v14);
v15 = CCMenuItemSpriteExtra::create(v14, nullptr, a1, (cocos2d::SEL_MenuHandler *)sub_140257644);
v15->setTag(v15, a2);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v15);
v16 = v15->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v17 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, v19);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v16->setPosition_0)(v15, v17);
cocos2d::CCArray::addObject(v11, v15);
if ( a7 > 0 )
cocos2d::CCArray::addObject(GroupContainer, v15);
sub_14003A830((__int64)a5);
return v15;
}