//
// SetupTriggerPopup::addHelpButton from 0x10012ef90 to 0x10012f0e0 (336 bytes)
//
// 90 xrefs:
// > SetupTeleportPopup::init @ 0x10000b430
// > SetupTimerTriggerPopup::init @ 0x10002d47c
// > SetupTimerEventTriggerPopup::init @ 0x10002dc00
// > SetupTimerControlTriggerPopup::init @ 0x10002e0d8
// > SetupAreaMoveTriggerPopup::init @ 0x10003426c
// > SetupAreaTransformTriggerPopup::init @ 0x100036584
// > SetupAreaRotateTriggerPopup::init @ 0x100036d84
// > SetupAreaFadeTriggerPopup::init @ 0x10003745c
// > SetupAreaTintTriggerPopup::init @ 0x100037acc
// > SetupAreaTriggerPopup::init @ 0x100038858
// > SetupAreaAnimTriggerPopup::init @ 0x100038dfc
// > SetupObjectOptions2Popup::init @ 0x100041780
// > SetupPickupTriggerPopup::init @ 0x100043414
// > SetupCameraRotatePopup2::init @ 0x10004c3c8
// > CustomizeObjectSettingsPopup::init @ 0x100050d70
// > SetupAdvFollowPopup::init @ 0x10005fe9c
// > SetupAdvFollowEditPhysicsPopup::init @ 0x1000639a4
// > SetupAdvFollowRetargetPopup::init @ 0x100064558
// > SetupSpawnPopup::init @ 0x1000f7b9c
// > SetupReverbPopup::init @ 0x10017f410
// > SetupSFXPopup::init @ 0x10017fba4
// > SetupSFXEditPopup::init @ 0x10018132c
// > SetupShaderEffectPopup::setupShockWave @ 0x1001820d4
// > SetupShaderEffectPopup::setupShockLine @ 0x100183030
// > SetupShaderEffectPopup::setupGlitch @ 0x100183e80
// > SetupShaderEffectPopup::setupChromatic @ 0x1001843b0
// > SetupShaderEffectPopup::setupChromaticGlitch @ 0x100184830
// > SetupShaderEffectPopup::setupPixelate @ 0x100184ea4
// > SetupShaderEffectPopup::setupLensCircle @ 0x100185424
// > SetupShaderEffectPopup::setupRadialBlur @ 0x100185b90
// > SetupShaderEffectPopup::setupMotionBlur @ 0x1001863bc
// > SetupShaderEffectPopup::setupBulge @ 0x100186d5c
// > SetupShaderEffectPopup::setupPinch @ 0x10018748c
// > SetupShaderEffectPopup::setupGrayscale @ 0x100187e00
// > SetupShaderEffectPopup::setupSepia @ 0x1001881f0
// > SetupShaderEffectPopup::setupInvertColor @ 0x10018844c
// > SetupShaderEffectPopup::setupHueShift @ 0x1001889a0
// > SetupShaderEffectPopup::setupColorChange @ 0x100188c24
// > SetupShaderEffectPopup::setupSplitScreen @ 0x100189198
// > SetupShaderEffectPopup::setupShaderTrigger @ 0x100189584
// > SetupRotateGameplayPopup::init @ 0x10019e7d0
// > SetupGameplayOffsetPopup::init @ 0x10019f14c
// > SetupObjectTogglePopup::init @ 0x1001a2d74
// > SetupObjectTogglePopup::init @ 0x1001a2e50
// > SetupObjectTogglePopup::init @ 0x1001a2ecc
// > SetupKeyframeAnimPopup::init @ 0x1001b3ef8
// > SetupKeyframePopup::init @ 0x1001b48b4
// > SetupZoomTriggerPopup::init @ 0x1001b8508
// > SetupSongTriggerPopup::init @ 0x1001c29a8
// > SetupStaticCameraPopup::init @ 0x1001d0b78
// > SetTargetIDLayer::init @ 0x1002134e4
// > SetupInstantCollisionTriggerPopup::init @ 0x100230cec
// > SetupCollisionStateTriggerPopup::init @ 0x100231634
// > SetupTransformPopup::init @ 0x100231a6c
// > SetupRotatePopup::init @ 0x10026856c
// > SetupMoveCommandPopup::init @ 0x1002739dc
// > SetupPlatformerEndPopup::init @ 0x1002adf54
// > SetupEnterTriggerPopup::init @ 0x1002d29a4
// > SetupAnimSettingsPopup::init @ 0x1002e776c
// > SetupBGSpeedTrigger::init @ 0x1002f36a0
// > SetupGradientPopup::init @ 0x100342658
// > SetupEnterEffectPopup::init @ 0x1003ff57c
// > SetupEnterEffectPopup::init @ 0x1003ff84c
// > SetupEnterEffectPopup::init @ 0x1003ffbf0
// > SetupEnterEffectPopup::init @ 0x1003ffd8c
// > SetupEnterEffectPopup::init @ 0x100400038
// > SetupEnterEffectPopup::init @ 0x100400140
// > SetupRotateCommandPopup::init @ 0x100405f60
// > SetupEventLinkPopup::init @ 0x100407040
// > SetupPlayerControlPopup::init @ 0x100409574
// > SetupSpawnParticlePopup::init @ 0x100409af8
// > SetupCheckpointPopup::init @ 0x10040a480
// > MultiTriggerPopup::init @ 0x10040a938
// > UIObjectSettingsPopup::init @ 0x10040ac14
// > SetupResetTriggerPopup::init @ 0x10040b6fc
// > SetupItemEditTriggerPopup::init @ 0x10040ba4c
// > SetupItemCompareTriggerPopup::init @ 0x10040d82c
// > SetupCoinLayer::init @ 0x10040f284
// > SetupPersistentItemTriggerPopup::init @ 0x10040f634
// > SetupAudioLineGuidePopup::init @ 0x10040fb6c
// > SetupCameraGuidePopup::init @ 0x100410308
// > SetupForceBlockPopup::init @ 0x100410804
// > SetupArtSwitchPopup::init @ 0x100410f94
// > SetupStopTriggerPopup::init @ 0x1004115b8
// > SetupObjectControlPopup::init @ 0x100411c60
// > SetupDashRingPopup::init @ 0x100411f90
// > SetupInteractObjectPopup::init @ 0x100412a9c
// > SetupOptionsTriggerPopup::init @ 0x100413744
// > SetItemIDLayer::init @ 0x100419d80
// > SetupGravityTriggerPopup::init @ 0x100421950
//
// 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::addHelpButton(__int64 a1, __int64 a2, __int64 a3, float a4)
{
float *v7; // x20
cocos2d::CCDirector *v8; // x0
cocos2d::CCNode *v9; // x21
__n128 v10; // q0
__n128 v11; // q1
cocos2d::CCPoint v13; // [xsp+8h] [xbp-88h] BYREF
_BYTE v14[8]; // [xsp+10h] [xbp-80h] BYREF
float v15; // [xsp+18h] [xbp-78h]
float v16; // [xsp+1Ch] [xbp-74h]
void *__p[2]; // [xsp+20h] [xbp-70h] BYREF
__int64 v18; // [xsp+30h] [xbp-60h]
void *__dst[2]; // [xsp+40h] [xbp-50h] BYREF
__int64 v20; // [xsp+50h] [xbp-40h]
cocos2d::CCPoint v21; // 0:kr08_8.8
if ( *(char *)(a2 + 23) < 0 )
{
sub_1000097D0(__dst, *(void **)a2, *(_QWORD *)(a2 + 8));
}
else
{
*(_OWORD *)__dst = *(_OWORD *)a2;
v20 = *(_QWORD *)(a2 + 16);
}
if ( *(char *)(a3 + 23) < 0 )
{
sub_1000097D0(__p, *(void **)a3, *(_QWORD *)(a3 + 8));
}
else
{
*(_OWORD *)__p = *(_OWORD *)a3;
v18 = *(_QWORD *)(a3 + 16);
}
v7 = (float *)InfoAlertButton::create(__dst, __p, 1.0);
if ( SHIBYTE(v18) < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v20) < 0 )
operator delete(__dst[0]);
v7[138] = a4;
(*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 544) + 440LL))(*(_QWORD *)(a1 + 544), v7);
v8 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v8);
v9 = *(cocos2d::CCNode **)(a1 + 544);
v10.n128_f32[0] = (float)((float)(v15 * 0.5) - (float)(*(float *)(a1 + 708) * 0.5)) + 18.0;
v11.n128_f32[0] = (float)((float)(v16 * 0.5) + (float)(*(float *)(a1 + 712) * 0.5)) + -18.0;
sub_100022980(v10, v11, &v13);
v21 = cocos2d::CCNode::convertToNodeSpace(v9, &v13);
return (*(__int64 (__fastcall **)(float *, _BYTE *, float, float))(*(_QWORD *)v7 + 184LL))(v7, v14, v21.x, v21.y);
}