//
// ConfigureValuePopup::textChanged from 0x4cf70c to 0x4cf828 (284 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'ConfigureValuePopup::textChanged @ 0x4cf838
//
// 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 ConfigureValuePopup::textChanged(ConfigureValuePopup *a1, CCTextInputNode *a2)
{
float m_minimum; // s15
float m_value; // s14
float m_maximum; // s13
float v6; // s12
double v7; // d8
const char *v8; // r1
cocos2d::CCString *v9; // r0
Slider *m_slider; // r0
float v11; // s15
char *v12; // [sp+0h] [bp-8h] BYREF
if ( !a1->m_disableTextDelegate )
{
a1->m_enableDelegate = 1;
if ( a1->m_type == 1 )
{
CCTextInputNode::getString((CCTextInputNode *)&v12, (int)a2);
a1->m_value = (float)atoi(v12);
sub_774008(&v12);
m_minimum = a1->m_minimum;
m_value = a1->m_value;
m_maximum = a1->m_maximum;
if ( m_minimum < m_value )
v6 = a1->m_value;
else
v6 = a1->m_minimum;
if ( m_maximum > v6 )
{
if ( m_minimum < m_value )
m_maximum = a1->m_value;
else
m_maximum = a1->m_minimum;
}
a1->m_value = m_maximum;
}
else
{
CCTextInputNode::getString((CCTextInputNode *)&v12, (int)a2);
v7 = atof(v12);
sub_774008(&v12);
*(float *)&v7 = v7;
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.02f", v8, *(float *)&v7);
a1->m_value = cocos2d::CCString::floatValue(v9);
}
m_slider = a1->m_slider;
if ( m_slider )
{
v11 = (float)(a1->m_value - a1->m_minimum) / (float)(a1->m_maximum - a1->m_minimum);
if ( v11 >= 1.0 )
{
v11 = 1.0;
}
else if ( v11 <= 0.0 )
{
v11 = 0.0;
}
Slider::setValue(m_slider, v11);
}
}
}