//
// CCTextInputNode::keyboardWillShow from 0x10016d4fc to 0x10016d5c8 (204 bytes)
//
// 2 xrefs:
// > sub_10016D644 @ 0x10016d648
// > ??> @ 0x10079fa70
//
// 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::keyboardWillShow(CCTextInputNode *a1, cocos2d::CCIMEKeyboardNotificationInfo *a2)
{
cocos2d::CCTextFieldTTF *m_textField; // x0
__int64 *v5; // x0
float v6; // s0
float v7; // s8
float v8; // s0
TextInputDelegate *m_delegate; // x0
__int64 v10; // [xsp+8h] [xbp-38h] BYREF
_QWORD v11[2]; // [xsp+10h] [xbp-30h] BYREF
if ( !a1->m_forceOffset )
{
m_textField = a1->m_textField;
if ( m_textField )
{
if ( a1->m_selected )
{
v5 = (__int64 *)((__int64 (__fastcall *)(cocos2d::CCTextFieldTTF *))m_textField->getAnchorPoint)(m_textField);
v6 = sub_1000229B8(&v10, v5);
sub_10016D5C8(v11, a1, &v10, v6);
*((float *)v11 + 1) = *((float *)v11 + 1) + -4.0;
if ( sub_100022CB0((float *)v11, (float *)&a2->end.origin) )
{
a1->m_unknown2 = 1;
v7 = sub_100022C48((__int64)&a2->end);
v8 = sub_100022C58((__int64)v11);
m_delegate = a1->m_delegate;
if ( m_delegate )
((void (__fastcall *)(TextInputDelegate *, CCTextInputNode *, float))m_delegate->textInputShouldOffset)(
m_delegate,
a1,
v7 - v8);
}
}
}
}
}