//
// SetupTriggerPopup::addCloseButton from 0x100235eb0 to 0x100235f2a (122 bytes)
//
// 68 xrefs:
// > SetupRotateCommandPopup::init @ 0x1000053bd
// > SetupPickupTriggerPopup::init @ 0x100058c15
// > SetupAnimSettingsPopup::init @ 0x10009ac9a
// > SetItemIDLayer::init @ 0x10009c257
// > CustomizeObjectSettingsPopup::init @ 0x1001f9890
// > SetupKeyframeAnimPopup::init @ 0x1001fed2d
// > SetupKeyframePopup::init @ 0x1001ffec4
// > SetupSpawnPopup::init @ 0x10028f4f2
// > SetupEnterTriggerPopup::init @ 0x10029b08a
// > EditGameObjectPopup::init @ 0x1002ab3a0
// > UISaveLoadLayer::init @ 0x1002b52b2
// > SetTargetIDLayer::init @ 0x1002b9fc8
// > SetupShaderEffectPopup::init @ 0x1002c6165
// > SetupSongTriggerPopup::init @ 0x1002d32d8
// > SetupAdvFollowPopup::init @ 0x1003054e5
// > SetupAdvFollowEditPhysicsPopup::init @ 0x10030a785
// > SetupAdvFollowRetargetPopup::init @ 0x10030b861
// > SetupObjectOptions2Popup::init @ 0x10031b2ed
// > SetupZoomTriggerPopup::init @ 0x1003213bb
// > SetupTeleportPopup::init @ 0x100358df6
// > SetupObjectTogglePopup::init @ 0x1003760ca
// > SetupInstantCollisionTriggerPopup::init @ 0x100397393
// > SetupCollisionStateTriggerPopup::init @ 0x100397ff0
// > SetupStaticCameraPopup::init @ 0x10039b540
// > SetupTimerTriggerPopup::init @ 0x1003a0d5e
// > SetupTimerEventTriggerPopup::init @ 0x1003a1881
// > SetupTimerControlTriggerPopup::init @ 0x1003a2018
// > SetupEnterEffectPopup::init @ 0x1003f0ae3
// > SetupReverbPopup::init @ 0x1004b7e69
// > SetupSFXPopup::init @ 0x1004b8c72
// > SetupSFXEditPopup::init @ 0x1004bafc3
// > SetupCameraRotatePopup2::init @ 0x1004bec0f
// > SetupGravityTriggerPopup::init @ 0x1004c51d4
// > SetupAreaMoveTriggerPopup::init @ 0x1004d21e7
// > SetupAreaTransformTriggerPopup::init @ 0x1004d55c6
// > SetupAreaRotateTriggerPopup::init @ 0x1004d654a
// > SetupAreaFadeTriggerPopup::init @ 0x1004d7337
// > SetupAreaTintTriggerPopup::init @ 0x1004d814b
// > SetupAreaTriggerPopup::init @ 0x1004d991d
// > SetupAreaAnimTriggerPopup::init @ 0x1004da57e
// > SetupBGSpeedTrigger::init @ 0x10050aa8f
// > SetupInteractObjectPopup::init @ 0x10050e1e2
// > SetupTransformPopup::init @ 0x100510bda
// > SetupEventLinkPopup::init @ 0x10057764c
// > SelectEventLayer::init @ 0x100578385
// > SetupPlayerControlPopup::init @ 0x10057ac84
// > SetupSpawnParticlePopup::init @ 0x10057b4b5
// > SetupCheckpointPopup::init @ 0x10057c301
// > MultiTriggerPopup::init @ 0x10057ca53
// > UIObjectSettingsPopup::init @ 0x10057cf0e
// > SetupResetTriggerPopup::init @ 0x10057de10
// > SetupItemEditTriggerPopup::init @ 0x10057e349
// > SetupItemCompareTriggerPopup::init @ 0x100580bfc
// > SetupCoinLayer::init @ 0x100582fad
// > SetupPersistentItemTriggerPopup::init @ 0x1005835ad
// > SetupAudioLineGuidePopup::init @ 0x100583d81
// > SetupCameraGuidePopup::init @ 0x1005847f0
// > SetupForceBlockPopup::init @ 0x100584fb3
// > SetupArtSwitchPopup::init @ 0x100585a7c
// > SetupStopTriggerPopup::init @ 0x1005862e1
// > SetupObjectControlPopup::init @ 0x100586c02
// > SetupDashRingPopup::init @ 0x100587104
// > SetupRotatePopup::init @ 0x10059ccbe
// > SetupOptionsTriggerPopup::init @ 0x1005e6e54
// > SetupMoveCommandPopup::init @ 0x100607580
// > SetupPlatformerEndPopup::init @ 0x100669ed6
// > SetupRotateGameplayPopup::init @ 0x100797ae7
// > SetupGameplayOffsetPopup::init @ 0x1007988d9
//
// 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, __int64 a2)
{
const char *v2; // rsi
ButtonSprite *v3; // rax
CCMenuItemSpriteExtra *v4; // rax
if ( (*(_BYTE *)a2 & 1) != 0 )
v2 = *(const char **)(a2 + 16);
else
v2 = (const char *)(a2 + 1);
v3 = ButtonSprite::create_1(v2, 40, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_01.png", 30.0);
v4 = CCMenuItemSpriteExtra::create(v3, nullptr, (cocos2d::CCObject *)a1, (cocos2d::SEL_MenuHandler)0x529uLL);
return (*(__int64 (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(a1 + 544) + 440LL))(
*(_QWORD *)(a1 + 544),
v4);
}