//
// SecretLayer2::updateSearchLabel from 0x4ec174 to 0x4ec292 (286 bytes)
//
// 3 xrefs:
// > SecretLayer2::textInputClosed @ 0x4ec2be
// > SecretLayer2::textChanged @ 0x4ec30a
// > SecretLayer2::init @ 0x4eea6c
//
// 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 SecretLayer2::updateSearchLabel(SecretLayer2 *a1, const char *a2)
{
cocos2d::CCLabelBMFont *m_textLabel; // r8
_BOOL4 v4; // r10
CCTextInputNode *m_searchInput; // r5
void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r3
void (__fastcall *v7)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
int v9; // [sp+1Ch] [bp+0h] BYREF
_BYTE v10[4]; // [sp+20h] [bp+4h] BYREF
_BYTE v11[4]; // [sp+24h] [bp+8h] BYREF
char *v12; // [sp+28h] [bp+Ch] BYREF
m_textLabel = a1->m_searchInput->m_textLabel;
sub_776584((int)&v9, (char *)a2);
sub_776584((int)v10, (char *)&unk_939830);
v4 = sub_4E9E88((int)&v9, (int)v10);
if ( !v4 )
{
sub_776584((int)v11, (char *)a2);
sub_776584((int)&v12, "...");
v4 = sub_4E9E88((int)v11, (int)&v12);
sub_774008(&v12);
sub_774008(v11);
}
sub_774008(v10);
sub_774008(&v9);
if ( v4 )
{
m_searchInput = a1->m_searchInput;
sub_776584((int)&v12, "...");
CCTextInputNode::updateLabel((int)m_searchInput, &v12);
sub_774008(&v12);
setColor = m_textLabel->setColor;
LOWORD(v12) = -26260;
BYTE2(v12) = -40;
setColor(m_textLabel, (const cocos2d::ccColor3B *)&v12);
}
else
{
v7 = m_textLabel->setColor;
LOWORD(v12) = -1;
BYTE2(v12) = -1;
v7(m_textLabel, (const cocos2d::ccColor3B *)&v12);
}
}