//
// UIPOptionsLayer::ccTouchBegan from 0x1402a61a0 to 0x1402a62ae (270 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405791d0
// > ??> @ 0x1406d20cc
//
// 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
//
bool UIPOptionsLayer::ccTouchBegan(UIPOptionsLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
__int64 v5; // rax
cocos2d::CCRect v7[2]; // [rsp+38h] [rbp-20h] BYREF
struct cocos2d::CCPoint v8; // [rsp+60h] [rbp+8h] BYREF
cocos2d::CCPoint v9; // [rsp+78h] [rbp+20h] BYREF
cocos2d::CCTouch::getLocation(a2);
cocos2d::CCNode::convertToNodeSpace((UIPOptionsLayer *)((char *)a1 - 320), &v8);
if ( a1->m_controlConnected < 0 )
{
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_joystickConnected + 200LL))(*(_QWORD *)&a1->m_joystickConnected);
cocos2d::CCPoint::CCPoint(&v9);
cocos2d::CCRect::CCRect(v7, v9.x - 70.0, v9.y - 25.0, 140.0, 50.0);
if ( cocos2d::CCRect::containsPoint(v7, &v8) )
{
a1->m_controlConnected = a2->m_nId;
cocos2d::CCPoint::operator=(&a1->TextInputDelegate, &v8);
v5 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_joystickConnected + 200LL))(*(_QWORD *)&a1->m_joystickConnected);
cocos2d::CCPoint::operator-(&v8, &v9, v5);
cocos2d::CCPoint::operator=(&a1->ConfigureValuePopupDelegate, &v9);
}
}
return 1;
}