//
// DeathTrackerPopup::onPanelButton from 0xcb5b28 to 0xcb5c8c (356 bytes)
//
// 3 xrefs:
// > ??> @ 0xdad10
// > DeathTrackerPopup::init @ 0xcb5008
// > ??> @ 0x15468c8
//
// 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:06:12 +0000
//
__int64 __fastcall DeathTrackerPopup::onPanelButton(DeathTrackerPopup *this, cocos2d::CCObject *a2)
{
__int64 result; // x0
int v4; // w1
int v5; // w2
result = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
v4 = (int)result / 10;
v5 = (int)result % 10;
if ( *((_BYTE *)this + 920) )
{
if ( v5 <= 1 && !v4 )
{
result = v5 == 1;
if ( *((unsigned __int8 *)this + 977) != (_DWORD)result )
{
*((_BYTE *)this + 977) = result;
return DeathTrackerPopup::refreshView(this);
}
}
}
else if ( v4 )
{
result = *((unsigned int *)this + 182);
if ( v4 == 1 )
{
if ( (_DWORD)result != 3 )
{
if ( (_DWORD)result != 2 || (result = *((unsigned __int8 *)this + 986), !*((_BYTE *)this + 986)) )
{
*((_DWORD *)this + 185) = v5;
if ( v5 )
*((_BYTE *)this + 744) = 0;
*((_BYTE *)this + 745) = 1;
return DeathTrackerPopup::refreshView(this);
}
}
}
else if ( (_DWORD)result )
{
if ( v5 <= 1 && (_DWORD)result == 2 )
{
result = v5 == 0;
if ( *((unsigned __int8 *)this + 986) != (_DWORD)result )
{
*((_BYTE *)this + 986) = result;
return DeathTrackerPopup::setView(this, 2);
}
}
}
else
{
*((_BYTE *)this + 744) = v5 == 1;
*((_BYTE *)this + 745) = 1;
return DeathTrackerPopup::refreshView(this);
}
}
else
{
DeathTrackerPopup::setView(this, *((_DWORD *)&qword_11A2820 + v5 + 4));
return DeathTrackerPopup::refreshView(this);
}
return result;
}