//
// MoreOptionsLayer::init from 0x140373740 to 0x140374b7b (5179 bytes)
//
// 5 xrefs:
// > OptionsLayer::onOptions @ 0x140372c68
// > OptionsLayer::onOptions @ 0x140372c6f
// > OptionsLayer::onOptions @ 0x140372c59
// > ??> @ 0x1405c4f48
// > ??> @ 0x1406d5b4c
//
// 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
//
// Hidden C++ exception states: #wind=6
bool MoreOptionsLayer::init(MoreOptionsLayer *a1)
{
bool result; // al
GameManager *v3; // rcx
_BOOL8 v4; // rdx
__int64 v5; // rcx
__int64 v6; // rax
cocos2d::CCTouchDispatcher *v7; // rax
_BOOL8 v8; // rdx
__int64 v9; // rcx
cocos2d::CCDirector *v10; // rax
cocos2d::CCLayer *v11; // rax
struct cocos2d::CCRect *v12; // rax
struct cocos2d::extension::CCScale9Sprite *v13; // rdi
cocos2d::extension::CCScale9Sprite_vtbl *v14; // rbx
const cocos2d::CCSize *v15; // rax
size_t v16; // r15
float v17; // xmm0_4
cocos2d::extension::CCScale9Sprite_vtbl *v18; // rbx
double v19; // xmm0_8
const cocos2d::CCPoint *v20; // rax
cocos2d::CCLabelBMFont *v21; // rax
cocos2d::CCLabelBMFont_vtbl *v22; // rbx
const cocos2d::CCPoint *v23; // rax
__int64 v24; // rcx
cocos2d::CCDictionary *v25; // rax
__int64 v26; // rcx
cocos2d::CCDictionary *v27; // rax
__int64 v28; // rcx
cocos2d::CCMenu *v29; // rax
int m_toggleCount; // ecx
int v31; // ecx
int v32; // ecx
int v33; // ecx
int v34; // ecx
cocos2d::CCArray *v35; // r12
struct cocos2d::CCSprite *v36; // rax
struct cocos2d::CCObject *v37; // rdi
float v38; // xmm0_4
cocos2d::CCObject_vtbl *v39; // rbx
struct cocos2d::CCPoint v40; // rax
ButtonSprite *v41; // rbx
CCMenuItemSpriteExtra *v42; // rdi
float v43; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v44; // rbx
struct cocos2d::CCPoint v45; // rax
cocos2d::CCArray *v46; // rsi
struct cocos2d::CCSprite *v47; // rbx
struct cocos2d::CCObject *v48; // rdi
float v49; // xmm0_4
cocos2d::CCObject_vtbl *v50; // rbx
struct cocos2d::CCPoint v51; // rax
float v52; // xmm0_4
struct cocos2d::CCLabelBMFont *v53; // rbx
float v54; // xmm0_4
struct cocos2d::CCRect *v55; // rax
struct cocos2d::extension::CCScale9Sprite *v56; // rbx
__int64 v57; // rdx
const char *v58; // r9
CCTextInputNode *v59; // rax
CCTextInputNode *m_offsetInput; // rcx
CCTextInputNode *v61; // rcx
std::string *p_m_allowedChars; // rcx
CCTextInputNode *v63; // rcx
CCTextInputNode *v64; // rcx
__int64 v65; // rax
int v66; // edx
cocos2d::CCString *v67; // rax
const char *CString; // rax
struct cocos2d::CCSprite *v69; // rax
CCMenuItemSpriteExtra *v70; // rdi
float v71; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v72; // rbx
struct cocos2d::CCPoint v73; // rax
struct cocos2d::CCSprite *v74; // rax
CCMenuItemSpriteExtra *v75; // rax
CCMenuItemSpriteExtra_vtbl *v76; // rbx
__int64 v77; // rcx
cocos2d::CCDirector *v78; // rax
float v79; // xmm0_4
struct cocos2d::CCPoint v80; // rax
cocos2d::CCSprite *v81; // rbx
CCMenuItemSpriteExtra *v82; // rax
CCMenuItemSpriteExtra_vtbl *v83; // rbx
__int64 v84; // rcx
cocos2d::CCDirector *v85; // rax
float v86; // xmm0_4
struct cocos2d::CCPoint v87; // rax
ButtonSprite *v88; // rbx
CCMenuItemSpriteExtra *v89; // rdi
float v90; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v91; // rbx
struct cocos2d::CCPoint v92; // rax
int v93; // [rsp+28h] [rbp-E0h]
_BYTE v94[40]; // [rsp+58h] [rbp-B0h] BYREF
cocos2d::CCRect v95; // [rsp+80h] [rbp-88h] BYREF
char Src[12]; // [rsp+90h] [rbp-78h] BYREF
int v97; // [rsp+9Ch] [rbp-6Ch]
__int64 v98; // [rsp+A0h] [rbp-68h]
__int64 v99; // [rsp+A8h] [rbp-60h]
char *v100; // [rsp+180h] [rbp+78h] BYREF
float v101; // [rsp+188h] [rbp+80h]
char v102; // [rsp+190h] [rbp+88h] BYREF
LODWORD(v100) = 1258291200;
result = cocos2d::CCLayerColor::initWithColor(a1, (const struct cocos2d::_ccColor4B *)&v100);
if ( result )
{
v3 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
*(_QWORD *)&v94[8] = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(*(__int64 *)&v94[8]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v3 = (GameManager *)qword_1406C2ED8;
}
if ( GameManager::getGameVariable(v3, "0168") )
a1->m_noElasticity = 1;
if ( !a1->m_forcePrioRegistered )
{
a1->m_forcePrioRegistered = 1;
v6 = cocos2d::CCDirector::sharedDirector(v5);
v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 144LL))(v6);
cocos2d::CCTouchDispatcher::registerForcePrio(v7, a1, 2);
}
LOBYTE(v4) = 1;
a1->setTouchEnabled(a1, v4);
LOBYTE(v8) = 1;
a1->setKeypadEnabled(a1, v8);
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(v10);
v11 = (cocos2d::CCLayer *)cocos2d::CCLayer::create();
a1->m_mainLayer = v11;
a1->addChild_1(a1, v11);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v94[8], 0.0, 0.0, 80.0, 80.0);
v13 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v12);
v14 = v13->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v100, 400.0, 280.0);
v14->setContentSize(v13, v15);
v16 = -1;
v17 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v13,
0xFFFFFFFFLL);
v18 = v13->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v19 = cocos2d::CCPoint::CCPoint(v17, v101 * 0.5);
v18->setPosition_0(v13, v20);
v21 = cocos2d::CCLabelBMFont::create("Options", (const char *)&qword_14052A4D8);
a1->m_categoryLabel = v21;
v22 = v21->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v19, v101 * 0.5);
v22->setPosition_0(a1->m_categoryLabel, v23);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, a1->m_categoryLabel);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_categoryLabel->setScale_0)(a1->m_categoryLabel);
a1->m_joystickConnected = -1;
v25 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(v24);
a1->m_objects = v25;
cocos2d::CCObject::retain(v25);
v27 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(v26);
a1->m_variables = v27;
cocos2d::CCObject::retain(v27);
v29 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v28);
a1->m_buttonMenu = v29;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v29, 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, "Lock Cursor In-Game", "0128", "Locks and hides cursor during gameplay.");
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.");
MoreOptionsLayer::addToggle(
a1,
"Disable Thumbstick",
"0028",
"Disables mouse movement when using a controller thumbstick.");
MoreOptionsLayer::addToggle(
a1,
"Enable\nQuick Keys",
"0163",
"Enables some quick temporary bindings until full customization later. Use 'R' for reset, 'CTRL + R' for full reset"
", and 'P' to toggle hitboxes in Practice mode.");
m_toggleCount = a1->m_toggleCount;
if ( m_toggleCount % 10 )
a1->m_toggleCount = m_toggleCount - m_toggleCount % 10 + 10;
MoreOptionsLayer::addToggle(a1, "Show Cursor In-Game", "0024", "Shows cursor and pause button during gameplay.");
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.");
v31 = a1->m_toggleCount;
if ( v31 % 10 )
a1->m_toggleCount = v31 - v31 % 10 + 10;
MoreOptionsLayer::addToggle(
a1,
"Hide Practice Buttons",
"0071",
"Hides the checkpoint buttons shown in practice mode.");
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, (const char *)&qword_140551EB8, "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).");
v32 = a1->m_toggleCount;
if ( v32 % 10 )
a1->m_toggleCount = v32 - v32 % 10 + 10;
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.");
v33 = a1->m_toggleCount;
if ( v33 % 10 )
a1->m_toggleCount = v33 - v33 % 10 + 10;
MoreOptionsLayer::addToggle(
a1,
"Change Custom Songs\nLocation",
"0033",
"Saves custom songs in a different directory. May fix custom songs not working.");
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.");
v34 = a1->m_toggleCount;
if ( v34 % 10 )
a1->m_toggleCount = v34 - v34 % 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.");
v35 = MoreOptionsLayer::objectsForPage(a1, 5);
v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_savedSongsBtn_001.png");
v37 = CCMenuItemSpriteExtra::create(v36, nullptr, a1, (cocos2d::SEL_MenuHandler *)MoreOptionsLayer::onSongBrowser);
v37[6].m_uUnknown = 1067030938;
v38 = ((float (__fastcall *)(cocos2d::CCMenu *, struct cocos2d::CCObject *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v37);
v39 = v37->__vftable;
cocos2d::CCPoint::CCPoint(v38, (float)((float)(v101 * 0.5) + 200.0) - 36.0);
v40 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v94[8]);
((void (__fastcall *)(struct cocos2d::CCObject *, struct cocos2d::CCPoint))v39[2].encodeWithCoder)(v37, v40);
cocos2d::CCArray::addObject(v35, v37);
((void (__fastcall *)(struct cocos2d::CCObject *, _QWORD))v37->__vftable[4].update)(v37, 0);
v100 = (char *)operator new(0x2C0u);
v41 = ButtonSprite::ButtonSprite((ButtonSprite *)v100);
if ( v41 )
{
if ( ButtonSprite::init_1(v41, "DEBUG", 70, 0, 0.60000002, 0, "goldFont.fnt", "GJ_button_04.png", 25.0) )
{
cocos2d::CCObject::autorelease(v41);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v41->~ButtonSprite)(v41, 1);
v41 = nullptr;
}
}
v42 = CCMenuItemSpriteExtra::create(v41, nullptr, a1, (cocos2d::SEL_MenuHandler *)MoreOptionsLayer::onFMODDebug);
v43 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v42);
v44 = v42->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v43, (float)(v101 * 0.5) + 40.0);
v45 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v94[8]);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v44->setPosition_0)(v42, v45);
cocos2d::CCArray::addObject(v35, v42);
v42->setVisible(v42, 0);
v46 = MoreOptionsLayer::objectsForPage(a1, 6);
v47 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_profileButton_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v47->setScale_0)(v47);
v48 = CCMenuItemSpriteExtra::create(v47, nullptr, a1, (cocos2d::SEL_MenuHandler *)MoreOptionsLayer::onParental);
v48[6].m_uUnknown = 1067030938;
v49 = ((float (__fastcall *)(cocos2d::CCMenu *, struct cocos2d::CCObject *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v48);
v50 = v48->__vftable;
cocos2d::CCPoint::CCPoint(v49, (float)((float)(v101 * 0.5) + 200.0) - 36.0);
v51 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v94[8]);
((void (__fastcall *)(struct cocos2d::CCObject *, struct cocos2d::CCPoint))v50[2].encodeWithCoder)(v48, v51);
cocos2d::CCArray::addObject(v46, v48);
v52 = ((float (__fastcall *)(struct cocos2d::CCObject *, _QWORD))v48->__vftable[4].update)(v48, 0);
cocos2d::CCPoint::CCPoint(v52, (float)((float)(v101 * 0.5) - 200.0) + 75.0);
v53 = cocos2d::CCLabelBMFont::create("Music Offset (MS)", (const char *)&qword_14052A4D8);
v54 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *))v53->setScale_0)(v53);
cocos2d::CCPoint::CCPoint(v54, 0.0);
cocos2d::CCPoint::operator+(&v102, &v100);
v53->setPosition_0(v53, (const cocos2d::CCPoint *)&v100);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, v53);
cocos2d::CCArray::addObject(v35, v53);
v53->setVisible(v53, 0);
cocos2d::CCRect::CCRect(&v95, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v94[8], &v95);
v56 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v55);
LOBYTE(v57) = 100;
v56->setOpacity(&v56->cocos2d::CCRGBAProtocol, v57);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v94, 100.0, 30.0);
v56->setContentSize(v56, (const cocos2d::CCSize *)v94);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v56, -1);
v56->setPosition_0(v56, (const cocos2d::CCPoint *)&v102);
cocos2d::CCArray::addObject(v35, v56);
v56->setVisible(v56, 0);
v59 = CCTextInputNode::create(100.0, 50.0, "Offset", v58, v93, (const char *)&qword_14052A4D8);
a1->m_offsetInput = v59;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v59, 20);
a1->m_offsetInput->m_delegate = &a1->TextInputDelegate;
a1->m_offsetInput->setPosition_0(a1->m_offsetInput, (const cocos2d::CCPoint *)&v102);
m_offsetInput = a1->m_offsetInput;
m_offsetInput->m_maxLabelScale = 0.69999999;
CCTextInputNode::refreshLabel(m_offsetInput);
v61 = a1->m_offsetInput;
v61->m_maxLabelWidth = 200.0;
CCTextInputNode::refreshLabel(v61);
a1->m_offsetInput->m_textField->setVisible(a1->m_offsetInput->m_textField, 0);
a1->m_offsetInput->m_maxLabelLength = 4;
v97 = 0;
v98 = 11;
v99 = 15;
strcpy(Src, "0123456789-");
v100 = Src;
p_m_allowedChars = &a1->m_offsetInput->m_allowedChars;
if ( p_m_allowedChars != (std::string *)Src )
sub_14003CCE0((void **)p_m_allowedChars, Src, 0xBu);
sub_14003A830((__int64)Src);
LOWORD(v100) = -21896;
v63 = a1->m_offsetInput;
*(_WORD *)&v63->m_placeholderColor.r = -21896;
v63->m_placeholderColor.b = -16;
CCTextInputNode::refreshLabel(v63);
v64 = a1->m_offsetInput;
v64->m_placeholderScale = 0.5;
CCTextInputNode::refreshLabel(v64);
cocos2d::CCArray::addObject(v35, a1->m_offsetInput);
a1->m_offsetInput->setVisible(a1->m_offsetInput, 0);
v65 = qword_1406C2E88;
if ( !qword_1406C2E88 )
{
v100 = (char *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine((FMODAudioEngine *)v100);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
v65 = qword_1406C2E88;
}
v66 = *(_DWORD *)(v65 + 612);
if ( v66 )
{
v67 = cocos2d::CCString::createWithFormat("%i", v66);
CString = cocos2d::CCString::getCString(v67);
memset(&v94[8], 0, 32);
do
++v16;
while ( CString[v16] );
sub_14003A930(&v94[8], CString, v16);
CCTextInputNode::setString((__int64)a1->m_offsetInput, &v94[8]);
}
v69 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v70 = CCMenuItemSpriteExtra::create(v69, nullptr, a1, (cocos2d::SEL_MenuHandler *)MoreOptionsLayer::onClose);
HIDWORD(v70->m_pfnSelector.adj) = 1069547520;
v71 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v70);
v72 = v70->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v71, (float)((float)(v101 * 0.5) - 200.0) + 5.0);
v73 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v94[8]);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v72->setPosition_0)(v70, v73);
v74 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v75 = CCMenuItemSpriteExtra::create(v74, nullptr, a1, (cocos2d::SEL_MenuHandler *)MoreOptionsLayer::onPrevPage);
a1->m_leftBtn = v75;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v75);
v76 = a1->m_leftBtn->__vftable;
v78 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v77);
v79 = cocos2d::CCDirector::getScreenLeft(v78) + 20.0;
cocos2d::CCPoint::CCPoint(v79, v79);
v80 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v94[8]);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v76->setPosition_0)(a1->m_leftBtn, v80);
HIDWORD(a1->m_leftBtn->m_pfnSelector.adj) = 1069547520;
v81 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
cocos2d::CCSprite::setFlipX(v81, 1);
v82 = CCMenuItemSpriteExtra::create(v81, nullptr, a1, (cocos2d::SEL_MenuHandler *)MoreOptionsLayer::onNextPage);
a1->m_rightBtn = v82;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v82);
v83 = a1->m_rightBtn->__vftable;
v85 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v84);
v86 = cocos2d::CCDirector::getScreenRight(v85) - 20.0;
cocos2d::CCPoint::CCPoint(v86, v86);
v87 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v94[8]);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v83->setPosition_0)(a1->m_rightBtn, v87);
HIDWORD(a1->m_rightBtn->m_pfnSelector.adj) = 1069547520;
MoreOptionsLayer::goToPage(a1, 0);
v100 = (char *)operator new(0x2C0u);
v88 = ButtonSprite::ButtonSprite((ButtonSprite *)v100);
if ( v88 )
{
if ( ButtonSprite::init_1(v88, "Keys", 70, 0, 0.60000002, 0, "goldFont.fnt", "GJ_button_04.png", 25.0) )
{
cocos2d::CCObject::autorelease(v88);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v88->~ButtonSprite)(v88, 1);
v88 = nullptr;
}
}
v89 = CCMenuItemSpriteExtra::create(v88, nullptr, a1, (cocos2d::SEL_MenuHandler *)EditorPauseLayer::onKeybindings);
v90 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v89);
v91 = v89->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v90, (float)((float)(v101 * 0.5) + 200.0) - 35.0);
v92 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v94[8]);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v91->setPosition_0)(v89, v92);
return 1;
}
return result;
}