//
// SetupTriggerPopup::addCloseButton from 0x5419a8 to 0x541a02 (90 bytes)
//
// 68 xrefs:
// > CustomizeObjectSettingsPopup::init @ 0x463e1c
// > SetupEnterTriggerPopup::init @ 0x4aab5e
// > EditGameObjectPopup::init @ 0x4af528
// > UISaveLoadLayer::init @ 0x4b341a
// > SetupMoveCommandPopup::init @ 0x4b8e2a
// > SetupObjectTogglePopup::init @ 0x4bb860
// > SetupSpawnPopup::init @ 0x4bc56a
// > SetupRotateCommandPopup::init @ 0x4e0d84
// > SetItemIDLayer::init @ 0x4f241e
// > SetTargetIDLayer::init @ 0x4f2b02
// > SetupAnimSettingsPopup::init @ 0x4f3c0a
// > SetupInstantCollisionTriggerPopup::init @ 0x4f53e0
// > SetupCollisionStateTriggerPopup::init @ 0x4f5a06
// > SetupInteractObjectPopup::init @ 0x4f6e9e
// > SetupPickupTriggerPopup::init @ 0x4f86ae
// > SetupRotatePopup::init @ 0x4f8e16
// > SetupStaticCameraPopup::init @ 0x503ef4
// > SetupZoomTriggerPopup::init @ 0x504616
// > SetupPlatformerEndPopup::init @ 0x5065c2
// > SetupObjectOptions2Popup::init @ 0x50cf5e
// > SetupTransformPopup::init @ 0x52462c
// > SetupSongTriggerPopup::init @ 0x525256
// > SetupCameraRotatePopup2::init @ 0x52760e
// > SetupOptionsTriggerPopup::init @ 0x54052e
// > SetupRotateGameplayPopup::init @ 0x5499ae
// > SetupGameplayOffsetPopup::init @ 0x549fae
// > SetupTeleportPopup::init @ 0x54a70e
// > SetupShaderEffectPopup::init @ 0x55719a
// > SetupAreaMoveTriggerPopup::init @ 0x558dd6
// > SetupAreaTransformTriggerPopup::init @ 0x5596ba
// > SetupAreaRotateTriggerPopup::init @ 0x559c0e
// > SetupAreaFadeTriggerPopup::init @ 0x55a0a6
// > SetupAreaTintTriggerPopup::init @ 0x55a608
// > SetupAreaTriggerPopup::init @ 0x55ac7a
// > SetupAreaAnimTriggerPopup::init @ 0x55b174
// > SetupEnterEffectPopup::init @ 0x55c78e
// > SetupAdvFollowPopup::init @ 0x55f460
// > SetupAdvFollowEditPhysicsPopup::init @ 0x561814
// > SetupAdvFollowRetargetPopup::init @ 0x561fd0
// > SetupBGSpeedTrigger::init @ 0x563a24
// > SetupGravityTriggerPopup::init @ 0x563e06
// > SetupKeyframeAnimPopup::init @ 0x5734fe
// > SetupKeyframePopup::init @ 0x573c1c
// > SetupReverbPopup::init @ 0x575c2a
// > SetupSFXPopup::init @ 0x57635e
// > SetupSFXEditPopup::init @ 0x576dec
// > SetupEventLinkPopup::init @ 0x5782ea
// > SetupPlayerControlPopup::init @ 0x57876e
// > SetupSpawnParticlePopup::init @ 0x578b1e
// > SetupCheckpointPopup::init @ 0x57919e
// > MultiTriggerPopup::init @ 0x5794fa
// > UIObjectSettingsPopup::init @ 0x57970a
// > SetupResetTriggerPopup::init @ 0x579e04
// > SetupItemEditTriggerPopup::init @ 0x57abf4
// > SetupItemCompareTriggerPopup::init @ 0x57be30
// > SetupCoinLayer::init @ 0x57ca48
// > SetupPersistentItemTriggerPopup::init @ 0x57cd06
// > SetupAudioLineGuidePopup::init @ 0x57d0a6
// > SetupCameraGuidePopup::init @ 0x57d57e
// > SetupForceBlockPopup::init @ 0x57d932
// > SetupArtSwitchPopup::init @ 0x57df80
// > SetupStopTriggerPopup::init @ 0x57e284
// > SetupObjectControlPopup::init @ 0x57e6a2
// > SetupDashRingPopup::init @ 0x57e8fa
// > SelectEventLayer::init @ 0x57f298
// > SetupTimerTriggerPopup::init @ 0x593c3a
// > SetupTimerEventTriggerPopup::init @ 0x594176
// > SetupTimerControlTriggerPopup::init @ 0x5944ea
//
// 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
//
int __fastcall SetupTriggerPopup::addCloseButton(unsigned int a1, ButtonSprite **a2)
{
ButtonSprite *v3; // r0
CCMenuItemSpriteExtra *v4; // r1
float v6; // [sp+10h] [bp-8h]
v3 = ButtonSprite::create(
*a2,
(const char *)&word_28,
0,
0.8,
1,
"goldFont.fnt",
"GJ_button_01.png",
(const char *)0x41F00000,
v6);
v4 = CCMenuItemSpriteExtra::create(v3, nullptr, (cocos2d::SEL_MenuHandler)(a1 | 0x29400000000LL));
return (*(int (__fastcall **)(_DWORD, CCMenuItemSpriteExtra *))(**(_DWORD **)(a1 + 440) + 220))(
*(_DWORD *)(a1 + 440),
v4);
}