//
// CCTextInputNode::refreshLabel from 0x10016cf98 to 0x10016d114 (380 bytes)
//
// 5 xrefs:
// > CCTextInputNode::updateLabel @ 0x10016cd38
// > CCTextInputNode::setMaxLabelScale @ 0x10016d134
// > CCTextInputNode::setMaxLabelWidth @ 0x10016d13c
// > CCTextInputNode::setLabelPlaceholderScale @ 0x10016d144
// > CCTextInputNode::setLabelPlaceholderColor @ 0x10016d154
//
// 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 CCTextInputNode::refreshLabel(CCTextInputNode *a1)
{
char *v2; // x0
_BOOL4 v3; // w20
cocos2d::CCLabelBMFont *m_textLabel; // x21
float m_maxLabelWidth; // s8
float *v6; // x0
__n128 v7; // q0
float v8; // s8
void (*setColor)(void); // x8
TextArea *m_textArea; // x0
int b; // w9
int v12; // w8
void *__p[2]; // [xsp+0h] [xbp-60h] BYREF
char v14; // [xsp+17h] [xbp-49h]
void *v15[2]; // [xsp+18h] [xbp-48h] BYREF
char v16; // [xsp+2Fh] [xbp-31h]
if ( a1->m_textLabel || a1->m_textArea )
{
v2 = (char *)((__int64 (__fastcall *)(cocos2d::CCTextFieldTTF *))a1->m_textField->getString)(a1->m_textField);
sub_100009900(v15, v2);
sub_100009900(__p, "");
v3 = sub_1000045BC(v15, __p);
if ( v14 < 0 )
operator delete(__p[0]);
if ( v16 < 0 )
operator delete(v15[0]);
m_textLabel = a1->m_textLabel;
if ( m_textLabel )
{
if ( v3 && a1->m_placeholderScale > 0.0 )
{
((void (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->setScale)(a1->m_textLabel);
}
else
{
m_maxLabelWidth = a1->m_maxLabelWidth;
v6 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->getContentSize)(a1->m_textLabel);
v7.n128_u32[0] = LODWORD(a1->m_maxLabelScale);
if ( (float)(m_maxLabelWidth / *v6) <= v7.n128_f32[0] )
{
v8 = a1->m_maxLabelWidth;
v7.n128_f32[0] = v8
/ *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_textLabel->getContentSize)(a1->m_textLabel);
}
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __n128))m_textLabel->setScale)(m_textLabel, v7);
if ( !v3 )
{
setColor = (void (*)(void))a1->m_textLabel->setColor;
goto LABEL_19;
}
}
setColor = (void (*)(void))a1->m_textLabel->setColor;
LABEL_19:
setColor();
return;
}
m_textArea = a1->m_textArea;
if ( m_textArea )
{
if ( v3 )
{
b = a1->m_placeholderColor.b;
v12 = *(unsigned __int16 *)&a1->m_placeholderColor.r;
}
else
{
b = a1->m_textColor.b;
v12 = *(unsigned __int16 *)&a1->m_textColor.r;
}
TextArea::colorAllLabels(m_textArea, (cocos2d::ccColor3B)(v12 | (b << 16)));
}
}
}