//
// BrowseSmartKeyLayer::onButton from 0x1004e62a0 to 0x1004e6316 (118 bytes)
//
// 1 xrefs:
// > BrowseSmartKeyLayer::init @ 0x1004e5ee0
//
// This function is hookable on this platform (idp: pc, 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 12:31:20 +0000
//
__int64 __fastcall BrowseSmartKeyLayer::onButton(__int64 a1, __int64 a2)
{
__int64 result; // rax
result = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) - 1;
switch ( (int)result )
{
case 0:
result = BrowseSmartKeyLayer::createTemplateObjects(a1);
break;
case 1:
result = BrowseSmartKeyLayer::deletedSelectedItems(a1);
break;
case 2:
result = BrowseSmartKeyLayer::addChanceToSelected(a1, 0, 1);
break;
case 3:
result = BrowseSmartKeyLayer::addChanceToSelected(a1, 10, 0);
break;
default:
return result;
}
return result;
}