//
// SetupEventLinkPopup::init from 0xb726f4 to 0xb72bc8 (1236 bytes)
//
// 2 xrefs:
// > SetupEventLinkPopup::create @ 0xb72e04
// > ??> @ 0xc2bd8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:02:21 +0000
//
__int64 __fastcall SetupEventLinkPopup::init(cocos2d::CCNode **this, EventLinkTrigger *a2, cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w24
__int64 v7; // x2
__int64 v8; // x3
__int64 v9; // x4
__int64 v10; // x5
const char *v11; // x6
cocos2d::CCDirector *MultiTriggerItemsDefault; // x0
cocos2d::CCDirector *v13; // x0
const char *v14; // x1
__int64 v15; // x26
__int64 v16; // x26
cocos2d::CCNode *v17; // x27
void (__fastcall *v18)(__int64, __int64 *); // x20
__int64 v19; // [xsp+B0h] [xbp+80h] BYREF
_BYTE v20[8]; // [xsp+B8h] [xbp+88h] BYREF
_BYTE v21[8]; // [xsp+C0h] [xbp+90h] BYREF
__int64 v22; // [xsp+C8h] [xbp+98h] BYREF
__int64 v23; // [xsp+D0h] [xbp+A0h] BYREF
__int64 v24[2]; // [xsp+D8h] [xbp+A8h] BYREF
void *v25; // [xsp+E8h] [xbp+B8h]
__int64 v26; // [xsp+F0h] [xbp+C0h] BYREF
__int64 v27; // [xsp+F8h] [xbp+C8h]
void *v28; // [xsp+100h] [xbp+D0h]
v4 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 380.0, 280.0, 1u, 0.0);
v5 = v4;
if ( v4 )
{
SetupTriggerPopup::preSetup((SetupTriggerPopup *)this);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "Event Link", 0xAu);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v26);
if ( (v26 & 1) != 0 )
operator delete(v28);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "OK", 2u);
SetupTriggerPopup::addCloseButton((__int64)this, (__int64)&v26, v7, v8, v9, v10, v11);
if ( (v26 & 1) != 0 )
operator delete(v28);
v24[0] = 0;
v24[1] = 0;
v25 = nullptr;
std::string::__init(v24, "Help", 4u);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(
&v26,
"Activates Group ID upon a specified player action. Select one or multiple from the top right menu.\n"
"Extra ID makes the action only apply if the player interacts with a corresponding object, for example if M"
"aterial ID matches.\n"
"Extra ID2: 0 = All, 1 = P1, 2 = P2",
0x11Bu);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v24, (char *)&v26, 1.0);
if ( (v26 & 1) != 0 )
operator delete(v28);
if ( (v24[0] & 1) != 0 )
operator delete(v25);
MultiTriggerItemsDefault = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefault((SetupTriggerPopup *)this);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefault);
cocos2d::CCDirector::getWinSize(&v19, v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, *(float *)&v19 * 0.5, *((float *)&v19 + 1) * 0.5);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "Group ID:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, -80.0, 40.0);
cocos2d::CCPoint::operator+(&v23, v20);
IDNameInput::create(this, this + 68, 1, 51, &v26, &v23, 6, 0, 0.8, 0, 0);
if ( (v26 & 1) != 0 )
operator delete(v28);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "Extra ID:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, 80.0, 40.0);
cocos2d::CCPoint::operator+(&v23, v20);
SetupTriggerPopup::createValueControlAdvanced(
this,
447,
(char *)&v26,
(__int64)&v23,
1,
2,
10,
1,
0.8,
0.0,
9999.0,
0,
0,
0,
0,
0);
if ( (v26 & 1) != 0 )
operator delete(v28);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "Extra ID2:", 0xAu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, 80.0, -40.0);
cocos2d::CCPoint::operator+(&v23, v20);
SetupTriggerPopup::createValueControlAdvanced(
this,
525,
(char *)&v26,
(__int64)&v23,
1,
2,
10,
1,
0.8,
0.0,
9999.0,
0,
0,
0,
0,
0);
if ( (v26 & 1) != 0 )
operator delete(v28);
v15 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_menuBtn_001.png", v14);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL))(v15, 0.55);
v16 = CCMenuItemSpriteExtra::create(v15, 0, (__int64)this, (__int64)SetupEventLinkPopup::onSelectEvent, 0);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v16);
v17 = *(this + 69);
v18 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v16 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v21,
(float)(*((float *)this + 183) * 0.5) + -22.0,
(float)(*((float *)this + 184) * 0.5) + -22.0);
cocos2d::CCPoint::operator+(&v22, v20);
cocos2d::CCNode::convertToNodeSpace(&v23, v17, (const cocos2d::CCPoint *)&v22);
v18(v16, &v23);
SetupTriggerPopup::postSetup((SetupTriggerPopup *)this);
}
return v5;
}