// // EditorOptionsLayer::setupOptions from 0x10029dd30 to 0x10029e5fa (2250 bytes) // // 1 xrefs: // > @ 0x1008fec18 // // 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 __fastcall EditorOptionsLayer::setupOptions(EditorOptionsLayer *a1) { GameManager *v2; // rax GameManager *v3; // rax cocos2d::CCLabelBMFont *v4; // r15 cocos2d::CCArray *v5; // r14 cocos2d::CCString *v6; // rax const char *CString; // rax cocos2d::CCLabelBMFont *v8; // rax cocos2d::CCSprite *v9; // r13 CCMenuItemSpriteExtra *v10; // r13 cocos2d::CCMenu *m_buttonMenu; // r12 cocos2d::CCSprite *v12; // r14 CCMenuItemSpriteExtra *v13; // r15 cocos2d::CCMenu *v14; // r14 cocos2d::CCLabelBMFont *v15; // r15 cocos2d::CCArray *v16; // r14 cocos2d::CCString *v17; // rax const char *v18; // rax cocos2d::CCLabelBMFont *v19; // rax cocos2d::CCSprite *v20; // r14 CCMenuItemSpriteExtra *v21; // r13 cocos2d::CCMenu *v22; // r14 cocos2d::CCSprite *v23; // r14 CCMenuItemSpriteExtra *v24; // r15 cocos2d::CCMenu *v25; // rbx unsigned __int64 v26; // [rsp+0h] [rbp-60h] BYREF float v27[2]; // [rsp+8h] [rbp-58h] BYREF unsigned __int64 v28; // [rsp+10h] [rbp-50h] BYREF unsigned __int64 v29; // [rsp+18h] [rbp-48h] BYREF unsigned __int64 v30; // [rsp+20h] [rbp-40h] BYREF unsigned __int64 v31; // [rsp+28h] [rbp-38h] BYREF cocos2d::CCArray *v32; // [rsp+30h] [rbp-30h] double v33; // 0:xmm0_8.8 double v34; // 0:xmm0_8.8 double v35; // 0:xmm0_8.8 double v36; // 0:xmm0_8.8 a1->m_offset = 15.0; a1->m_togglesPerPage = 12; GJOptionsLayer::addGVToggle(a1, "Draw Trigger Boxes", "0044", "Draws the hitbox for touch triggered objects."); GJOptionsLayer::addGVToggle( a1, "Playtest No UI", "0046", "Hides part of the editor's user interface during playtesting."); GJOptionsLayer::addGVToggle(a1, "Playtest Music", "0002", "Plays music during playtesting."); GJOptionsLayer::addGVToggle( a1, "Effect Lines", "0043", "Shows a vertical line for triggers to indicate where they are activated."); GJOptionsLayer::addGVToggle( a1, "Duration Lines", "0058", "Shows a horizontal line for triggers to indicate how long they are active."); GJOptionsLayer::addGVToggle(a1, "Grid On Top", "0039", "Shows the grid on top of objects in editor."); GJOptionsLayer::addGVToggle(a1, "Playtest No Grid", "0079", "Hides grid during playtesting."); GJOptionsLayer::addGVToggle(a1, "Hide Background", "0078", "Hides background in editor."); GJOptionsLayer::addGVToggle( a1, "Enable Link Controls", "0097", "Enables option to link objects together in the editor. Linked objects are always selected and deleted together."); GJOptionsLayer::addGVToggle( a1, "Hold To Swipe", "0057", "Enables swiping after holding down anywhere on the grid for a short duration. Useful when selecting objects without " "the need to toggle swiping manually."); a1->m_toggleCount = a1->m_togglesPerPage + a1->m_toggleCount - a1->m_toggleCount % a1->m_togglesPerPage; GJOptionsLayer::addGVToggle( a1, "Swipe Cycle Mode", "0059", "Cycles through touched objects instead of adding to selection when tapping in the same position while swiping is ena" "bled. Useful if you want to select multiple objects that are mixed with other objects."); GJOptionsLayer::addGVToggle( a1, "Layer Locking", "0103", "Allows you to click on the editor layer number to lock and unlock a layer."); GJOptionsLayer::addGVToggle(a1, "Show Clicks", "0149", "Shows a marker during playtesting when the player clicks."); GJOptionsLayer::addGVToggle( a1, "Auto-Pause", "0150", "Pauses gameplay when starting from a start position to prepare gameplay. Click a second time to actually start playi" "ng. This is used to handle start lag in larger levels."); GJOptionsLayer::addGVToggle(a1, "Hide Path", "0152", "Hides the player path from playtesting."); GJOptionsLayer::addGVToggle( a1, "Start Optimization", "0151", "Tries to speed up start position loading in editor. Experimental."); GJOptionsLayer::addGVToggle(a1, "Hide Particle Icons", "0137", "Hides particle icons while preview mode is enabled."); GJOptionsLayer::addGVToggle( a1, "Increase Undo/Redo", "0013", "Increases maximum undo and redo limit from 200 to 1000 in editor."); GJOptionsLayer::addGVToggle(a1, "Playtest Smooth Fix", "0102", "Enables smooth fix when playtesting in the editor."); GJOptionsLayer::addGVToggle( a1, "Increase Scale", "0112", "Increases maximum object scale to 4x and minimum scale to 0.25x. Note that objects larger than 6x grid size may disa" "ppear near the screen edge. This may be fixed in the future."); GJOptionsLayer::addGVToggle( a1, "Disable Paste State Groups", "0156", "Makes it so that pasting state no longer updates the group info of the target object(s). Group state can be pasted d" "irectly on the edit group page instead."); GJOptionsLayer::addGVToggle( a1, "Small Warp Buttons", "0169", "Warp control buttons are 50% smaller. (Restart editor)"); GJOptionsLayer::addGVToggle( a1, "Static Trace Arrows", "0181", "Disable the arrows showing directed connections when using Trace In/Out."); v32 = GJOptionsLayer::objectsForPage(a1, 0); v2 = GameManager::sharedState(); a1->m_buttonsPerRow = GameManager::getIntGameVariable(v2, "0049"); v3 = GameManager::sharedState(); a1->m_buttonRows = GameManager::getIntGameVariable(v3, "0050"); cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v27); sub_10028CBE0((float *)&v28, (float)(v27[0] * 0.5) + -100.0, (float)(v27[1] * 0.5) + -115.0); v4 = cocos2d::CCLabelBMFont::create_3("Buttons Per Row", "goldFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v4->setScale)(v4, 0.5); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v4, 2); sub_10028CBE0((float *)&v30, 0.0, 30.0); sub_10028CCE0((double *)&v31, &v28, &v30); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v4->setPosition)(v4, &v31); v5 = v32; sub_10071FCD0(v32, v4); v6 = (cocos2d::CCString *)sub_1007AB580("%i", v26); CString = cocos2d::CCString::getCString(v6); v8 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt"); a1->m_buttonsPerRowLabel = v8; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v8, 2); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))a1->m_buttonsPerRowLabel->setPosition)( a1->m_buttonsPerRowLabel, &v28); sub_10071FCD0(v5, a1->m_buttonsPerRowLabel); v9 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); cocos2d::CCSprite::setFlipX(v9, 1); ((void (__fastcall *)(cocos2d::CCSprite *, float))v9->setScale)(v9, 0.80000001); v10 = CCMenuItemSpriteExtra::create( v9, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditorOptionsLayer::onButtonsPerRow); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v10); m_buttonMenu = a1->m_buttonMenu; sub_10028CBE0((float *)&v29, 40.0, 0.0); sub_10028CCE0((double *)&v30, &v28, &v29); *(cocos2d::CCPoint *)&v33 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v31, (const cocos2d::CCPoint *)m_buttonMenu); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v10->setPosition)(v10, &v31, v33); CCMenuItemSpriteExtra::setSizeMult(v10, 2.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v10->setTag)(v10, 1); sub_10071FCD0(v32, v10); v12 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v12->setScale)(v12, 0.80000001); v13 = CCMenuItemSpriteExtra::create( v12, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditorOptionsLayer::onButtonsPerRow); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v13); v14 = a1->m_buttonMenu; sub_10028CBE0((float *)&v29, -40.0, 0.0); sub_10028CCE0((double *)&v30, &v28, &v29); *(cocos2d::CCPoint *)&v34 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v31, (const cocos2d::CCPoint *)v14); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v13->setPosition)(v13, &v31, v34); CCMenuItemSpriteExtra::setSizeMult(v13, 2.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v13->setTag)(v13, 0); sub_10071FCD0(v32, v13); sub_10028CBE0((float *)&v31, (float)(v27[0] * 0.5) + 100.0, *((float *)&v28 + 1)); v15 = cocos2d::CCLabelBMFont::create_3("Button Rows", "goldFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v15->setScale)(v15, 0.5); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v15, 2); sub_10028CBE0((float *)&v29, 0.0, 30.0); sub_10028CCE0((double *)&v30, &v31, &v29); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v15->setPosition)(v15, &v30); v16 = v32; sub_10071FCD0(v32, v15); v17 = (cocos2d::CCString *)sub_1007AB580("%i", v26); v18 = cocos2d::CCString::getCString(v17); v19 = cocos2d::CCLabelBMFont::create_3(v18, "goldFont.fnt"); a1->m_buttonRowsLabel = v19; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v19, 2); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))a1->m_buttonRowsLabel->setPosition)( a1->m_buttonRowsLabel, &v31); sub_10071FCD0(v16, a1->m_buttonRowsLabel); v20 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png"); cocos2d::CCSprite::setFlipX(v20, 1); ((void (__fastcall *)(cocos2d::CCSprite *, float))v20->setScale)(v20, 0.80000001); v21 = CCMenuItemSpriteExtra::create( v20, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditorOptionsLayer::onButtonRows); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v21); v22 = a1->m_buttonMenu; sub_10028CBE0((float *)&v26, 40.0, 0.0); sub_10028CCE0((double *)&v29, &v31, &v26); *(cocos2d::CCPoint *)&v35 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v30, (const cocos2d::CCPoint *)v22); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v21->setPosition)(v21, &v30, v35); CCMenuItemSpriteExtra::setSizeMult(v21, 2.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v21->setTag)(v21, 1); sub_10071FCD0(v32, v21); v23 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v23->setScale)(v23, 0.80000001); v24 = CCMenuItemSpriteExtra::create( v23, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditorOptionsLayer::onButtonRows); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v24); v25 = a1->m_buttonMenu; sub_10028CBE0((float *)&v26, -40.0, 0.0); sub_10028CCE0((double *)&v29, &v31, &v26); *(cocos2d::CCPoint *)&v36 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v30, (const cocos2d::CCPoint *)v25); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v24->setPosition)(v24, &v30, v36); CCMenuItemSpriteExtra::setSizeMult(v24, 2.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v24->setTag)(v24, 0); sub_10071FCD0(v32, v24); }