//
// SetupCameraOffsetTrigger::textChanged from 0x100190bb4 to 0x100190dd4 (544 bytes)
//
// 2 xrefs:
// > sub_100190DD4 @ 0x100190dd8
// > ??> @ 0x1007a72e8
//
// 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 SetupCameraOffsetTrigger::textChanged(SetupCameraOffsetTrigger *a1, CCTextInputNode *a2)
{
int v4; // w0
int v5; // w20
int v6; // w20
double v7; // d8
char *v8; // x21
float v9; // s8
Slider *m_moveTimeSlider; // x0
int m_offsetY; // s0
char *v12; // x20
float v13; // s0
cocos2d::CCString *v14; // x0
float v15; // s0
float v16; // s1
_BOOL4 v17; // w8
_BOOL4 v18; // w9
char *v19; // x21
float v20; // s0
_BOOL4 v21; // w8
_BOOL4 v22; // w9
float v23; // s2
char *v24[2]; // [xsp+8h] [xbp-48h] BYREF
char v25; // [xsp+1Fh] [xbp-31h]
if ( !a1->m_disableTextDelegate )
{
v4 = ((__int64 (__fastcall *)(CCTextInputNode *))a2->getTag)(a2);
if ( v4 == 3 )
{
CCTextInputNode::getString((__int64)a2, v24);
if ( v25 < 0 )
{
v12 = v24[0];
v7 = atof(v24[0]);
operator delete(v12);
}
else
{
v7 = atof((const char *)v24);
}
v13 = v7;
v14 = (cocos2d::CCString *)sub_100268F4C("%.02f", v13);
a1->m_moveTime = cocos2d::CCString::floatValue(v14);
SetupCameraOffsetTrigger::updateDuration(a1);
m_moveTimeSlider = a1->m_moveTimeSlider;
v15 = a1->m_moveTime / 10.0;
v16 = 1.0;
v17 = v15 >= 1.0;
v18 = v15 > 0.0 || v15 >= 1.0;
if ( v15 <= 0.0 )
v17 = 1;
if ( !v18 )
v16 = 0.0;
if ( v17 )
v15 = v16;
}
else
{
if ( v4 == 1 )
{
CCTextInputNode::getString((__int64)a2, v24);
if ( v25 < 0 )
{
v8 = v24[0];
v6 = atoi(v24[0]);
operator delete(v8);
}
else
{
v6 = atoi((const char *)v24);
}
v9 = 3.0;
a1->m_offsetY = (int)(float)((float)v6 * 3.0);
SetupCameraOffsetTrigger::updateMoveCommandPosY(a1);
m_moveTimeSlider = a1->m_offsetYSlider;
m_offsetY = a1->m_offsetY;
}
else
{
if ( v4 )
return;
CCTextInputNode::getString((__int64)a2, v24);
if ( v25 < 0 )
{
v19 = v24[0];
v5 = atoi(v24[0]);
operator delete(v19);
}
else
{
v5 = atoi((const char *)v24);
}
v9 = 3.0;
a1->m_offsetX = (int)(float)((float)v5 * 3.0);
SetupCameraOffsetTrigger::updateMoveCommandPosX(a1);
m_moveTimeSlider = a1->m_offsetXSlider;
m_offsetY = a1->m_offsetX;
}
v20 = (float)(floorf((float)m_offsetY / v9) / 200.0) + 0.5;
v21 = v20 >= 1.0;
v22 = v20 > 0.0 || v20 >= 1.0;
if ( v20 <= 0.0 )
v21 = 1;
v23 = 0.0;
if ( v22 )
v23 = 1.0;
if ( v21 )
v20 = v23;
v15 = fminf(v20, 1.0);
}
Slider::setValue(m_moveTimeSlider, v15);
}
}