//
// SetupTriggerPopup::addCloseButton from 0x10012ef14 to 0x10012ef90 (124 bytes)
//
// 68 xrefs:
// > SetupTeleportPopup::init @ 0x10000b3ec
// > SetupTimerTriggerPopup::init @ 0x10002d438
// > SetupTimerEventTriggerPopup::init @ 0x10002dbbc
// > SetupTimerControlTriggerPopup::init @ 0x10002e094
// > SetupAreaMoveTriggerPopup::init @ 0x100034228
// > SetupAreaTransformTriggerPopup::init @ 0x100036540
// > SetupAreaRotateTriggerPopup::init @ 0x100036d40
// > SetupAreaFadeTriggerPopup::init @ 0x100037418
// > SetupAreaTintTriggerPopup::init @ 0x100037a88
// > SetupAreaTriggerPopup::init @ 0x100038814
// > SetupAreaAnimTriggerPopup::init @ 0x100038db8
// > SetupObjectOptions2Popup::init @ 0x10004173c
// > SetupPickupTriggerPopup::init @ 0x1000433d0
// > SetupCameraRotatePopup2::init @ 0x10004c384
// > CustomizeObjectSettingsPopup::init @ 0x100050d2c
// > SetupAdvFollowPopup::init @ 0x10005fe24
// > SetupAdvFollowEditPhysicsPopup::init @ 0x10006392c
// > SetupAdvFollowRetargetPopup::init @ 0x1000644e0
// > SetupSpawnPopup::init @ 0x1000f7b58
// > SetupReverbPopup::init @ 0x10017f3cc
// > SetupSFXPopup::init @ 0x10017fb60
// > SetupSFXEditPopup::init @ 0x1001812b4
// > SetupShaderEffectPopup::init @ 0x100181df8
// > SetupRotateGameplayPopup::init @ 0x10019e788
// > SetupGameplayOffsetPopup::init @ 0x10019f108
// > SetupObjectTogglePopup::init @ 0x1001a2f18
// > SetupKeyframeAnimPopup::init @ 0x1001b3eb4
// > SetupKeyframePopup::init @ 0x1001b486c
// > SetupZoomTriggerPopup::init @ 0x1001b84c4
// > SetupSongTriggerPopup::init @ 0x1001c29e4
// > SetupStaticCameraPopup::init @ 0x1001d0bb4
// > SetTargetIDLayer::init @ 0x100213460
// > SetupInstantCollisionTriggerPopup::init @ 0x100230ca8
// > SetupCollisionStateTriggerPopup::init @ 0x1002315f0
// > SetupTransformPopup::init @ 0x100231a20
// > SetupRotatePopup::init @ 0x100268528
// > SetupMoveCommandPopup::init @ 0x100273990
// > SetupPlatformerEndPopup::init @ 0x1002adf10
// > SetupEnterTriggerPopup::init @ 0x1002d2960
// > EditGameObjectPopup::init @ 0x1002dd90c
// > UISaveLoadLayer::init @ 0x1002e4864
// > SetupAnimSettingsPopup::init @ 0x1002e7728
// > SetupBGSpeedTrigger::init @ 0x1002f3628
// > SetupEnterEffectPopup::init @ 0x1003ff4c8
// > SetupRotateCommandPopup::init @ 0x100405f1c
// > SetupEventLinkPopup::init @ 0x100406ffc
// > SelectEventLayer::init @ 0x1004076d8
// > SetupPlayerControlPopup::init @ 0x100409530
// > SetupSpawnParticlePopup::init @ 0x100409ab4
// > SetupCheckpointPopup::init @ 0x10040a43c
// > MultiTriggerPopup::init @ 0x10040a8f4
// > UIObjectSettingsPopup::init @ 0x10040abd0
// > SetupResetTriggerPopup::init @ 0x10040b6b8
// > SetupItemEditTriggerPopup::init @ 0x10040ba08
// > SetupItemCompareTriggerPopup::init @ 0x10040d7e8
// > SetupCoinLayer::init @ 0x10040f240
// > SetupPersistentItemTriggerPopup::init @ 0x10040f5f0
// > SetupAudioLineGuidePopup::init @ 0x10040fb28
// > SetupCameraGuidePopup::init @ 0x1004102c4
// > SetupForceBlockPopup::init @ 0x1004107c0
// > SetupArtSwitchPopup::init @ 0x100410f50
// > SetupStopTriggerPopup::init @ 0x10041154c
// > SetupObjectControlPopup::init @ 0x100411c1c
// > SetupDashRingPopup::init @ 0x100411f4c
// > SetupInteractObjectPopup::init @ 0x100412a58
// > SetupOptionsTriggerPopup::init @ 0x100413700
// > SetItemIDLayer::init @ 0x100419d3c
// > SetupGravityTriggerPopup::init @ 0x10042190c
//
// 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
//
__int64 __fastcall SetupTriggerPopup::addCloseButton(__int64 a1, const char *a2)
{
ButtonSprite *v3; // x0
CCMenuItemSpriteExtra *v4; // x1
cocos2d::SEL_MenuHandler v6; // 0:x3.16
if ( a2[23] < 0 )
a2 = *(const char **)a2;
v3 = ButtonSprite::create_1(a2, 40, 0, 0.8, 1, "goldFont.fnt", "GJ_button_01.png", 30.0);
v6.ptr = (void (__cdecl *)(cocos2d::CCObject *))1320;
v6.adj = 1;
v4 = CCMenuItemSpriteExtra::create(v3, nullptr, (cocos2d::CCObject *)a1, v6);
return (*(__int64 (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(a1 + 544) + 440LL))(
*(_QWORD *)(a1 + 544),
v4);
}