//
// cocos2d::extension::CCControlButton::setHighlighted from 0xd0dff4 to 0xd0e0e8 (244 bytes)
//
// 3 xrefs:
// > ??> @ 0xbe450
// > ??> @ 0x150a980
// > ??> @ 0x1510100
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:07:01 +0000
//
__int64 __fastcall cocos2d::extension::CCControlButton::setHighlighted(
cocos2d::extension::CCControlButton *this,
char a2)
{
int v2; // w2
cocos2d::CCAction *ActionByTag; // x1
__int64 result; // x0
cocos2d::CCScaleTo *v6; // x0
float v7; // s1
cocos2d::CCAction *v8; // x20
if ( a2 )
v2 = 2;
else
v2 = 1;
*((_DWORD *)this + 107) = v2;
cocos2d::extension::CCControl::setHighlighted(this, a2);
ActionByTag = (cocos2d::CCAction *)cocos2d::CCNode::getActionByTag(this, -859111423);
if ( ActionByTag )
cocos2d::CCNode::stopAction(this, ActionByTag);
(*(void (__fastcall **)(cocos2d::extension::CCControlButton *))(*(_QWORD *)this + 1312LL))(this);
result = *((unsigned __int8 *)this + 512);
if ( *((_BYTE *)this + 512) )
{
v6 = (cocos2d::CCScaleTo *)(*(unsigned __int8 (__fastcall **)(cocos2d::extension::CCControlButton *))(*(_QWORD *)this + 1304LL))(this);
if ( (_BYTE)v6
&& (v6 = (cocos2d::CCScaleTo *)(*(unsigned __int8 (__fastcall **)(cocos2d::extension::CCControlButton *))(*(_QWORD *)this + 1272LL))(this),
(_BYTE)v6)
&& (v6 = (cocos2d::CCScaleTo *)(*(unsigned __int8 (__fastcall **)(cocos2d::extension::CCControlButton *))(*(_QWORD *)this + 1288LL))(this),
!(_BYTE)v6) )
{
v7 = 1.1;
}
else
{
v7 = 1.0;
}
v8 = (cocos2d::CCAction *)cocos2d::CCScaleTo::create(v6, 0.05, v7);
(*(void (__fastcall **)(cocos2d::CCAction *, __int64))(*(_QWORD *)v8 + 72LL))(v8, 3435855873LL);
return cocos2d::CCNode::runAction(this, v8);
}
return result;
}