//
// GameSettingsLayer::onCustomButton from 0x710b68 to 0x710c3c (212 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:57:44 +0000
//
int __fastcall GameSettingsLayer::onCustomButton(GameSettingsLayer *this, cocos2d::CCObject *a2)
{
int result; // r0
int *v4; // r0
int *v5; // r0
int *v6; // r5
int v7; // r0
int v8; // r0
int *v9; // r0
GameSettingsLayer *v10; // r1
int v11[3]; // [sp+8h] [bp-10h] BYREF
result = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
switch ( result )
{
case -1003:
v8 = GJKeybindManager::sharedState((GJKeybindManager *)0xFFFFFC15);
if ( *(_BYTE *)(v8 + 116) )
{
memset(v11, 0, sizeof(v11));
std::string::__init(
v11,
"You cannot edit Global Controls while Custom Level Controls are active.",
0x57u);
v9 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Keybinds", (int)v11, (ButtonSprite *)"OK", nullptr);
(*(void (__fastcall **)(int *))(*v9 + 656))(v9);
return std::string::~string((int)v11);
}
GameSettingsLayer::toggleVisibility(this, *(unsigned __int8 *)(v8 + 116));
v4 = KeybindingsLayer::create(this, v10);
break;
case -1001:
v5 = GJSongBrowser::create((GJSongBrowser *)0xFFFFFC17);
v5[118] = (int)this + 752;
v6 = v5;
v7 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v5);
(*(void (__fastcall **)(_DWORD, int *, int))(**(_DWORD **)(v7 + 220) + 232))(*(_DWORD *)(v7 + 220), v6, 106);
return (*(int (__fastcall **)(int *, _DWORD))(*v6 + 664))(v6, 0);
case -1004:
v4 = (int *)ClearPlatformerSavesPopup::create((ClearPlatformerSavesPopup *)0xFFFFFC14);
break;
default:
return result;
}
return (*(int (__fastcall **)(int *))(*v4 + 656))(v4);
}