//
// SetupShakePopup::textChanged from 0x1003a9f6c to 0x1003aa19c (560 bytes)
//
// 2 xrefs:
// > sub_1003AA19C @ 0x1003aa1a0
// > ??> @ 0x10080d508
//
// 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 SetupShakePopup::textChanged(SetupShakePopup *a1, CCTextInputNode *a2)
{
double v4; // d8
double v5; // d8
double v6; // d8
char *v7; // x20
float v8; // s0
cocos2d::CCString *v9; // x0
float *p_m_duration; // x20
float v11; // s8
Slider **p_m_durationSlider; // x8
char *v13; // x20
float v14; // s0
cocos2d::CCString *v15; // x0
char *v16; // x20
float v17; // s0
cocos2d::CCString *v18; // x0
Slider *v19; // x0
float v20; // s0
float v21; // s1
_BOOL4 v22; // w8
_BOOL4 v23; // w9
char *v24[2]; // [xsp+8h] [xbp-38h] BYREF
char v25; // [xsp+1Fh] [xbp-21h]
if ( !a1->m_disableTextDelegate )
{
if ( ((unsigned int (__fastcall *)(CCTextInputNode *))a2->getTag)(a2) == 5 )
{
CCTextInputNode::getString((__int64)a2, v24);
if ( v25 < 0 )
{
v7 = v24[0];
v4 = atof(v24[0]);
operator delete(v7);
}
else
{
v4 = atof((const char *)v24);
}
v8 = v4;
v9 = (cocos2d::CCString *)sub_100268F4C("%.02f", v8);
p_m_duration = &a1->m_duration;
v11 = 10.0;
a1->m_duration = fminf(fmaxf(cocos2d::CCString::floatValue(v9), 0.0), 10.0);
SetupShakePopup::updateDuration(a1);
p_m_durationSlider = &a1->m_durationSlider;
}
else if ( ((unsigned int (__fastcall *)(CCTextInputNode *))a2->getTag)(a2) == 8 )
{
CCTextInputNode::getString((__int64)a2, v24);
if ( v25 < 0 )
{
v13 = v24[0];
v5 = atof(v24[0]);
operator delete(v13);
}
else
{
v5 = atof((const char *)v24);
}
v14 = v5;
v15 = (cocos2d::CCString *)sub_100268F4C("%.02f", v14);
a1->m_interval = fminf(fmaxf(cocos2d::CCString::floatValue(v15), 0.0), 0.2);
SetupShakePopup::updateInterval(a1);
p_m_durationSlider = &a1->m_intervalSlider;
p_m_duration = &a1->m_duration;
v11 = 0.1;
}
else
{
CCTextInputNode::getString((__int64)a2, v24);
if ( v25 < 0 )
{
v16 = v24[0];
v6 = atof(v24[0]);
operator delete(v16);
}
else
{
v6 = atof((const char *)v24);
}
v17 = v6;
v18 = (cocos2d::CCString *)sub_100268F4C("%.02f", v17);
p_m_duration = &a1->m_strength;
a1->m_strength = fminf(fmaxf(cocos2d::CCString::floatValue(v18), 0.0), 100.0);
SetupShakePopup::updateShake(a1);
p_m_durationSlider = &a1->m_strengthSlider;
v11 = 5.0;
}
v19 = *p_m_durationSlider;
v20 = *p_m_duration / v11;
v21 = 1.0;
v22 = v20 >= 1.0;
v23 = v20 > 0.0 || v20 >= 1.0;
if ( v20 <= 0.0 )
v22 = 1;
if ( !v23 )
v21 = 0.0;
if ( v22 )
v20 = v21;
Slider::setValue(v19, v20);
}
}