//
// SetupTriggerPopup::textChanged from 0x10012fc04 to 0x10012fd3c (312 bytes)
//
// 85 xrefs:
// > sub_1001308B8 @ 0x1001308bc
// > ??> @ 0x100762a60
// > ??> @ 0x100765e88
// > ??> @ 0x100766680
// > ??> @ 0x100766e78
// > ??> @ 0x1007696c8
// > ??> @ 0x100769ec0
// > ??> @ 0x10076a6b8
// > ??> @ 0x10076aeb0
// > ??> @ 0x10076b6a8
// > ??> @ 0x10076bef8
// > ??> @ 0x10076c6f0
// > ??> @ 0x10076e378
// > ??> @ 0x10076f3d8
// > ??> @ 0x1007707a0
// > ??> @ 0x100771cb0
// > ??> @ 0x100776030
// > ??> @ 0x100776878
// > ??> @ 0x100777070
// > ??> @ 0x100786508
// > ??> @ 0x100792dc8
// > ??> @ 0x100796b38
// > ??> @ 0x1007a1f80
// > ??> @ 0x1007a2790
// > ??> @ 0x1007a3020
// > ??> @ 0x1007a3818
// > ??> @ 0x1007a4010
// > ??> @ 0x1007a48a8
// > ??> @ 0x1007a50a0
// > ??> @ 0x1007aa5e0
// > ??> @ 0x1007aadd8
// > ??> @ 0x1007ac758
// > ??> @ 0x1007b0c70
// > ??> @ 0x1007b1cd0
// > ??> @ 0x1007b24b0
// > ??> @ 0x1007b3a88
// > ??> @ 0x1007b7868
// > ??> @ 0x1007bd070
// > ??> @ 0x1007be018
// > ??> @ 0x1007c2638
// > ??> @ 0x1007c56c0
// > ??> @ 0x1007c5eb8
// > ??> @ 0x1007c66b0
// > ??> @ 0x1007d2408
// > ??> @ 0x1007d4130
// > ??> @ 0x1007d7070
// > ??> @ 0x1007d9068
// > ??> @ 0x1007dd248
// > ??> @ 0x1007de150
// > ??> @ 0x1007de948
// > ??> @ 0x1007df158
// > ??> @ 0x1007e0210
// > ??> @ 0x1007e2af8
// > ??> @ 0x1007e3320
// > ??> @ 0x1007e3b18
// > ??> @ 0x1007e4d88
// > ??> @ 0x1007e5c90
// > ??> @ 0x1007e8818
// > ??> @ 0x1007f1010
// > ??> @ 0x10080dd00
// > ??> @ 0x100816c48
// > ??> @ 0x100818070
// > ??> @ 0x100818868
// > ??> @ 0x100819048
// > ??> @ 0x100819858
// > ??> @ 0x10081a050
// > ??> @ 0x10081a848
// > ??> @ 0x10081b040
// > ??> @ 0x10081b838
// > ??> @ 0x10081c030
// > ??> @ 0x10081c868
// > ??> @ 0x10081d060
// > ??> @ 0x10081d898
// > ??> @ 0x10081e090
// > ??> @ 0x10081e888
// > ??> @ 0x10081f080
// > ??> @ 0x10081f878
// > ??> @ 0x100820070
// > ??> @ 0x100820868
// > ??> @ 0x100821060
// > ??> @ 0x100821858
// > ??> @ 0x100822178
// > ??> @ 0x100822970
// > ??> @ 0x1008239f0
// > ??> @ 0x100825370
//
// 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 SetupTriggerPopup::textChanged(SetupTriggerPopup *a1, CCTextInputNode *a2)
{
__int64 v4; // x20
double v5; // d8
char *v6; // x22
float v7; // s8
int m_decimalPlaces; // w8
float v9; // s0
float v10; // s0
cocos2d::CCDictionary *m_triggerValues; // x21
float *v12; // x0
float v13; // s0
char *v14[2]; // [xsp+8h] [xbp-48h] BYREF
char v15; // [xsp+1Fh] [xbp-31h]
if ( !a1->m_disableTextDelegate )
{
v4 = ((__int64 (__fastcall *)(CCTextInputNode *))a2->getTag)(a2);
CCTextInputNode::getString(v14, a2);
if ( v15 < 0 )
{
v6 = v14[0];
v5 = atof(v14[0]);
operator delete(v6);
}
else
{
v5 = atof((const char *)v14);
}
v7 = v5;
m_decimalPlaces = a2->m_decimalPlaces;
if ( m_decimalPlaces <= 0 )
{
v10 = (float)(int)v7;
}
else
{
v9 = 10.0;
if ( m_decimalPlaces != 1 )
v9 = __exp10f((float)(unsigned int)m_decimalPlaces);
v10 = roundf(v9 * v7) / v9;
}
*(float *)v14 = v10;
((void (__fastcall *)(SetupTriggerPopup *, __int64, char **))a1->updateInputValue)(a1, v4, v14);
m_triggerValues = a1->m_triggerValues;
v12 = sub_10000C340(*(float *)v14);
cocos2d::CCDictionary::setObject(m_triggerValues, (cocos2d::CCObject *)v12, (int)v4);
SetupTriggerPopup::valueChanged(a1, v4, *(float *)v14);
v13 = ((float (__fastcall *)(SetupTriggerPopup *, __int64, float))a1->triggerSliderValueFromValue)(
a1,
v4,
*(float *)v14);
SetupTriggerPopup::updateSlider(a1, v4, v13);
}
}