//
// SetupTriggerPopup::addCloseButton from 0x14060bd40 to 0x14060be4c (268 bytes)
//
// 78 xrefs:
// > CollisionBlockPopup::init @ 0x1400a4e04
// > CustomizeObjectSettingsPopup::init @ 0x140144363
// > EasingSelectPopup::init @ 0x1401763de
// > EditorSFXSettingsPopup::init @ 0x14018d58e
// > GJFollowCommandLayer::init @ 0x14037ac7c
// > SetupMoveCommandPopup::init @ 0x14038e650
// > GJPFollowCommandLayer::init @ 0x140398764
// > SetupEnterTriggerPopup::init @ 0x14039a4a3
// > EditGameObjectPopup::init @ 0x1403a51cb
// > SetupRotateCommandPopup::init @ 0x1403ae045
// > SetupObjectOptions2Popup::init @ 0x1405978ed
// > SetItemIDLayer::init @ 0x14059809b
// > SetTargetIDLayer::init @ 0x140598ee7
// > SetupAdvFollowPopup::init @ 0x1405995ca
// > SetupAdvFollowEditPhysicsPopup::init @ 0x14059e951
// > SetupAdvFollowRetargetPopup::init @ 0x14059f9d9
// > SetupAnimSettingsPopup::init @ 0x1405a19da
// > SetupAreaMoveTriggerPopup::init @ 0x1405a2c2f
// > SetupAreaTransformTriggerPopup::init @ 0x1405a57f5
// > SetupAreaRotateTriggerPopup::init @ 0x1405a60ac
// > SetupAreaFadeTriggerPopup::init @ 0x1405a680b
// > SetupAreaTintTriggerPopup::init @ 0x1405a7032
// > SetupAreaTriggerPopup::init @ 0x1405a8028
// > SetupAreaAnimTriggerPopup::init @ 0x1405a8630
// > SetupCameraRotatePopup2::init @ 0x1405af30d
// > SetupCollisionTriggerPopup::init @ 0x1405afb37
// > SetupInstantCollisionTriggerPopup::init @ 0x1405b06a0
// > SetupCollisionStateTriggerPopup::init @ 0x1405b11b0
// > SetupCountTriggerPopup::init @ 0x1405b17ce
// > SetupPlatformerEndPopup::init @ 0x1405b2db5
// > SetupEnterEffectPopup::init @ 0x1405b34da
// > SetupInstantCountPopup::init @ 0x1405b79bc
// > SetupInteractObjectPopup::init @ 0x1405b9106
// > SetupKeyframeAnimPopup::init @ 0x1405b9d84
// > SetupKeyframePopup::init @ 0x1405baa92
// > SetupBGSpeedTrigger::init @ 0x1405be2d0
// > SetupGravityTriggerPopup::init @ 0x1405be9ab
// > SetupObjectTogglePopup::init @ 0x1405bf5b9
// > SetupOptionsTriggerPopup::init @ 0x1405cb8c5
// > SetupPickupTriggerPopup::init @ 0x1405cc511
// > SetupPulsePopup::init @ 0x1405cd10e
// > SetupRotateGameplayPopup::init @ 0x1405d6691
// > SetupGameplayOffsetPopup::init @ 0x1405d7259
// > SetupRotatePopup::init @ 0x1405d7cac
// > SetupReverbPopup::init @ 0x1405dbd52
// > SetupSFXPopup::init @ 0x1405dc828
// > SetupSFXEditPopup::init @ 0x1405ded0c
// > SetupShaderEffectPopup::init @ 0x1405dfa68
// > SetupSongTriggerPopup::init @ 0x1405f27c4
// > SetupSpawnPopup::init @ 0x1405f3fc3
// > SetupStaticCameraPopup::init @ 0x1405f5d89
// > SetupTeleportPopup::init @ 0x1405f6982
// > SetupTimerTriggerPopup::init @ 0x1405f7f27
// > SetupTimerEventTriggerPopup::init @ 0x1405f893a
// > SetupTimerControlTriggerPopup::init @ 0x1405f9001
// > SetupTransformPopup::init @ 0x1405fb186
// > SetupEventLinkPopup::init @ 0x1405fc06c
// > SelectEventLayer::init @ 0x1405fc8b4
// > SetupPlayerControlPopup::init @ 0x1405fe020
// > SetupSpawnParticlePopup::init @ 0x1405fe71a
// > SetupCheckpointPopup::init @ 0x1405ff28f
// > MultiTriggerPopup::init @ 0x1405ffa5a
// > UIObjectSettingsPopup::init @ 0x1405ffe28
// > SetupResetTriggerPopup::init @ 0x140600c49
// > SetupItemEditTriggerPopup::init @ 0x140601140
// > SetupItemCompareTriggerPopup::init @ 0x140603b0f
// > SetupCoinLayer::init @ 0x140605ec2
// > SetupPersistentItemTriggerPopup::init @ 0x1406063c3
// > SetupAudioLineGuidePopup::init @ 0x140606a32
// > SetupCameraGuidePopup::init @ 0x1406073da
// > SetupForceBlockPopup::init @ 0x140607acd
// > SetupArtSwitchPopup::init @ 0x140608a01
// > SetupStopTriggerPopup::init @ 0x140609198
// > SetupObjectControlPopup::init @ 0x140609b5e
// > SetupProgressPopup::init @ 0x140609f5f
// > SetupDashRingPopup::init @ 0x14060a65b
// > SetupZoomTriggerPopup::init @ 0x140615f06
// > ??> @ 0x14092fc3c
//
// This function is hookable on this platform (idp: pc, 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 11:35:14 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall SetupTriggerPopup::addCloseButton(__int64 a1, __int64 *a2)
{
__int64 v4; // rsi
cocos2d::CCObject *v5; // rdi
cocos2d::CCObject *v6; // rax
void *v7; // [rsp+50h] [rbp-38h]
v4 = (__int64)a2;
if ( (unsigned __int64)a2[3] > 0xF )
v4 = *a2;
v7 = operator new(0x2C8u);
v5 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v7);
if ( v5 )
{
if ( ButtonSprite::init_1(
(__int64)v5,
v4,
40,
0,
1061997773,
1,
"goldFont.fnt",
(__int64)"GJ_button_01.png",
1106247680) )
{
cocos2d::CCObject::autorelease(v5);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v5 + 8LL))(v5, 1);
LODWORD(v5) = 0;
}
}
v6 = CCMenuItemSpriteExtra::create((int)v5, 0, a1, (__int64)sub_14009D628);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v6);
sub_14003D310((__int64)a2);
}