//
// CCMenuItemToggler::selectedTouch from 0x100059b90 to 0x100059c63 (211 bytes)
//
// 1 xrefs:
// > CCMenuItemToggler::init @ 0x1000598c1
//
// 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 CCMenuItemToggler::selectedTouch(CCMenuItemToggler *a1, cocos2d::CCObject *a2)
{
__int64 v3; // rdi
__int64 v4; // rax
__int64 v5; // [rsp-28h] [rbp-28h] BYREF
float v6[8]; // [rsp-20h] [rbp-20h] BYREF
if ( !a1->m_notClickable )
{
a1->m_toggled = 0;
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_offButton->setVisible)(a1->m_offButton, 1);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_onButton->setVisible)(a1->m_onButton, 0);
v3 = *((_QWORD *)&a1->m_offButton + a1->m_toggled);
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 312LL))(v3);
sub_10028CFC0(v6, v4);
((void (__fastcall *)(CCMenuItemToggler *, float *))a1->setContentSize)(a1, v6);
sub_10028CBE0(&v5, v6[0] * 0.5, 0.5 * v6[1]);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *))a1->m_offButton->setPosition)(a1->m_offButton, &v5);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *))a1->m_onButton->setPosition)(a1->m_onButton, &v5);
}
}