//
// EditorUI::onPause from 0x6962c0 to 0x696468 (424 bytes)
//
// 5 xrefs:
// > EditorUI::keyBackClicked @ 0x69646c
// > EditorUI::keyDown @ 0x6c5930
// > ??> @ 0x9b148
// > EditorUI::init @ 0x6bcea8
// > ??> @ 0x122d4a8
//
// 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::onPause(EditorUI *a1, cocos2d::CCObject *a2)
{
LevelEditorLayer *m_editorLayer; // x0
unsigned int v4; // w19
LevelEditorLayer *v5; // x0
GJGameLevel *m_level; // x23
const cocos2d::CCPoint *v7; // x0
float v8; // s0
float v9; // s1
LevelEditorLayer *v10; // x0
GJGameLevel *v11; // x21
float v12; // s0
LevelEditorLayer *v13; // x1
EditButtonBar *m_createButtonBar; // x0
GJGameLevel *v15; // x21
int Page; // w0
LevelEditorLayer *v17; // x1
GJGameLevel *v18; // x0
int m_selectedTab; // w2
EditButtonBar *v20; // x0
GJGameLevel *v21; // x21
int v22; // w0
int v23; // w2
cocos2d::CCNode *v24; // x0
float v25; // s0
EditorPauseLayer *v26; // [xsp+48h] [xbp+48h]
cocos2d::CCPoint v27; // [xsp+50h] [xbp+50h] BYREF
if ( !a1->m_isPaused )
{
m_editorLayer = a1->m_editorLayer;
if ( m_editorLayer->m_playbackMode == Not )
{
v25 = m_editorLayer->m_objectLayer->getScale(m_editorLayer->m_objectLayer);
m_editorLayer = a1->m_editorLayer;
a1->m_editorZoom = v25;
}
LevelEditorLayer::updateKeyframeObjects(m_editorLayer);
v4 = 0;
EditorUI::onStopPlaytest(a1, nullptr);
EditorUI::updatePlaybackBtn(a1);
v5 = a1->m_editorLayer;
m_level = v5->m_level;
v7 = v5->m_objectLayer->getPosition(v5->m_objectLayer);
cocos2d::CCPoint::CCPoint(&v27, v7);
cocos2d::CCPoint::operator=(&m_level->m_lastCameraPos, v8, v9);
v10 = a1->m_editorLayer;
v11 = v10->m_level;
v12 = v10->m_objectLayer->getScale(v10->m_objectLayer);
v13 = a1->m_editorLayer;
m_createButtonBar = a1->m_createButtonBar;
v11->m_lastEditorZoom = v12;
v15 = v13->m_level;
Page = EditButtonBar::getPage(m_createButtonBar);
v17 = a1->m_editorLayer;
v15->m_lastBuildPage = Page;
v18 = v17->m_level;
m_selectedTab = a1->m_selectedTab;
v18->m_lastBuildGroupID = v17->m_currentLayer;
v18->m_lastBuildTab = m_selectedTab;
while ( v4 < (unsigned int)cocos2d::CCArray::count(a1->m_createButtonBars) )
{
v20 = (EditButtonBar *)cocos2d::CCArray::objectAtIndex(a1->m_createButtonBars, v4);
v21 = a1->m_editorLayer->m_level;
v22 = EditButtonBar::getPage(v20);
v23 = v4++;
GJGameLevel::setLastBuildPageForTab(v21, v22, v23);
}
v26 = EditorPauseLayer::create(a1->m_editorLayer);
v24 = a1->getParent(a1);
v24->addChild_0(v24, v26, 100);
EditorUI::toggleLockUI(a1, 1);
}
}