//
// SetupTriggerPopup::addCloseButton from 0x10021a7f0 to 0x10021a86a (122 bytes)
//
// 78 xrefs:
// > SetupRotateCommandPopup::init @ 0x1000016b2
// > SetupPickupTriggerPopup::init @ 0x10001dfb4
// > SetupAnimSettingsPopup::init @ 0x100061f8d
// > sub_100063390 @ 0x100063448
// > CustomizeObjectSettingsPopup::init @ 0x1001dbcb3
// > SetupKeyframeAnimPopup::init @ 0x1001e180e
// > SetupKeyframePopup::init @ 0x1001e27a8
// > sub_100272600 @ 0x1002726b1
// > SetupSpawnPopup::init @ 0x10027aa55
// > sub_100285EA0 @ 0x100285f54
// > EditGameObjectPopup::init @ 0x1002978a3
// > UISaveLoadLayer::init @ 0x1002a30b5
// > sub_1002A7EA0 @ 0x1002a7f9b
// > SetupCountTriggerPopup::init @ 0x1002a94a8
// > SetupShaderEffectPopup::init @ 0x1002b2e38
// > SetupSongTriggerPopup::init @ 0x1002bfe7b
// > sub_1002C1E30 @ 0x1002c1ee0
// > SetupAdvFollowPopup::init @ 0x1002f00d8
// > sub_1002F5170 @ 0x1002f51d6
// > sub_1002F6130 @ 0x1002f6194
// > SetupObjectOptions2Popup::init @ 0x10030645e
// > SetupZoomTriggerPopup::init @ 0x10030c63e
// > SetupTeleportPopup::init @ 0x1003443e9
// > sub_100350460 @ 0x100350528
// > SetupObjectTogglePopup::init @ 0x10035f4d4
// > SetupCollisionTriggerPopup::init @ 0x100380426
// > SetupInstantCollisionTriggerPopup::init @ 0x100380fb6
// > SetupCollisionStateTriggerPopup::init @ 0x1003819e3
// > SetupTransformPopup::init @ 0x100384ea3
// > sub_10038A630 @ 0x10038a6e1
// > sub_10038AFD0 @ 0x10038b074
// > sub_10038B5F0 @ 0x10038b689
// > SetupPulsePopup::init @ 0x100393b0b
// > sub_1003DDDD0 @ 0x1003dde46
// > SetupReverbPopup::init @ 0x1004b0e9c
// > SetupSFXPopup::init @ 0x1004b1b9f
// > SetupSFXEditPopup::init @ 0x1004b4117
// > sub_1004B7A70 @ 0x1004b7b12
// > SetupGravityTriggerPopup::init @ 0x1004bf4a7
// > SetupAreaMoveTriggerPopup::init @ 0x1004cdc2a
// > SetupAreaTransformTriggerPopup::init @ 0x1004d0c99
// > sub_1004D1A60 @ 0x1004d1afd
// > sub_1004D2720 @ 0x1004d27ca
// > SetupAreaTintTriggerPopup::init @ 0x1004d34ae
// > SetupAreaTriggerPopup::init @ 0x1004d4b60
// > SetupAreaAnimTriggerPopup::init @ 0x1004d56a1
// > SetupBGSpeedTrigger::init @ 0x10050c213
// > sub_10050F430 @ 0x10050f4e1
// > sub_100511B80 @ 0x100511c6d
// > SetupEventLinkPopup::init @ 0x1005a4a8b
// > SelectEventLayer::init @ 0x1005a5678
// > SetupPlayerControlPopup::init @ 0x1005a7e57
// > sub_1005A84B0 @ 0x1005a8553
// > SetupCheckpointPopup::init @ 0x1005a9234
// > MultiTriggerPopup::init @ 0x1005a9846
// > UIObjectSettingsPopup::init @ 0x1005a9be1
// > sub_1005AA8B0 @ 0x1005aa953
// > SetupItemEditTriggerPopup::init @ 0x1005aad3c
// > SetupItemCompareTriggerPopup::init @ 0x1005ad46f
// > SetupCoinLayer::init @ 0x1005af62e
// > SetupPersistentItemTriggerPopup::init @ 0x1005afae0
// > SetupAudioLineGuidePopup::init @ 0x1005b01f4
// > SetupCameraGuidePopup::init @ 0x1005b0b43
// > SetupForceBlockPopup::init @ 0x1005b11e6
// > SetupArtSwitchPopup::init @ 0x1005b1b7f
// > SetupStopTriggerPopup::init @ 0x1005b22c7
// > sub_1005B2A90 @ 0x1005b2b35
// > sub_1005B2E60 @ 0x1005b2f07
// > SetupDashRingPopup::init @ 0x1005b3607
// > SetupRotatePopup::init @ 0x10066e3b1
// > SetupOptionsTriggerPopup::init @ 0x1006ba547
// > SetupInstantCountPopup::init @ 0x1006bc0ed
// > SetupMoveCommandPopup::init @ 0x1006def05
// > SetupPlatformerEndPopup::init @ 0x100748da9
// > SetupRotateGameplayPopup::init @ 0x1008783ca
// > SetupGameplayOffsetPopup::init @ 0x10087909c
// > sub_1008DCDF0 @ 0x1008dd2bc
// > sub_1008EE9C0 @ 0x1008eebba
//
// 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 12:27:01 +0000
//
__int64 __fastcall SetupTriggerPopup::addCloseButton(__int64 a1, __int64 a2)
{
__int64 v2; // rsi
char *v3; // rax
__int64 v4; // rax
if ( (*(_BYTE *)a2 & 1) != 0 )
v2 = *(_QWORD *)(a2 + 16);
else
v2 = a2 + 1;
v3 = ButtonSprite::create_1(v2, 0x28u, 0, 1u, (__int64)"goldFont.fnt", (__int64)"GJ_button_01.png", 0.80000001, 30.0);
v4 = CCMenuItemSpriteExtra::create(v3, 0, a1, 1369, 0);
return (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v4);
}