//
// SetupItemEditTriggerPopup::onCustomToggleTriggerValue from 0x10040d428 to 0x10040d5e8 (448 bytes)
//
// 1 xrefs:
// > ??> @ 0x10081b0b8
//
// 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
//
void __fastcall SetupItemEditTriggerPopup::onCustomToggleTriggerValue(
SetupItemEditTriggerPopup *a1,
cocos2d::CCObject *a2)
{
int v3; // w0
int v4; // w20
int v5; // w20
bool v6; // w2
SetupItemEditTriggerPopup *v7; // x0
int v8; // w1
unsigned int v9; // w20
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
v4 = v3;
if ( v3 < 1001 )
{
if ( v3 < 101 )
{
if ( v3 == (int)((float (__fastcall *)(SetupItemEditTriggerPopup *, __int64))a1->getValue)(a1, 476) )
v4 = 0;
SetupTriggerPopup::updateValue(a1, 476, (float)v4);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 1, v4 == 1);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 2, v4 == 2);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 3, v4 == 3);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 4, v4 == 4);
v6 = v4 == 5;
v7 = a1;
v8 = 5;
}
else
{
v9 = v3 - 100;
if ( v3 - 100 == (int)((float (__fastcall *)(SetupItemEditTriggerPopup *, __int64))a1->getValue)(a1, 477) )
v9 = 0;
SetupTriggerPopup::updateValue(a1, 477, (float)v9);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 101, v9 == 1);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 102, v9 == 2);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 103, v9 == 3);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 104, v9 == 4);
v6 = v9 == 5;
v7 = a1;
v8 = 105;
}
}
else
{
v5 = v3 - 1000;
SetupTriggerPopup::updateValue(a1, 478, (float)(unsigned int)(v3 - 1000));
SetupTriggerPopup::updateCustomToggleTrigger(a1, 1001, v5 == 1);
SetupTriggerPopup::updateCustomToggleTrigger(a1, 1002, v5 == 2);
v6 = v5 == 3;
v7 = a1;
v8 = 1003;
}
SetupTriggerPopup::updateCustomToggleTrigger(v7, v8, v6);
SetupItemEditTriggerPopup::updateFormulaLabel(a1);
}