//
// EditorUI::toggleMode from 0x1400e4e90 to 0x1400e4f63 (211 bytes)
//
// 11 xrefs:
// > EditorUI::init @ 0x1400e09b7
// > EditorUI::onPlaytest @ 0x14011211a
// > EditorUI::keyDown @ 0x1401258ae
// > EditorUI::keyDown @ 0x1401258cb
// > EditorUI::keyDown @ 0x1401258e8
// > EditorUI::init @ 0x1400dfc0b
// > EditorUI::init @ 0x1400dfc55
// > EditorUI::init @ 0x1400dfc9f
// > ??> @ 0x14066e88c
// > ??> @ 0x14066e89c
// > ??> @ 0x1406c8cac
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void EditorUI::toggleMode(EditorUI *a1, cocos2d::CCObject *a2)
{
int v3; // eax
int m_selectedMode; // eax
cocos2d::CCNode *v5; // rbx
cocos2d::CCNode_vtbl *v6; // rdi
cocos2d::CCSpriteFrameCache *v7; // rax
const char *v8; // rdx
struct cocos2d::CCSpriteFrame *v9; // rax
v3 = a2->getTag(a2);
if ( a1->m_selectedMode != v3 )
{
a1->m_selectedMode = v3;
EditorUI::resetUI(a1);
m_selectedMode = a1->m_selectedMode;
switch ( m_selectedMode )
{
case 1:
v5 = a1->m_deleteModeBtn->getNormalImage(a1->m_deleteModeBtn);
v6 = v5->__vftable;
v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = "edit_deleteSBtn_001.png";
break;
case 2:
v5 = a1->m_buildModeBtn->getNormalImage(a1->m_buildModeBtn);
v6 = v5->__vftable;
v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = "edit_buildSBtn_001.png";
break;
case 3:
v5 = a1->m_editModeBtn->getNormalImage(a1->m_editModeBtn);
v6 = v5->__vftable;
v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = "edit_editSBtn_001.png";
break;
default:
return;
}
v9 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, v8);
((void (__fastcall *)(cocos2d::CCNode *, struct cocos2d::CCSpriteFrame *))v6[1].setScaleX)(v5, v9);
}
}