//
// EditorOptionsLayer::setupOptions from 0x4b465c to 0x4b4d84 (1832 bytes)
//
// 0 xrefs:
//
// 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 EditorOptionsLayer::setupOptions(EditorOptionsLayer *a1)
{
GameManager *v2; // r0
GameManager *v3; // r0
cocos2d::CCDirector *v4; // r0
cocos2d::CCLabelBMFont *v5; // r5
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
cocos2d::CCString *v7; // r0
cocos2d::CCLabelBMFont *v8; // r0
cocos2d::CCSprite *v9; // r6
CCMenuItemSpriteExtra *v10; // r6
cocos2d::CCSprite *v11; // r6
CCMenuItemSpriteExtra *v12; // r11
cocos2d::CCMenu *v13; // r10
void (__fastcall *v14)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
cocos2d::CCLabelBMFont *v15; // r10
void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
cocos2d::CCString *v17; // r0
cocos2d::CCLabelBMFont *v18; // r0
cocos2d::CCSprite *v19; // r9
CCMenuItemSpriteExtra *v20; // r11
cocos2d::CCSprite *v21; // r10
CCMenuItemSpriteExtra *v22; // r7
cocos2d::CCMenu *v23; // r4
void (__fastcall *v24)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCArray *v25; // [sp+10h] [bp-5Ch]
char *v26; // [sp+14h] [bp-58h]
cocos2d::CCMenu *v27; // [sp+18h] [bp-54h]
void (__fastcall *v28)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+1Ch] [bp-50h]
cocos2d::CCMenu *m_buttonMenu; // [sp+20h] [bp-4Ch]
cocos2d::CCSize v30; // [sp+2Ch] [bp-40h] BYREF
cocos2d::CCPoint v31; // [sp+34h] [bp-38h] BYREF
cocos2d::CCPoint v32; // [sp+3Ch] [bp-30h] BYREF
cocos2d::CCPoint v33; // [sp+44h] [bp-28h] BYREF
cocos2d::CCPoint v34; // [sp+4Ch] [bp-20h] BYREF
cocos2d::CCPoint v35; // [sp+54h] [bp-18h] BYREF
void (*v36)(EditorOptionsLayer *, cocos2d::CCObject *); // [sp+5Ch] [bp-10h]
int v37; // [sp+60h] [bp-Ch]
cocos2d::CCPoint v38; // [sp+64h] [bp-8h] BYREF
cocos2d::CCPoint v39; // [sp+6Ch] [bp+0h] BYREF
cocos2d::CCPoint v40; // [sp+74h] [bp+8h] BYREF
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.");
GJOptionsLayer::offsetToNextPage(a1);
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.");
v25 = GJOptionsLayer::objectsForPage(a1, 0);
v2 = GameManager::sharedState();
a1->m_buttonsPerRow = GameManager::getIntGameVariable(v2, "0049");
v3 = GameManager::sharedState();
a1->m_buttonRows = GameManager::getIntGameVariable(v3, "0050");
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v30, v4);
cocos2d::CCPoint::CCPoint(&v31, (float)(v30.width * 0.5) - 100.0, (float)(v30.height * 0.5) - 115.0);
v5 = cocos2d::CCLabelBMFont::create();
v5->setScale(v5, 0.5);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v5, 2);
setPosition = v5->setPosition;
cocos2d::CCPoint::CCPoint(&v39, 0.0, 30.0);
cocos2d::CCPoint::operator+(&v40, &v31, &v39);
setPosition(v5, &v40);
cocos2d::CCArray::addObject(v25, v5);
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)a1->m_buttonsPerRow);
cocos2d::CCString::getCString(v7);
v8 = cocos2d::CCLabelBMFont::create();
a1->m_buttonsPerRowLabel = v8;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v8, 2);
a1->m_buttonsPerRowLabel->setPosition(a1->m_buttonsPerRowLabel, &v31);
cocos2d::CCArray::addObject(v25, a1->m_buttonsPerRowLabel);
v9 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
cocos2d::CCSprite::setFlipX(v9, 1);
((void (__fastcall *)(cocos2d::CCSprite *, int))v9->setScale)(v9, 1061997773);
v36 = EditorOptionsLayer::onButtonsPerRow;
v37 = 0;
v10 = CCMenuItemSpriteExtra::create(
v9,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(EditorOptionsLayer::onButtonsPerRow, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v10);
v28 = v10->setPosition;
m_buttonMenu = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v38, 40.0, 0.0);
cocos2d::CCPoint::operator+(&v39, &v31, &v38);
cocos2d::CCNode::convertToNodeSpace(&v40, m_buttonMenu, &v39);
v28(v10, &v40);
CCMenuItemSpriteExtra::setSizeMult(v10, 2.0);
v10->setTag(v10, 1);
cocos2d::CCArray::addObject(v25, v10);
v11 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, int))v11->setScale)(v11, 1061997773);
LODWORD(v38.x) = EditorOptionsLayer::onButtonsPerRow;
v38.y = 0.0;
v12 = CCMenuItemSpriteExtra::create(
v11,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(EditorOptionsLayer::onButtonsPerRow, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v12);
v13 = a1->m_buttonMenu;
v14 = v12->setPosition;
cocos2d::CCPoint::CCPoint(&v35, -40.0, 0.0);
cocos2d::CCPoint::operator+(&v39, &v31, &v35);
cocos2d::CCNode::convertToNodeSpace(&v40, v13, &v39);
v14(v12, &v40);
CCMenuItemSpriteExtra::setSizeMult(v12, 2.0);
v12->setTag(v12, 0);
cocos2d::CCArray::addObject(v25, v12);
cocos2d::CCPoint::CCPoint(&v32, (float)(v30.width * 0.5) + 100.0, v31.y);
v15 = cocos2d::CCLabelBMFont::create();
v15->setScale(v15, 0.5);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v15, 2);
v16 = v15->setPosition;
cocos2d::CCPoint::CCPoint(&v39, 0.0, 30.0);
cocos2d::CCPoint::operator+(&v40, &v32, &v39);
v16(v15, &v40);
cocos2d::CCArray::addObject(v25, v15);
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)a1->m_buttonRows);
cocos2d::CCString::getCString(v17);
v18 = cocos2d::CCLabelBMFont::create();
a1->m_buttonRowsLabel = v18;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v18, 2);
a1->m_buttonRowsLabel->setPosition(a1->m_buttonRowsLabel, &v32);
cocos2d::CCArray::addObject(v25, a1->m_buttonRowsLabel);
v19 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png");
cocos2d::CCSprite::setFlipX(v19, 1);
((void (__fastcall *)(cocos2d::CCSprite *, int))v19->setScale)(v19, 1061997773);
LODWORD(v39.x) = EditorOptionsLayer::onButtonRows;
v39.y = 0.0;
v20 = CCMenuItemSpriteExtra::create(
v19,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(EditorOptionsLayer::onButtonRows, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v20);
v26 = (char *)v20->setPosition;
v27 = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v34, 40.0, 0.0);
cocos2d::CCPoint::operator+(&v35, &v32, &v34);
cocos2d::CCNode::convertToNodeSpace(&v40, v27, &v35);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v26)(v20, &v40);
CCMenuItemSpriteExtra::setSizeMult(v20, 2.0);
v20->setTag(v20, 1);
cocos2d::CCArray::addObject(v25, v20);
v21 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, int))v21->setScale)(v21, 1061997773);
LODWORD(v40.x) = EditorOptionsLayer::onButtonRows;
v40.y = 0.0;
v22 = CCMenuItemSpriteExtra::create(
v21,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(EditorOptionsLayer::onButtonRows, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v22);
v23 = a1->m_buttonMenu;
v24 = v22->setPosition;
cocos2d::CCPoint::CCPoint(&v33, -40.0, 0.0);
cocos2d::CCPoint::operator+(&v34, &v32, &v33);
cocos2d::CCNode::convertToNodeSpace(&v35, v23, &v34);
v24(v22, &v35);
CCMenuItemSpriteExtra::setSizeMult(v22, 2.0);
v22->setTag(v22, 0);
cocos2d::CCArray::addObject(v25, v22);
}