//
// EditorUI::toggleMode from 0x100007da0 to 0x100007e45 (165 bytes)
//
// 7 xrefs:
// > EditorUI::init @ 0x10000677c
// > EditorUI::onPlaytest @ 0x1000087f7
// > EditorUI::handleEditorAction @ 0x10060c5d7
// > EditorUI::init @ 0x1000057f5
// > EditorUI::init @ 0x100005888
// > EditorUI::init @ 0x100005914
// > EditorUI::init @ 0x1000059a0
//
// 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:18:48 +0000
//
__int64 __fastcall EditorUI::toggleMode(__int64 a1, __int64 a2)
{
__int64 result; // rax
int v3; // r14d
unsigned int v4; // r14d
unsigned int v5; // r15d
__int64 v6; // rax
__int64 v7; // rdi
__int64 v8; // rax
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( *(_DWORD *)(a1 + 1436) != (_DWORD)result )
{
v3 = result;
*(_DWORD *)(a1 + 1436) = result;
EditorUI::resetUI(a1);
v4 = v3 - 1;
v5 = 169;
if ( v4 <= 3 )
v5 = dword_100A038C0[v4];
v6 = EditorSFXManager::sharedState();
EditorSFXManager::playAction(v6, v5, 169);
result = (unsigned int)(*(_DWORD *)(a1 + 1436) - 1);
if ( (unsigned int)result <= 3 )
{
v7 = *(_QWORD *)(a1 + 8LL * (unsigned int)result + 920);
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 1072LL))(v7);
return ButtonSprite::updateBGImage(v8, "GJ_button_02.png");
}
}
return result;
}