//
// CustomizeObjectLayer::textChanged from 0x100050b20 to 0x100050c54 (308 bytes)
//
// 2 xrefs:
// > sub_100050C88 @ 0x100050c8c
// > ??> @ 0x100771498
//
// 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 CustomizeObjectLayer::textChanged(CustomizeObjectLayer *a1, CCTextInputNode *a2)
{
int v4; // w0
int m_customColorChannel; // w0
GameObject *m_targetObject; // x19
char *v7; // x1
char *v8; // x20
cocos2d::CCString *v9; // x0
const char *CString; // x0
std::string __p; // [xsp+10h] [xbp-50h] BYREF
char *v12[2]; // [xsp+28h] [xbp-38h] BYREF
char v13; // [xsp+3Fh] [xbp-21h]
if ( !a1->m_disableTextDelegate )
{
v4 = ((__int64 (__fastcall *)(CCTextInputNode *))a2->getTag)(a2);
if ( v4 == 1 )
{
m_targetObject = a1->m_targetObject;
CCTextInputNode::getString(v12, a2);
if ( v13 >= 0 )
v7 = (char *)v12;
else
v7 = v12[0];
sub_100009900(&__p, v7);
TextGameObject::updateTextObject((int)m_targetObject, &__p);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( v13 < 0 )
operator delete(v12[0]);
}
else if ( !v4 )
{
CCTextInputNode::getString(v12, a2);
if ( v13 < 0 )
{
v8 = v12[0];
a1->m_customColorChannel = atoi(v12[0]);
operator delete(v8);
m_customColorChannel = a1->m_customColorChannel;
}
else
{
m_customColorChannel = atoi((const char *)v12);
a1->m_customColorChannel = m_customColorChannel;
}
v9 = (cocos2d::CCString *)sub_100268F4C("%i", m_customColorChannel);
CString = cocos2d::CCString::getCString(v9);
ButtonSprite::setString(a1->m_customColorButtonSprite, CString);
CustomizeObjectLayer::updateSelected(a1, a1->m_customColorChannel);
CustomizeObjectLayer::updateColorSprite(a1);
CustomizeObjectLayer::updateChannelLabel(a1, a1->m_customColorChannel);
}
}
}