//
// MoreOptionsLayer::init from 0x1000ed6e0 to 0x1000ee824 (4420 bytes)
//
// 1 xrefs:
// > ??> @ 0x100782740
//
// 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
//
bool __fastcall MoreOptionsLayer::init(MoreOptionsLayer *a1)
{
_BOOL4 v2; // w20
GameManager *v3; // x0
cocos2d::CCDirector *v4; // x0
cocos2d::CCLayer *v5; // x0
cocos2d::extension::CCScale9Sprite *v6; // x21
__n128 v7; // q0
__n128 v8; // q1
cocos2d::CCLabelBMFont *v9; // x21
__n128 v10; // q0
__n128 v11; // q1
cocos2d::CCDictionary *v12; // x0
cocos2d::CCDictionary *v13; // x0
cocos2d::CCMenu *v14; // x0
int m_toggleCount; // w8
int v16; // w8
int v17; // w8
int v18; // w8
int v19; // w8
cocos2d::CCArray *v20; // x21
cocos2d::CCSprite *v21; // x0
CCMenuItemSpriteExtra *v22; // x22
__n128 v23; // q0
cocos2d::CCMenu *m_buttonMenu; // x23
__n128 v25; // q1
__n128 v26; // q0
ButtonSprite *v27; // x0
CCMenuItemSpriteExtra *v28; // x22
__n128 v29; // q0
cocos2d::CCMenu *v30; // x23
__n128 v31; // q1
__n128 v32; // q0
cocos2d::CCArray *v33; // x22
cocos2d::CCSprite *v34; // x23
CCMenuItemSpriteExtra *v35; // x23
__n128 v36; // q0
cocos2d::CCMenu *v37; // x24
__n128 v38; // q1
__n128 v39; // q0
__n128 v40; // q0
__n128 v41; // q1
cocos2d::CCLabelBMFont *v42; // x23
__n128 v43; // q0
__n128 v44; // q1
double v45; // d0
__n128 v46; // q0
double v47; // d0
cocos2d::extension::CCScale9Sprite *v48; // x23
__n128 v49; // q0
CCTextInputNode *v50; // x0
CCTextInputNode *m_offsetInput; // x0
CCTextInputNode *v52; // x22
__n128 v53; // q0
CCTextInputNode *v54; // x21
FMODAudioEngine *v55; // x0
cocos2d::CCString *v56; // x0
char *CString; // x0
cocos2d::CCSprite *v58; // x0
CCMenuItemSpriteExtra *v59; // x21
__n128 v60; // q0
cocos2d::CCMenu *v61; // x22
__n128 v62; // q1
unsigned __int32 v63; // s8
float v64; // s9
cocos2d::CCSprite *v65; // x0
CCMenuItemSpriteExtra *v66; // x0
CCMenuItemSpriteExtra *m_leftBtn; // x22
cocos2d::CCMenu *v68; // x23
cocos2d::CCDirector *v69; // x0
__n128 v70; // q0
__n128 v71; // q1
cocos2d::CCSprite *v72; // x21
CCMenuItemSpriteExtra *v73; // x0
CCMenuItemSpriteExtra *m_rightBtn; // x21
cocos2d::CCMenu *v75; // x22
cocos2d::CCDirector *v76; // x0
__n128 v77; // q0
__n128 v78; // q1
float v80; // s1
float v81; // s2
float v82; // s3
cocos2d::CCPoint v83; // [xsp+10h] [xbp-F0h] BYREF
_BYTE v84[8]; // [xsp+18h] [xbp-E8h] BYREF
void *v85[2]; // [xsp+20h] [xbp-E0h] BYREF
char v86; // [xsp+37h] [xbp-C9h]
void *__p[2]; // [xsp+38h] [xbp-C8h] BYREF
char v88; // [xsp+4Fh] [xbp-B1h]
float32x2_t v89[2]; // [xsp+50h] [xbp-B0h] BYREF
float32x2_t v90; // [xsp+60h] [xbp-A0h] BYREF
float32x2_t v91[2]; // [xsp+68h] [xbp-98h] BYREF
float v92; // [xsp+78h] [xbp-88h]
float v93; // [xsp+7Ch] [xbp-84h]
cocos2d::CCPoint v94; // 0:kr08_8.8
cocos2d::CCPoint v95; // 0:kr10_8.8
cocos2d::CCPoint v96; // 0:kr18_8.8
cocos2d::CCPoint v97; // 0:kr20_8.8
cocos2d::CCPoint v98; // 0:kr28_8.8
cocos2d::CCPoint v99; // 0:kr30_8.8
cocos2d::SEL_MenuHandler v100; // 0:x3.16
cocos2d::SEL_MenuHandler v101; // 0:x3.16
cocos2d::SEL_MenuHandler v102; // 0:x3.16
cocos2d::SEL_MenuHandler v103; // 0:x3.16
cocos2d::SEL_MenuHandler v104; // 0:x3.16
cocos2d::SEL_MenuHandler v105; // 0:x3.16
cocos2d::CCRect v106; // 0:kr40_16.16
cocos2d::CCRect v107; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
v91[0].i32[0] = 1258291200;
v2 = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::ccColor4B *)v91);
if ( v2 )
{
v3 = GameManager::sharedState();
if ( GameManager::getGameVariable(v3, "0168") )
a1->m_noElasticity = 1;
FLAlertLayer::incrementForcePrio(a1);
((void (__fastcall *)(MoreOptionsLayer *, __int64))a1->setTouchEnabled)(a1, 1);
((void (__fastcall *)(MoreOptionsLayer *, __int64))a1->setKeypadEnabled)(a1, 1);
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v4);
v5 = cocos2d::CCLayer::create();
a1->m_mainLayer = v5;
((void (__fastcall *)(MoreOptionsLayer *, cocos2d::CCLayer *))a1->addChild)(a1, v5);
sub_100022990((float *)v91, 0.0, 0.0, 80.0, 80.0);
v6 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v107);
sub_100022988((float *)v91, 400.0, 280.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v6->setContentSize)(v6, v91);
v7 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v6,
0xFFFFFFFFLL);
v7.n128_f32[0] = v92 * 0.5;
v8.n128_f32[0] = v93 * 0.5;
sub_100022980(v7, v8, v91);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v6->setPosition)(v6, v91);
v9 = cocos2d::CCLabelBMFont::create_1("Options", "bigFont.fnt");
a1->m_categoryLabel = v9;
v10.n128_f32[0] = v92 * 0.5;
v11.n128_f32[0] = (float)((float)(v93 * 0.5) + 140.0) + -16.0;
sub_100022980(v10, v11, v91);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v9->setPosition)(v9, v91);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(
a1->m_mainLayer,
a1->m_categoryLabel);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_categoryLabel->setScale)(a1->m_categoryLabel, 0.7);
a1->m_joystickConnected = -1;
v12 = cocos2d::CCDictionary::create();
a1->m_objects = v12;
cocos2d::CCObject::retain(v12);
v13 = cocos2d::CCDictionary::create();
a1->m_variables = v13;
cocos2d::CCObject::retain(v13);
v14 = cocos2d::CCMenu::create();
a1->m_buttonMenu = v14;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v14,
10);
MoreOptionsLayer::addToggle(a1, "Auto-Retry", "0026", "Restarts level upon death automatically.");
MoreOptionsLayer::addToggle(a1, "Enable Faster Reset", "0052", "Restarts in 0.5s instead of 1.0s upon death.");
MoreOptionsLayer::addToggle(
a1,
"Click Between Steps",
"0177",
"Toggles substeps on, allowing you to click in-between the default normal steps. This may affect performance.");
MoreOptionsLayer::addToggle(
a1,
"Click On Steps",
"0176",
"Allows you to click on every step, regardless of your refresh rate. This is beneficial for users below 240 Hz.");
MoreOptionsLayer::addToggle(
a1,
"Flip 2-Player\nControls",
"0010",
"Flips which side controls which player during 2-player mode.");
MoreOptionsLayer::addToggle(
a1,
"Always Limit\nControls",
"0011",
"Limits player 1 controls to one side even when dual mode is inactive.");
m_toggleCount = a1->m_toggleCount;
if ( m_toggleCount % 10 )
a1->m_toggleCount = m_toggleCount - m_toggleCount % 10 + 10;
MoreOptionsLayer::addToggle(a1, "Hide Attempts", "0135", "Hides the attempt counter when playing levels.");
MoreOptionsLayer::addToggle(a1, "Flip Pause Button", "0015", "Flips the location of the pause button.");
MoreOptionsLayer::addToggle(a1, "Disable Portal Guide", "0129", "Disables extra indicators on portals.");
MoreOptionsLayer::addToggle(a1, "Enable Orb Guide", "0130", "Enables extra indicators on orbs.");
MoreOptionsLayer::addToggle(a1, "Disable Orb Scale", "0140", "Disables the scaling effect on all orbs.");
MoreOptionsLayer::addToggle(
a1,
"Disable Trigger\nOrb Scale",
"0141",
"Disables the scaling effect on only trigger orbs.");
MoreOptionsLayer::addToggle(a1, "Disable Shake", "0172", "Disables shake effects.");
MoreOptionsLayer::addToggle(
a1,
"Disable Explosion\nShake",
"0014",
"Disables the shake effect that happens upon death.");
MoreOptionsLayer::addToggle(
a1,
"Disable Gravity\nEffect",
"0072",
"Disables the effect that happens upon changing gravity.");
MoreOptionsLayer::addToggle(a1, "Default Mini Icon", "0060", "Sets player icon in mini mode to default.");
MoreOptionsLayer::addToggle(
a1,
"Switch Spider\nTeleport Color",
"0061",
"Toggles between main and secondary color for the teleport effect in spider mode.");
MoreOptionsLayer::addToggle(
a1,
"Switch Dash\nFire Color",
"0062",
"Toggles between main and secondary color for the fire effect from dash orbs.");
MoreOptionsLayer::addToggle(
a1,
"Switch Wave\nTrail Color",
"0096",
"Toggles between main and secondary color for the trail in wave mode.");
MoreOptionsLayer::addToggle(
a1,
"Hide Playtest Text",
"0174",
"Hides text in the top left when using start positions or ignore damage.");
MoreOptionsLayer::addToggle(
a1,
"Hitbox On Death",
"0179",
"Shows hitboxes upon death in both normal and practice mode.");
v16 = a1->m_toggleCount;
if ( v16 % 10 )
a1->m_toggleCount = v16 - v16 % 10 + 10;
MoreOptionsLayer::addToggle(
a1,
"Hide Attempts",
"0134",
"Hides the attempt counter when playing levels in practice mode.");
MoreOptionsLayer::addToggle(
a1,
"Enable Auto-Checkpoints",
"0027",
"Places checkpoints automatically in practice mode.");
MoreOptionsLayer::addToggle(
a1,
"Enable Quick\nCheckpoints",
"0068",
"Tries to place checkpoints more often in practice mode.");
MoreOptionsLayer::addToggle(a1, "Enable Death Effect", "0100", "Shows death effects in practice mode.");
MoreOptionsLayer::addToggle(
a1,
"Enable Normal Music\nIn Editor",
"0125",
"Plays normal music in sync to editor levels in practice mode.");
MoreOptionsLayer::addToggle(a1, "Show Hitboxes", "0166", "Shows hitboxes while in practice mode.");
MoreOptionsLayer::addToggle(
a1,
"Disable Player Hitbox",
"0171",
"Disables the player's hitbox in practice mode\n(if hitboxes are shown).");
v17 = a1->m_toggleCount;
if ( v17 % 10 )
a1->m_toggleCount = v17 - v17 % 10 + 10;
MoreOptionsLayer::addToggle(
a1,
"Enable Smooth Fix",
"0023",
"Makes some optimizations that can reduce lag. Disable if game speed becomes inconsistent.");
MoreOptionsLayer::addToggle(
a1,
"Increase Draw Capacity",
"0066",
"Increases draw capacity for batch nodes at level start. Can improve performance on some levels, but may cause issu"
"es on low-end devices.");
MoreOptionsLayer::addToggle(
a1,
"Enable Low Detail",
"0108",
"Enables low detail mode on levels that support it automatically.");
MoreOptionsLayer::addToggle(
a1,
"Disable High Object\nAlert",
"0082",
"Removes the alert shown when starting levels with a high object count.");
MoreOptionsLayer::addToggle(
a1,
"Enable Extra LDM",
"0136",
"Removes glow and enter effects while in low detail mode. Levels without LDM show LDM Lite.");
MoreOptionsLayer::addToggle(
a1,
"Increase Maximum\nLevels",
"0042",
"Increases maximum locally saved levels from 10 to 100. This refers to level data, not statistics. Enabling this ca"
"n make your save file considerably larger, so keeping the option off is recommended for quicker saving.");
MoreOptionsLayer::addToggle(
a1,
"Disable Level Saving",
"0119",
"Saves level statistics as usual, but levels need to be redownloaded every time you restart the game. Makes saving "
"and loading faster.");
MoreOptionsLayer::addToggle(
a1,
"Save Gauntlets",
"0127",
"Saves gauntlet levels locally so they do not have to be redownloaded. Increases save time but helpful if you have "
"poor connection.");
MoreOptionsLayer::addToggle(
a1,
"Disable Shader\nAnti-Aliasing",
"0155",
"Disables anti-aliasing on shader effects.");
v18 = a1->m_toggleCount;
if ( v18 % 10 )
a1->m_toggleCount = v18 - v18 % 10 + 10;
MoreOptionsLayer::addToggle(
a1,
"Disable Song Alert",
"0083",
"Removes the alert shown when starting levels without the song downloaded.");
MoreOptionsLayer::addToggle(
a1,
"No Song Limit",
"0018",
"Stops automatic deletion of custom songs. This is done by default to save space.");
MoreOptionsLayer::addToggle(
a1,
"Reduce Quality\n(Read Info)",
"0142",
"Lowers audio sampling rate from 44100 Hz to 24000 Hz. Requires restarting to take effect.");
MoreOptionsLayer::addToggle(
a1,
"Audio Fix 01",
"0159",
"Increases the audio buffer size, which may fix certain issues. Do not enable if audio is working fine. Causes a sl"
"ight more audio delay. Requires restarting to take effect.");
v19 = a1->m_toggleCount;
if ( v19 % 10 )
a1->m_toggleCount = v19 - v19 % 10 + 10;
MoreOptionsLayer::addToggle(a1, "More Comments", "0094", "Shows more comments per page. Why not?");
MoreOptionsLayer::addToggle(a1, "Load Comments", "0090", "Loads comments automatically.");
MoreOptionsLayer::addToggle(
a1,
"New Completed Filter",
"0073",
"Makes completed levels filter based only on percentage from update 2.1. Useful to rebeat levels for Mana Orbs.");
MoreOptionsLayer::addToggle(
a1,
"Increase Local Levels\nPer Page",
"0093",
"Increases created and saved levels per page from 10 to 20.");
MoreOptionsLayer::addToggle(
a1,
"Manual Level Order",
"0084",
"Places new levels last in the saved levels list. Useful if you want to manually move levels to the top.");
MoreOptionsLayer::addToggle(a1, "Percentage Decimals", "0126", "Shows decimals in level progress.");
MoreOptionsLayer::addToggle(
a1,
"Show Leaderboard\nPercentage",
"0099",
"Toggles viewing the leaderboard percentage you have on levels. To upload your level progress to the level leaderbo"
"ard, you need to replay levels completed before 2.11.");
MoreOptionsLayer::addToggle(a1, "Do Not...", "0095", "Does not do anything... Well, nothing useful.");
MoreOptionsLayer::addToggle(a1, "Confirm Exit", "0167", "Adds an extra confirmation window when exiting levels.");
MoreOptionsLayer::addToggle(a1, "Fast\nMenu", "0168", "Makes transitions between menu pages faster.");
v20 = MoreOptionsLayer::objectsForPage(a1, 5);
v21 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_savedSongsBtn_001.png");
v100.ptr = (void (__cdecl *)(cocos2d::CCObject *))MoreOptionsLayer::onSongBrowser;
v100.adj = 0;
v22 = CCMenuItemSpriteExtra::create(v21, nullptr, a1, v100);
CCMenuItemSpriteExtra::setSizeMult(v22, 1.2);
v23 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
v22);
m_buttonMenu = a1->m_buttonMenu;
v23.n128_f32[0] = (float)((float)(v92 * 0.5) + 200.0) + -36.0;
v25.n128_f32[0] = (float)((float)((float)(v93 * 0.5) + -140.0) + 36.0) + 2.0;
sub_100022980(v23, v25, v89);
v94 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, (const cocos2d::CCPoint *)v89);
((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))v22->setPosition)(
v22,
v91,
v94.x,
v94.y);
v26 = sub_10024A2D0(v20, v22);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD, __n128))v22->setVisible)(v22, 0, v26);
v27 = ButtonSprite::create_1("DEBUG", 70, 0, 0.6, 0, "goldFont.fnt", "GJ_button_04.png", 25.0);
v101.ptr = (void (__cdecl *)(cocos2d::CCObject *))MoreOptionsLayer::onFMODDebug;
v101.adj = 0;
v28 = CCMenuItemSpriteExtra::create(v27, nullptr, a1, v101);
v29 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
v28);
v30 = a1->m_buttonMenu;
v29.n128_f32[0] = (float)(v92 * 0.5) + 40.0;
v31.n128_f32[0] = (float)((float)(v93 * 0.5) + -140.0) + 30.0;
sub_100022980(v29, v31, v89);
v95 = cocos2d::CCNode::convertToNodeSpace(v30, (const cocos2d::CCPoint *)v89);
((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))v28->setPosition)(
v28,
v91,
v95.x,
v95.y);
v32 = sub_10024A2D0(v20, v28);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD, __n128))v28->setVisible)(v28, 0, v32);
v33 = MoreOptionsLayer::objectsForPage(a1, 6);
v34 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_profileButton_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v34->setScale)(v34, 0.8);
v102.ptr = (void (__cdecl *)(cocos2d::CCObject *))MoreOptionsLayer::onParental;
v102.adj = 0;
v35 = CCMenuItemSpriteExtra::create(v34, nullptr, a1, v102);
CCMenuItemSpriteExtra::setSizeMult(v35, 1.2);
v36 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
v35);
v37 = a1->m_buttonMenu;
v36.n128_f32[0] = (float)((float)(v92 * 0.5) + 200.0) + -36.0;
v38.n128_f32[0] = (float)((float)(v93 * 0.5) + -140.0) + 36.0;
sub_100022980(v36, v38, v89);
v96 = cocos2d::CCNode::convertToNodeSpace(v37, (const cocos2d::CCPoint *)v89);
((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))v35->setPosition)(
v35,
v91,
v96.x,
v96.y);
v39 = sub_10024A2D0(v33, v35);
v40 = ((__n128 (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD, __n128))v35->setVisible)(v35, 0, v39);
v40.n128_f32[0] = (float)((float)(v92 * 0.5) + -200.0) + 75.0;
v41.n128_f32[0] = (float)((float)(v93 * 0.5) + -140.0) + 35.0;
sub_100022980(v40, v41, &v90);
v42 = cocos2d::CCLabelBMFont::create_1("Music Offset (MS)", "bigFont.fnt");
v43 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v42->setScale)(v42, 0.4);
v43.n128_u32[0] = 0;
v44.n128_u32[0] = 25.0;
sub_100022980(v43, v44, v89);
*(float32x2_t *)&v45 = sub_1000229DC(&v90, v89, v91);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v42->setPosition)(v42, v91, v45);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v42);
v46 = sub_10024A2D0(v20, v42);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD, __n128))v42->setVisible)(v42, 0, v46);
sub_100022990((float *)v91, 0.0, 0.0, 40.0, 40.0);
v47 = sub_100022B98(v89, (__int64)v91);
v106.origin.x = *(float *)&v47;
v106.origin.y = v80;
v106.size.width = v81;
v106.size.height = v82;
v48 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v106);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v48->setOpacity)(v48, 100);
sub_100022988((float *)v89, 100.0, 30.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v48->setContentSize)(v48, v89);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v48,
0xFFFFFFFFLL);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v48->setPosition)(v48, &v90);
v49 = sub_10024A2D0(v20, v48);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _QWORD, __n128))v48->setVisible)(v48, 0, v49);
v50 = CCTextInputNode::create(100.0, 50.0, "Offset", "Thonburi", 24, "bigFont.fnt");
a1->m_offsetInput = v50;
((void (__fastcall *)(cocos2d::CCLayer *, CCTextInputNode *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v50,
20);
m_offsetInput = a1->m_offsetInput;
m_offsetInput->m_delegate = &a1->TextInputDelegate;
((void (__fastcall *)(CCTextInputNode *, float32x2_t *))m_offsetInput->setPosition)(m_offsetInput, &v90);
CCTextInputNode::setMaxLabelScale(a1->m_offsetInput, 0.7);
CCTextInputNode::setMaxLabelWidth(a1->m_offsetInput, 200.0);
((void (__fastcall *)(cocos2d::CCTextFieldTTF *, _QWORD))a1->m_offsetInput->m_textField->setVisible)(
a1->m_offsetInput->m_textField,
0);
v52 = a1->m_offsetInput;
v52->m_maxLabelLength = 4;
sub_100009900(__p, "0123456789-");
CCTextInputNode::setAllowedChars(v52, __p);
if ( v88 < 0 )
operator delete(__p[0]);
CCTextInputNode::setLabelPlaceholderColor(a1->m_offsetInput, (cocos2d::ccColor3B)-1004936);
CCTextInputNode::setLabelPlaceholderScale(a1->m_offsetInput, 0.5);
v53 = sub_10024A2D0(v20, a1->m_offsetInput);
((void (__fastcall *)(CCTextInputNode *, _QWORD, __n128))a1->m_offsetInput->setVisible)(a1->m_offsetInput, 0, v53);
if ( FMODAudioEngine::sharedEngine()->m_musicOffset )
{
v54 = a1->m_offsetInput;
v55 = FMODAudioEngine::sharedEngine();
v56 = (cocos2d::CCString *)sub_100268F4C("%i", v55->m_musicOffset);
CString = (char *)cocos2d::CCString::getCString(v56);
sub_100009900(v85, CString);
CCTextInputNode::setString(v54, v85);
if ( v86 < 0 )
operator delete(v85[0]);
}
v58 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v103.ptr = (void (__cdecl *)(cocos2d::CCObject *))MoreOptionsLayer::onClose;
v103.adj = 0;
v59 = CCMenuItemSpriteExtra::create(v58, nullptr, a1, v103);
CCMenuItemSpriteExtra::setSizeMult(v59, 1.5);
v60 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
v59);
v61 = a1->m_buttonMenu;
v60.n128_f32[0] = (float)((float)(v92 * 0.5) + -200.0) + 5.0;
v62.n128_f32[0] = (float)((float)(v93 * 0.5) + 140.0) + -5.0;
sub_100022980(v60, v62, &v83);
v97 = cocos2d::CCNode::convertToNodeSpace(v61, &v83);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *, float, float))v59->setPosition)(v59, v84, v97.x, v97.y);
*(float *)&v63 = v93 * 0.5;
if ( AppDelegate::get()->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] )
v64 = 45.0;
else
v64 = 20.0;
v65 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v104.ptr = (void (__cdecl *)(cocos2d::CCObject *))MoreOptionsLayer::onPrevPage;
v104.adj = 0;
v66 = CCMenuItemSpriteExtra::create(v65, nullptr, a1, v104);
a1->m_leftBtn = v66;
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v66);
m_leftBtn = a1->m_leftBtn;
v68 = a1->m_buttonMenu;
v69 = cocos2d::CCDirector::sharedDirector();
v70.n128_f32[0] = v64 + sub_1001768D8(v69);
v71.n128_u32[0] = v63;
sub_100022980(v70, v71, &v83);
v98 = cocos2d::CCNode::convertToNodeSpace(v68, &v83);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *, float, float))m_leftBtn->setPosition)(
m_leftBtn,
v84,
v98.x,
v98.y);
CCMenuItemSpriteExtra::setSizeMult(a1->m_leftBtn, 1.5);
v72 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
cocos2d::CCSprite::setFlipX(v72, 1);
v105.ptr = (void (__cdecl *)(cocos2d::CCObject *))MoreOptionsLayer::onNextPage;
v105.adj = 0;
v73 = CCMenuItemSpriteExtra::create(v72, nullptr, a1, v105);
a1->m_rightBtn = v73;
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v73);
m_rightBtn = a1->m_rightBtn;
v75 = a1->m_buttonMenu;
v76 = cocos2d::CCDirector::sharedDirector();
v77.n128_f32[0] = sub_1001768E0(v76) - v64;
v78.n128_u32[0] = v63;
sub_100022980(v77, v78, &v83);
v99 = cocos2d::CCNode::convertToNodeSpace(v75, &v83);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *, float, float))m_rightBtn->setPosition)(
m_rightBtn,
v84,
v99.x,
v99.y);
CCMenuItemSpriteExtra::setSizeMult(a1->m_rightBtn, 1.5);
MoreOptionsLayer::goToPage(a1, 0);
}
return v2;
}