// // CCTextInputNode::refreshLabel from 0x10009ebc0 to 0x10009eddf (543 bytes) // // 6 xrefs: // > CCTextInputNode::updateLabel @ 0x10009e7c8 // > CCTextInputNode::setMaxLabelScale @ 0x10009ee0d // > CCTextInputNode::setMaxLabelWidth @ 0x10009ee2d // > CCTextInputNode::setLabelPlaceholderScale @ 0x10009ee4d // > CCTextInputNode::setLabelPlaceholderColor @ 0x10009ee76 // > CCTextInputNode::setLabelNormalColor @ 0x10009ee96 // // 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) { double v1; // xmm0_8 const char *v3; // r15 size_t v4; // rax size_t v5; // r14 char *v6; // r12 size_t v7; // r13 size_t v8; // r15 cocos2d::CCLabelBMFont *m_textLabel; // r14 float *v10; // rax TextArea *m_textArea; // rdi int v12; // eax int b; // esi size_t __dst; // [rsp+8h] [rbp-48h] BYREF size_t v15; // [rsp+10h] [rbp-40h] void *__p; // [rsp+18h] [rbp-38h] float m_maxLabelWidth; // [rsp+24h] [rbp-2Ch] if ( !a1->m_textLabel && !a1->m_textArea ) return; v3 = (const char *)((__int64 (__fastcall *)(cocos2d::CCTextFieldTTF *))a1->m_textField->getString)(a1->m_textField); v4 = strlen(v3); if ( v4 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v1); v5 = v4; if ( v4 >= 0x17 ) { v7 = 26; if ( (v4 | 7) != 0x17 ) v7 = (v4 | 7) + 1; v6 = (char *)operator new(v7); __p = v6; __dst = v7 + 1; v15 = v5; goto LABEL_10; } LOBYTE(__dst) = 2 * v4; v6 = (char *)&__dst + 1; if ( v4 ) LABEL_10: memmove(v6, v3, v5); v6[v5] = 0; v8 = (unsigned __int8)__dst >> 1; if ( (__dst & 1) == 0 ) { m_textLabel = a1->m_textLabel; if ( m_textLabel ) goto LABEL_13; LABEL_21: m_textArea = a1->m_textArea; if ( m_textArea ) { if ( v8 ) { v12 = *(unsigned __int16 *)&a1->m_textColor.r; b = a1->m_textColor.b; } else { v12 = *(unsigned __int16 *)&a1->m_placeholderColor.r; b = a1->m_placeholderColor.b; } TextArea::colorAllLabels(m_textArea, (cocos2d::ccColor3B)(v12 | (b << 16))); } return; } v8 = v15; operator delete(__p); m_textLabel = a1->m_textLabel; if ( !m_textLabel ) goto LABEL_21; LABEL_13: if ( v8 || a1->m_placeholderScale <= 0.0 ) { m_maxLabelWidth = a1->m_maxLabelWidth; v10 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->getContentSize)(m_textLabel); if ( (float)(m_maxLabelWidth / *v10) <= a1->m_maxLabelScale ) { m_maxLabelWidth = a1->m_maxLabelWidth; ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_textLabel->getContentSize)(a1->m_textLabel); } ((void (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->setScale)(m_textLabel); if ( v8 ) { ((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::ccColor3B *))a1->m_textLabel->setColor)( a1->m_textLabel, &a1->m_textColor); return; } } else { ((void (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->setScale)(m_textLabel); } ((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::ccColor3B *))a1->m_textLabel->setColor)( a1->m_textLabel, &a1->m_placeholderColor); }