//
// ColorSelectPopup::init from 0x140126b40 to 0x140129377 (10295 bytes)
//
// 2 xrefs:
// > ColorSelectPopup::create @ 0x140126af9
// > ??> @ 0x140916a0c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:27:00 +0000
//
// Hidden C++ exception states: #wind=7
char __fastcall ColorSelectPopup::init(__int64 a1, int a2, int a3, cocos2d::CCObject *a4)
{
char result; // al
__int64 v7; // rcx
cocos2d::CCObject *v8; // rax
__int64 v9; // rcx
cocos2d::CCObject *v10; // rax
__int64 v11; // rdx
__int64 v12; // rcx
__int64 v13; // rax
bool v14; // r13
__int64 v15; // rax
__int64 v16; // rdi
__int64 v17; // rbx
__int64 v18; // rax
struct cocos2d::CCLabelBMFont *v19; // rdi
__int64 v20; // rbx
__int64 v21; // rax
cocos2d::CCObject *v22; // rbx
cocos2d::CCObject *v23; // rax
struct cocos2d::CCLabelBMFont *v24; // rdi
__int64 v25; // rbx
__int64 v26; // rax
__int64 v27; // rax
_QWORD *v28; // rsi
__int64 v29; // rdx
void (__fastcall *v30)(_QWORD *, __int64); // r8
__int64 v31; // rax
__int64 v32; // rdx
__int64 v33; // rcx
const char *v34; // r8
char *v35; // rax
__int64 v36; // rdi
__int64 v37; // rbx
__int64 v38; // rax
__int64 v39; // rcx
__int64 v40; // rcx
__int64 v41; // rcx
__int64 v42; // rcx
__int64 v43; // r8
cocos2d::CCLayer *v44; // rax
__int64 v45; // rax
float v46; // xmm1_4
__int64 v47; // rcx
struct cocos2d::CCLabelBMFont *v48; // rax
__int64 v49; // rdi
__int64 v50; // rbx
__int64 v51; // rax
__int64 v52; // r8
cocos2d::CCLayer *v53; // rax
__int64 v54; // rax
__int64 v55; // rbx
__int64 v56; // rax
__int64 v57; // rcx
__int64 v58; // rsi
float Value; // xmm0_4
float v60; // xmm3_4
__int64 v61; // rdi
__int64 v62; // rbx
__int64 v63; // rax
cocos2d::CCObject *v64; // rsi
cocos2d::CCObject *v65; // rdi
cocos2d::CCObject *v66; // rbx
struct cocos2d::CCObject *v67; // rsi
struct cocos2d::CCObject *v68; // r14
struct cocos2d::CCObject *v69; // r15
__int64 v70; // rdi
__int64 v71; // rbx
__int64 v72; // rax
__int64 v73; // rax
__int64 v74; // rax
__int64 v75; // rbx
__int64 v76; // rax
__int64 v77; // rax
__int64 v78; // rbx
__int64 v79; // rax
int v80; // ebx
__int64 v81; // rax
int v82; // r9d
int v83; // ebx
int v84; // r9d
__int64 v85; // rax
__int64 v86; // rax
__int64 v87; // rax
int v88; // ebx
int v89; // r9d
__int64 v90; // rax
__int64 v91; // rax
int v92; // ebx
int v93; // r9d
__int64 v94; // rax
__int64 v95; // rax
unsigned __int8 v96; // bl
__int64 v97; // rax
__int64 v98; // rax
__int64 v99; // rax
__int64 v100; // rax
cocos2d::CCArray *v101; // rdi
__int64 v102; // rsi
__int64 v103; // r14
unsigned __int8 v104; // r15
float *v105; // rax
float *v106; // rbx
__int64 v107; // rax
struct cocos2d::CCSprite *v108; // rsi
struct cocos2d::CCSprite *v109; // rbx
cocos2d::CCMenuItem *v110; // rdi
__int64 v111; // rdx
__int64 v112; // rbx
__int64 v113; // rax
cocos2d::CCLabelBMFont *v114; // rdi
__int64 v115; // rbx
__int64 v116; // rax
float *v117; // rax
__int64 v118; // rax
__int64 v119; // rax
float *v120; // rax
struct cocos2d::CCObject *ToggleButton; // rbx
struct cocos2d::CCObject *v122; // rdi
struct cocos2d::CCSprite *v123; // rax
__int64 v124; // rdi
__int64 v125; // rbx
__int64 v126; // rax
float v127; // xmm6_4
struct cocos2d::CCSprite *v128; // rax
float v129; // xmm2_4
__int64 v130; // rax
__int64 v131; // rbx
__int64 v132; // rax
__int64 v133; // rdx
struct cocos2d::CCLabelBMFont *v134; // rbx
__int64 v135; // rax
__int64 v136; // rax
_QWORD *v137; // rdi
__int64 v138; // rdx
void (__fastcall *v139)(_QWORD *, __int64); // r8
__int64 v140; // rdx
__int64 v141; // rcx
char *v142; // rax
__int64 v143; // rcx
__int64 v144; // rcx
__int64 v145; // rcx
__int64 v146; // rcx
__int64 v147; // r14
int v148; // eax
cocos2d::CCObject *v149; // rdi
__int64 v150; // rax
__int64 v151; // rbx
__int64 v152; // rax
struct cocos2d::CCSprite *v153; // rax
cocos2d::CCObject *v154; // rbx
__int64 v155; // rax
struct cocos2d::CCSprite *v156; // rax
cocos2d::CCObject *v157; // rbx
__int64 v158; // rax
__int64 v159; // rax
__int64 v160; // rdi
__int64 v161; // rbx
__int64 v162; // rax
struct cocos2d::CCObject *v163; // rbx
__int64 v164; // rax
__int64 v165; // rax
struct cocos2d::CCObject *v166; // rdi
__int64 v167; // rdx
void (__fastcall *v168)(char *, __int64); // r8
__int64 v169; // rdx
__int64 v170; // rcx
char *v171; // rax
__int64 v172; // rcx
__int64 v173; // rcx
__int64 v174; // rcx
__int64 v175; // rcx
struct cocos2d::CCSprite *v176; // rax
struct cocos2d::CCObject *v177; // rbx
__int64 v178; // rax
struct cocos2d::CCSprite *v179; // rax
struct cocos2d::CCObject *v180; // rbx
__int64 v181; // rax
int v182; // eax
struct cocos2d::CCObject *v183; // rdi
__int64 v184; // rax
__int64 v185; // rbx
__int64 v186; // rax
__int64 *v187; // rsi
__int64 v188; // rdi
__int64 v189; // rbx
__int64 v190; // rax
__int64 v191; // rax
int v192; // edi
__int64 v193; // rax
__int64 v194; // rax
const char *v195; // rcx
struct cocos2d::CCObject *v196; // rbx
__int64 v197; // rax
__int64 v198; // rax
struct cocos2d::CCObject *v199; // rsi
__int64 v200; // rdx
void (__fastcall *v201)(char *, __int64); // r8
__int64 v202; // rdx
char *v203; // rbx
int v204; // eax
const char *v205; // rdx
size_t v206; // r8
__int16 v207; // [rsp+88h] [rbp-80h] BYREF
char v208; // [rsp+8Ah] [rbp-7Eh]
_BYTE v209[8]; // [rsp+98h] [rbp-70h] BYREF
__int128 *v210; // [rsp+A0h] [rbp-68h] BYREF
float v211; // [rsp+A8h] [rbp-60h] BYREF
float v212; // [rsp+ACh] [rbp-5Ch]
__int128 v213; // [rsp+B0h] [rbp-58h] BYREF
__int64 v214; // [rsp+C0h] [rbp-48h]
__int64 v215; // [rsp+C8h] [rbp-40h]
_BYTE v216[8]; // [rsp+D0h] [rbp-38h] BYREF
__int128 *v217; // [rsp+D8h] [rbp-30h] BYREF
__int16 v218; // [rsp+E0h] [rbp-28h] BYREF
char v219; // [rsp+E2h] [rbp-26h]
_BYTE v220[8]; // [rsp+E8h] [rbp-20h] BYREF
_QWORD v221[2]; // [rsp+F0h] [rbp-18h] BYREF
_BYTE v222[8]; // [rsp+100h] [rbp-8h] BYREF
_BYTE v223[8]; // [rsp+108h] [rbp+0h] BYREF
_BYTE v224[8]; // [rsp+110h] [rbp+8h] BYREF
_DWORD v225[4]; // [rsp+118h] [rbp+10h] BYREF
__int128 v226; // [rsp+128h] [rbp+20h] BYREF
__int64 v227; // [rsp+138h] [rbp+30h]
__int64 v228; // [rsp+140h] [rbp+38h]
_BYTE v229[8]; // [rsp+148h] [rbp+40h] BYREF
_BYTE v230[8]; // [rsp+150h] [rbp+48h] BYREF
_BYTE v231[8]; // [rsp+158h] [rbp+50h] BYREF
_BYTE v232[16]; // [rsp+160h] [rbp+58h] BYREF
__int128 v233; // [rsp+170h] [rbp+68h] BYREF
__int64 v234; // [rsp+180h] [rbp+78h]
__int64 v235; // [rsp+188h] [rbp+80h]
result = SetupTriggerPopup::init(a1, a2, a3, (_DWORD)a4, 1133903872, 1, 0);
if ( result )
{
if ( a4 )
{
*(_QWORD *)(a1 + 1128) = a4;
cocos2d::CCObject::retain(a4);
}
v8 = (cocos2d::CCObject *)cocos2d::CCArray::create(v7);
*(_QWORD *)(a1 + 1192) = v8;
cocos2d::CCObject::retain(v8);
v10 = (cocos2d::CCObject *)cocos2d::CCArray::create(v9);
*(_QWORD *)(a1 + 1200) = v10;
cocos2d::CCObject::retain(v10);
*(_BYTE *)(a1 + 1156) = 1;
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1096LL))(a1);
LOBYTE(v11) = -56;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(a1 + 408) + 40LL))(a1 + 408, v11);
v13 = cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize(v13, &v211);
v14 = *(_QWORD *)(a1 + 680) || *(_QWORD *)(a1 + 688);
v15 = cocos2d::extension::CCControlColourPicker::create();
*(_QWORD *)(a1 + 1016) = v15;
*(_QWORD *)(v15 + 536) = a1 + 1000;
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1016),
10);
v16 = **(_QWORD **)(a1 + 1016);
v17 = *(_QWORD *)(a1 + 1016);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, v211 * 0.5, (float)(16 * v14 + 20) + (float)(v212 * 0.5));
(*(void (__fastcall **)(__int64, __int64))(v16 + 184))(v17, v18);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), *(struct cocos2d::CCObject **)(a1 + 1016));
v19 = cocos2d::CCLabelBMFont::create("Select Color", "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v19 + 160LL))(v19);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v19);
v20 = *(_QWORD *)v19;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, v211 * 0.5, (float)(v212 * 0.5) + 135.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v20 + 184))(v19, v21);
v210 = (__int128 *)operator new(0x2C8u);
v22 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v210);
if ( v22 )
{
if ( ButtonSprite::init_1(
(__int64)v22,
(__int64)"OK",
40,
0,
1061997773,
1,
"goldFont.fnt",
(__int64)"GJ_button_01.png",
1106247680) )
{
cocos2d::CCObject::autorelease(v22);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v22 + 8LL))(v22, 1);
LODWORD(v22) = 0;
}
}
v23 = CCMenuItemSpriteExtra::create((int)v22, 0, a1, (__int64)ColorSelectPopup::closeColorSelect);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v23);
*(_DWORD *)(a1 + 640) = -1;
if ( v14 && !*(_BYTE *)(a1 + 1148) )
{
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v216,
(float)(int)(*(_BYTE *)(a1 + 1149) != 0 ? 0xFFFFFFF6 : 0) + (float)(v211 * 0.5),
(float)(v212 * 0.5) - 68.0);
v24 = cocos2d::CCLabelBMFont::create("Fade Time: ", "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v24 + 160LL))(v24);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v24 + 184LL))(v24, v216);
v25 = *(_QWORD *)v24;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 1.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v25 + 288))(v24, v26);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v24);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v226, 0.0, 0.0, 40.0, 40.0);
v27 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v221, (const struct cocos2d::CCRect *)&v226);
v28 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v27);
v29 = v28[40];
v30 = *(void (__fastcall **)(_QWORD *, __int64))(v29 + 40);
LOBYTE(v29) = 100;
v30(v28 + 40, v29);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v220, 70.0, 30.0);
(*(void (__fastcall **)(_QWORD *, _BYTE *))(*v28 + 312LL))(v28, v220);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v28,
0xFFFFFFFFLL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 45.0, 0.0);
cocos2d::CCPoint::operator+(v216, v209, v31);
(*(void (__fastcall **)(_QWORD *, _BYTE *))(*v28 + 184LL))(v28, v209);
v34 = "Num";
if ( *(float *)(a1 + 1112) == -99999.0 )
v34 = "Mixed";
v35 = CCTextInputNode::create(v33, v32, (__int64)v34);
*(_QWORD *)(a1 + 1216) = v35;
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v35,
20);
v36 = **(_QWORD **)(a1 + 1216);
v37 = *(_QWORD *)(a1 + 1216);
v38 = (*(__int64 (__fastcall **)(_QWORD *))(*v28 + 200LL))(v28);
(*(void (__fastcall **)(__int64, __int64))(v36 + 184))(v37, v38);
v39 = *(_QWORD *)(a1 + 1216);
*(_DWORD *)(v39 + 564) = 1058642330;
CCTextInputNode::refreshLabel(v39);
v40 = *(_QWORD *)(a1 + 1216);
*(_DWORD *)(v40 + 560) = 1128792064;
CCTextInputNode::refreshLabel(v40);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1216) + 592LL) + 336LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 1216) + 592LL),
0);
*(_DWORD *)(*(_QWORD *)(a1 + 1216) + 608LL) = 5;
v214 = 11;
v215 = 15;
*(_QWORD *)&v213 = 0x3736353433323130LL;
*((_QWORD *)&v213 + 1) = 3029304;
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 1216), (void **)&v213);
v207 = -21896;
v41 = *(_QWORD *)(a1 + 1216);
*(_WORD *)(v41 + 572) = -21896;
*(_BYTE *)(v41 + 574) = -16;
CCTextInputNode::refreshLabel(v41);
v42 = *(_QWORD *)(a1 + 1216);
*(_DWORD *)(v42 + 568) = 1056964608;
CCTextInputNode::refreshLabel(v42);
*(_QWORD *)(*(_QWORD *)(a1 + 1216) + 600LL) = a1 + 544;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 1216) + 64LL))(*(_QWORD *)(a1 + 1216), 5);
*(_BYTE *)(*(_QWORD *)(a1 + 1216) + 424LL) = 1;
v44 = Slider::create(
a1,
(__int64)ColorSelectPopup::sliderChanged,
v43,
"slidergroove.png",
(__int64)"sliderthumb.png",
(__int64)"sliderthumbsel.png",
0.80000001);
*(_QWORD *)(a1 + 1040) = v44;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)v44 + 52) + 336LL))(*((_QWORD *)v44 + 52), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1040));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, -28.0);
cocos2d::CCPoint::operator+(v216, v209, v45);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 1040) + 184LL))(*(_QWORD *)(a1 + 1040), v209);
v46 = fminf(1.0, *(float *)(a1 + 1112) / 10.0);
if ( v46 < 0.0 )
v46 = 0.0;
Slider::setValue(*(_QWORD *)(a1 + 1040), v46);
v47 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1040) + 408LL) + 456LL);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v47 + 64LL))(v47, 1);
ColorSelectPopup::updateDurLabel(a1);
}
v207 = *(_WORD *)(a1 + 1096);
v208 = *(_BYTE *)(a1 + 1098);
(*(void (__fastcall **)(_QWORD, __int16 *))(**(_QWORD **)(a1 + 1016) + 1128LL))(*(_QWORD *)(a1 + 1016), &v207);
if ( *(_BYTE *)(a1 + 1147) && !*(_BYTE *)(a1 + 1148) )
{
v48 = cocos2d::CCLabelBMFont::create(" ", "goldFont.fnt");
*(_QWORD *)(a1 + 1032) = v48;
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v48);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1032) + 160LL))(*(_QWORD *)(a1 + 1032));
v49 = **(_QWORD **)(a1 + 1032);
v50 = *(_QWORD *)(a1 + 1032);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, (float)(v211 * 0.5) + 150.0, (float)(v212 * 0.5) - 15.0);
(*(void (__fastcall **)(__int64, __int64))(v49 + 184))(v50, v51);
v53 = Slider::create(
a1,
(__int64)ColorSelectPopup::sliderChanged,
v52,
"slidergroove.png",
(__int64)"sliderthumb.png",
(__int64)"sliderthumbsel.png",
0.55000001);
*(_QWORD *)(a1 + 1048) = v53;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)v53 + 52) + 336LL))(*((_QWORD *)v53 + 52), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1048));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, -20.0);
v55 = v54;
v56 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1032) + 200LL))(*(_QWORD *)(a1 + 1032));
cocos2d::CCPoint::operator+(v56, v209, v55);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 1048) + 184LL))(*(_QWORD *)(a1 + 1048), v209);
v57 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1048) + 408LL) + 456LL);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v57 + 64LL))(v57, 2);
ColorSelectPopup::updateOpacityLabel(a1);
v58 = *(_QWORD *)(a1 + 1048);
SliderThumb::setValue(*(float **)(*(_QWORD *)(v58 + 408) + 456LL), *(float *)(a1 + 1124));
Value = SliderThumb::getValue(*(float **)(*(_QWORD *)(v58 + 408) + 456LL));
v60 = *(float *)(v58 + 432);
if ( (float)(Value * v60) <= v60 )
v60 = Value * v60;
v61 = **(_QWORD **)(v58 + 416);
v62 = *(_QWORD *)(v58 + 416);
v63 = ((__int64 (__fastcall *)(cocos2d::CCRect *__hidden, float, float, float, float))cocos2d::CCRect::CCRect)(
(cocos2d::CCRect *)&v226,
0.0,
0.0,
v60,
*(float *)(v58 + 436));
(*(void (__fastcall **)(__int64, __int64))(v61 + 992))(v62, v63);
}
v210 = (__int128 *)operator new(0x2C8u);
v64 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v210);
if ( v64 )
{
if ( ButtonSprite::init_1(
(__int64)v64,
(__int64)"Copy",
40,
0,
1058642330,
1,
"goldFont.fnt",
(__int64)"GJ_button_04.png",
1106247680) )
{
cocos2d::CCObject::autorelease(v64);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v64 + 8LL))(v64, 1);
LODWORD(v64) = 0;
}
}
v210 = (__int128 *)operator new(0x2C8u);
v65 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v210);
if ( v65 )
{
if ( ButtonSprite::init_1(
(__int64)v65,
(__int64)"Paste",
40,
0,
1058642330,
1,
"goldFont.fnt",
(__int64)"GJ_button_04.png",
1106247680) )
{
cocos2d::CCObject::autorelease(v65);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v65 + 8LL))(v65, 1);
LODWORD(v65) = 0;
}
}
v210 = (__int128 *)operator new(0x2C8u);
v66 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v210);
if ( v66 )
{
if ( ButtonSprite::init_1(
(__int64)v66,
(__int64)"Default",
40,
0,
1058642330,
1,
"goldFont.fnt",
(__int64)"GJ_button_04.png",
1106247680) )
{
cocos2d::CCObject::autorelease(v66);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v66 + 8LL))(v66, 1);
LODWORD(v66) = 0;
}
}
v67 = CCMenuItemSpriteExtra::create((int)v64, 0, a1, (__int64)ColorSelectPopup::onCopy);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v67);
v68 = CCMenuItemSpriteExtra::create((int)v65, 0, a1, (__int64)ColorSelectPopup::onPaste);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v68);
v69 = CCMenuItemSpriteExtra::create((int)v66, 0, a1, (__int64)ColorSelectPopup::onDefault);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v69);
v70 = *(_QWORD *)v67;
v71 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, (float)(v211 * 0.5) + 190.0, (float)(v212 * 0.5) + 130.0);
cocos2d::CCNode::convertToNodeSpace(v71, v209, v72);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v70 + 184))(v67, v73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, -40.0);
v75 = v74;
v76 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v67 + 200LL))(v67);
cocos2d::CCPoint::operator+(v76, v209, v75);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v68 + 184LL))(v68, v209);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), v67);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), v68);
if ( v69 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, -40.0);
v78 = v77;
v79 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v68 + 200LL))(v68);
cocos2d::CCPoint::operator+(v79, v209, v78);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v69 + 184LL))(v69, v209);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), v69);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v222, (float)(v211 * 0.5) + 64.0, (float)(v212 * 0.5) - 130.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v229, (float)(v211 * 0.5) - 205.0, (float)(v212 * 0.5) - 90.0);
if ( !*(_BYTE *)(a1 + 1148) )
{
v210 = &v213;
v80 = *(_DWORD *)(a1 + 1116);
v214 = 14;
v215 = 15;
strcpy((char *)&v213, "Player\nColor 1");
HIBYTE(v213) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v217, 0.0, -40.0);
cocos2d::CCPoint::operator+(v229, v209, v81);
LOBYTE(v82) = v80 == 1;
*(_QWORD *)(a1 + 1056) = ((__int64 (__fastcall *)(_DWORD, unsigned int, unsigned int, int, __int64))SetupTriggerPopup::createToggleButton)(
a1,
(unsigned int)&v213,
(unsigned int)ColorSelectPopup::onPlayerColor1,
v82,
(__int64)v209);
v217 = &v213;
v83 = *(_DWORD *)(a1 + 1116);
v214 = 14;
v215 = 15;
strcpy((char *)&v213, "Player\nColor 2");
HIBYTE(v213) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, (float)(v211 * 0.5) - 108.0, (float)(v212 * 0.5) - 130.0);
LOBYTE(v84) = v83 == 2;
*(_QWORD *)(a1 + 1064) = ((__int64 (__fastcall *)(_DWORD, unsigned int, unsigned int, int, __int64))SetupTriggerPopup::createToggleButton)(
a1,
(unsigned int)&v213,
(unsigned int)ColorSelectPopup::onPlayerColor2,
v84,
v85);
if ( *(_BYTE *)(a1 + 1144) )
{
v217 = &v213;
v214 = 11;
v215 = 15;
*(_QWORD *)&v213 = 0x6F72470A746E6954LL;
*((_QWORD *)&v213 + 1) = 6581877;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 90.0, 40.0);
cocos2d::CCPoint::operator+(v222, v209, v86);
SetupTriggerPopup::createToggleButton(
a1,
(unsigned int)&v213,
(unsigned int)ColorSelectPopup::onTintGround,
*(unsigned __int8 *)(a1 + 1145),
(__int64)v209);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v217, 0.0, -9.0);
cocos2d::CCPoint::operator+(v229, v216, v87);
if ( *(_BYTE *)(a1 + 1147) )
{
v217 = &v213;
v88 = *(_DWORD *)(a1 + 1120);
v214 = 8;
v215 = 15;
v213 = 0x676E69646E656C42uLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, (const struct cocos2d::CCPoint *)v216);
LOBYTE(v89) = v88 == 1;
SetupTriggerPopup::createToggleButton(
a1,
(unsigned int)&v213,
(unsigned int)ColorSelectPopup::onToggleTintMode,
v89,
v90);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v217, 0.0, 30.0);
cocos2d::CCPoint::operator+(v216, v209, v91);
cocos2d::CCPoint::operator=(v216, v209);
}
v217 = &v213;
v92 = *(_DWORD *)(a1 + 1160);
*((_QWORD *)&v213 + 1) = 29295;
v214 = 10;
v215 = 15;
*(_QWORD *)&v213 = 0x6C6F432079706F43LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, (const struct cocos2d::CCPoint *)v216);
LOBYTE(v93) = v92 != 0;
SetupTriggerPopup::createToggleButton(
a1,
(unsigned int)&v213,
(unsigned int)ColorSelectPopup::onToggleHSVMode,
v93,
v94);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v217, 0.0, 30.0);
cocos2d::CCPoint::operator+(v216, v209, v95);
cocos2d::CCPoint::operator=(v216, v209);
if ( v14 )
{
v217 = &v213;
v214 = 13;
v215 = 15;
strcpy((char *)&v213, "Touch\nTrigger");
HIWORD(v213) = 0;
v96 = *(_BYTE *)(a1 + 696);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, (const struct cocos2d::CCPoint *)v222);
SetupTriggerPopup::createToggleButton(
a1,
(unsigned int)&v213,
(unsigned int)SetupTriggerPopup::onTouchTriggered,
v96,
v97);
*(_QWORD *)(a1 + 704) = v98;
v217 = &v213;
v214 = 13;
v215 = 15;
strcpy((char *)&v213, "Spawn\nTrigger");
HIWORD(v213) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 90.0, 0.0);
cocos2d::CCPoint::operator+(v222, v209, v99);
SetupTriggerPopup::createToggleButton(
a1,
(unsigned int)&v213,
(unsigned int)SetupTriggerPopup::onSpawnedByTrigger,
*(unsigned __int8 *)(a1 + 697),
(__int64)v209);
*(_QWORD *)(a1 + 712) = v100;
v217 = &v213;
v214 = 13;
v215 = 15;
strcpy((char *)&v213, "Multi\nTrigger");
HIWORD(v213) = 0;
v101 = *(cocos2d::CCArray **)(a1 + 720);
v102 = *(_QWORD *)(a1 + 584);
v103 = *(_QWORD *)(a1 + 552);
v104 = *(_BYTE *)(a1 + 728);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 8.0, 0.0);
v106 = v105;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v209, (const struct cocos2d::CCPoint *)v216);
GameToolbox::createToggleButton(
(const char *)&v213,
(__int64)SetupTriggerPopup::onMultiTrigger,
v104,
v103,
v107,
a1,
v102,
0.69999999,
0.34999999,
110.0,
v106,
(const char *)&qword_140704F78,
0,
0,
v101);
SetupTriggerPopup::updateMultiTriggerBtn(a1);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v220, (float)(v211 * 0.5) + 110.0, (float)(v212 * 0.5) + 18.0);
v108 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png");
v109 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v108 + 160LL))(v108);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v109 + 160LL))(v109);
v110 = CCMenuItemToggler::create((int)v108, (int)v109, a1, (__int64)ColorSelectPopup::onCopyOpacity);
LOBYTE(v111) = *(_BYTE *)(a1 + 1164) == 0;
CCMenuItemToggler::toggle((__int64)v110, v111);
(*(void (__fastcall **)(_QWORD, cocos2d::CCMenuItem *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v110);
v112 = *(_QWORD *)v110;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v217, v220);
(*(void (__fastcall **)(cocos2d::CCMenuItem *, __int64))(v112 + 184))(v110, v113);
*(_DWORD *)(*((_QWORD *)v110 + 47) + 372LL) = 1069547520;
*(_DWORD *)(*((_QWORD *)v110 + 48) + 372LL) = 1069547520;
CCMenuItemToggler::toggle((__int64)v110, *((unsigned __int8 *)v110 + 392));
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), v110);
v114 = cocos2d::CCLabelBMFont::create("Copy Opacity", (const char *)&qword_140704F78);
(*(void (__fastcall **)(__int64, cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v114);
v115 = *(_QWORD *)v114;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v217, 0.0, 0.5);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(v115 + 288))(v114, v116);
v117 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v108 + 320LL))(v108);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v217, (float)((float)(*v117 * 0.5) * 0.69999999) + 8.0, 0.0);
cocos2d::CCPoint::operator+(v220, v209, v118);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v114 + 184LL))(v114, v209);
cocos2d::CCLabelBMFont::limitLabelWidth(v114, 110.0, 0.34999999, 0.0);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), v114);
v217 = &v213;
LOBYTE(v115) = *(_BYTE *)(a1 + 1146);
*((_QWORD *)&v213 + 1) = 22099;
v214 = 10;
v215 = 15;
*(_QWORD *)&v213 = 0x480A79636167654CLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v210, 0.0, 100.0);
cocos2d::CCPoint::operator+(v220, v209, v119);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, 8.0, 0.0);
ToggleButton = GameToolbox::createToggleButton(
(const char *)&v213,
(__int64)ColorSelectPopup::onHSVLegacyMode,
(_BYTE)v115 == 0,
*(_QWORD *)(a1 + 552),
(__int64)v209,
a1,
*(_QWORD *)(a1 + 584),
0.69999999,
0.30000001,
0.0,
v120,
(const char *)&qword_140704F78,
0,
111,
nullptr);
v122 = (struct cocos2d::CCObject *)(*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 472LL))(
*(_QWORD *)(a1 + 584),
111);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), ToggleButton);
if ( v122 )
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), v122);
}
v123 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
*(_QWORD *)(a1 + 1080) = v123;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v123 + 160LL))(v123);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1080),
5);
v124 = **(_QWORD **)(a1 + 1080);
v125 = *(_QWORD *)(a1 + 1080);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, (float)(v211 * 0.5) - 200.0, (float)(v212 * 0.5) + 125.0);
(*(void (__fastcall **)(__int64, __int64))(v124 + 184))(v125, v126);
v127 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1080) + 320LL))(*(_QWORD *)(a1 + 1080));
v128 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
*(_QWORD *)(a1 + 1088) = v128;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v128 + 136LL))(v128);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1088),
5);
v129 = (float)((float)-v127 * 0.5) - (float)(v127 * 0.5) * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, 0.0, v129);
v131 = v130;
v132 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1080) + 200LL))(*(_QWORD *)(a1 + 1080));
cocos2d::CCPoint::operator+(v132, v209, v131);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 1088) + 184LL))(*(_QWORD *)(a1 + 1088), v209);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), *(struct cocos2d::CCObject **)(a1 + 1080));
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), *(struct cocos2d::CCObject **)(a1 + 1088));
if ( *(_BYTE *)(a1 + 1149) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v216, (float)(v211 * 0.5) + 150.0, (float)(v212 * 0.5) - 90.0);
v134 = cocos2d::CCLabelBMFont::create("Color ID", "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v134 + 160LL))(v134);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v134);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, 0.0, 30.0);
cocos2d::CCPoint::operator+(v216, v209, v135);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v134 + 184LL))(v134, v209);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v226, 0.0, 0.0, 40.0, 40.0);
v136 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v221, (const struct cocos2d::CCRect *)&v226);
v137 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v136);
v138 = v137[40];
v139 = *(void (__fastcall **)(_QWORD *, __int64))(v138 + 40);
LOBYTE(v138) = 100;
v139(v137 + 40, v138);
(*(void (__fastcall **)(_QWORD *, void *))v137[40])(v137 + 40, &unk_140702F40);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v210, 50.0, 30.0);
(*(void (__fastcall **)(_QWORD *, __int128 **))(*v137 + 312LL))(v137, &v210);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v137,
0xFFFFFFFFLL);
(*(void (__fastcall **)(_QWORD *, _BYTE *))(*v137 + 184LL))(v137, v216);
v142 = CCTextInputNode::create(v141, v140, (__int64)"Num");
*(_QWORD *)(a1 + 1136) = v142;
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v142,
20);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 1136) + 184LL))(*(_QWORD *)(a1 + 1136), v216);
v143 = *(_QWORD *)(a1 + 1136);
*(_DWORD *)(v143 + 564) = 1058642330;
CCTextInputNode::refreshLabel(v143);
v144 = *(_QWORD *)(a1 + 1136);
*(_DWORD *)(v144 + 560) = 1128792064;
CCTextInputNode::refreshLabel(v144);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1136) + 592LL) + 336LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 1136) + 592LL),
0);
*(_DWORD *)(*(_QWORD *)(a1 + 1136) + 608LL) = 4;
v214 = 10;
v215 = 15;
*(_QWORD *)&v213 = *(_QWORD *)"0123456789";
*((_QWORD *)&v213 + 1) = *(unsigned __int16 *)"89";
BYTE10(v213) = 0;
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 1136), (void **)&v213);
v207 = -21896;
v145 = *(_QWORD *)(a1 + 1136);
*(_WORD *)(v145 + 572) = -21896;
*(_BYTE *)(v145 + 574) = -16;
CCTextInputNode::refreshLabel(v145);
v146 = *(_QWORD *)(a1 + 1136);
*(_DWORD *)(v146 + 568) = 1056964608;
CCTextInputNode::refreshLabel(v146);
v147 = a1 + 544;
*(_QWORD *)(*(_QWORD *)(a1 + 1136) + 600LL) = a1 + 544;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 1136) + 64LL))(*(_QWORD *)(a1 + 1136), 3);
*(_BYTE *)(*(_QWORD *)(a1 + 1136) + 424LL) = 1;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), v220, v216);
v148 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
v149 = CCMenuItemSpriteExtra::create(v148, 0, a1, (__int64)ColorSelectPopup::onSelectSpecialColor);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v149);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, 54.0, 28.5);
cocos2d::CCPoint::operator+(v216, v209, v150);
v151 = *(_QWORD *)v149;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v217, v209);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v151 + 184))(v149, v152);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v149 + 64LL))(v149, 6);
v153 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
LODWORD(v151) = (_DWORD)v153;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v153 + 160LL))(v153);
v154 = CCMenuItemSpriteExtra::create(v151, 0, a1, (__int64)ColorSelectPopup::onUpdateCustomColor);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v154);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v154 + 64LL))(v154, 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, -50.0, 0.0);
cocos2d::CCPoint::operator+(v220, v209, v155);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v154 + 184LL))(v154, v209);
*((_DWORD *)v154 + 93) = 0x40000000;
v156 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
LODWORD(v154) = (_DWORD)v156;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v156 + 160LL))(v156);
v157 = CCMenuItemSpriteExtra::create((int)v154, 0, a1, (__int64)ColorSelectPopup::onUpdateCustomColor);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v157);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v157 + 64LL))(v157, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, 50.0, 0.0);
cocos2d::CCPoint::operator+(v220, v209, v158);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v157 + 184LL))(v157, v209);
*((_DWORD *)v157 + 93) = 0x40000000;
ColorSelectPopup::updateTextInputLabel(a1);
}
else
{
v147 = a1 + 544;
}
v226 = *(_OWORD *)(a1 + 1176);
v159 = ConfigureHSVWidget::create(&v226, v133, 0);
*(_QWORD *)(a1 + 1168) = v159;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v159);
v160 = **(_QWORD **)(a1 + 1168);
v161 = *(_QWORD *)(a1 + 1168);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, (float)(v211 * 0.5) - 75.0, (float)(v212 * 0.5) + 45.0);
(*(void (__fastcall **)(__int64, __int64))(v160 + 184))(v161, v162);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1168) + 160LL))(*(_QWORD *)(a1 + 1168));
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), *(struct cocos2d::CCObject **)(a1 + 1168));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v224, (float)(v211 * 0.5) + 150.0, (float)(v212 * 0.5) + 90.0);
v163 = cocos2d::CCLabelBMFont::create("Channel ID", "goldFont.fnt");
(*(void (__fastcall **)(__int64, struct cocos2d::CCObject *))(*(_QWORD *)a1 + 464LL))(a1, v163);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v163 + 160LL))(v163);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v163 + 184LL))(v163, v224);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), v163);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, 0.0, -30.0);
cocos2d::CCPoint::operator+(v224, v223, v164);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v232, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v225, 50.0, 30.0);
v165 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v226, (const struct cocos2d::CCRect *)v232);
v166 = (struct cocos2d::CCObject *)cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v165);
v167 = *((_QWORD *)v166 + 40);
v168 = *(void (__fastcall **)(char *, __int64))(v167 + 40);
LOBYTE(v167) = 100;
v168((char *)v166 + 320, v167);
v207 = 0;
v208 = 0;
(**((void (__fastcall ***)(__int64, __int16 *))v166 + 40))((__int64)v166 + 320, &v207);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _DWORD *))(*(_QWORD *)v166 + 312LL))(v166, v225);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v166,
0xFFFFFFFFLL);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v166 + 184LL))(v166, v223);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), v166);
v171 = CCTextInputNode::create(v170, v169, (__int64)"Num");
*(_QWORD *)(a1 + 1208) = v171;
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v171, 20);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 1208) + 184LL))(*(_QWORD *)(a1 + 1208), v223);
v172 = *(_QWORD *)(a1 + 1208);
*(_DWORD *)(v172 + 564) = 1058642330;
CCTextInputNode::refreshLabel(v172);
v173 = *(_QWORD *)(a1 + 1208);
*(_DWORD *)(v173 + 560) = 1128792064;
CCTextInputNode::refreshLabel(v173);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1208) + 592LL) + 336LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 1208) + 592LL),
0);
*(_DWORD *)(*(_QWORD *)(a1 + 1208) + 608LL) = 6;
v214 = 10;
v215 = 15;
*(_QWORD *)&v213 = *(_QWORD *)"0123456789";
*((_QWORD *)&v213 + 1) = *(unsigned __int16 *)"89";
BYTE10(v213) = 0;
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 1208), (void **)&v213);
v207 = -21896;
v174 = *(_QWORD *)(a1 + 1208);
*(_WORD *)(v174 + 572) = -21896;
*(_BYTE *)(v174 + 574) = -16;
CCTextInputNode::refreshLabel(v174);
v175 = *(_QWORD *)(a1 + 1208);
*(_DWORD *)(v175 + 568) = 1056964608;
CCTextInputNode::refreshLabel(v175);
*(_QWORD *)(*(_QWORD *)(a1 + 1208) + 600LL) = v147;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 1208) + 64LL))(*(_QWORD *)(a1 + 1208), 4);
*(_BYTE *)(*(_QWORD *)(a1 + 1208) + 424LL) = 1;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), *(struct cocos2d::CCObject **)(a1 + 1208));
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), v230, v223);
v176 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
LODWORD(v163) = (_DWORD)v176;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v176 + 160LL))(v176);
v177 = CCMenuItemSpriteExtra::create((int)v163, 0, a1, (__int64)ColorSelectPopup::onUpdateCopyColor);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v177);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v177 + 64LL))(v177, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, -50.0, 0.0);
cocos2d::CCPoint::operator+(v230, &v210, v178);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int128 **))(*(_QWORD *)v177 + 184LL))(v177, &v210);
*((_DWORD *)v177 + 93) = 0x40000000;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), v177);
v179 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
LODWORD(v177) = (_DWORD)v179;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v179 + 160LL))(v179);
v180 = CCMenuItemSpriteExtra::create((int)v177, 0, a1, (__int64)ColorSelectPopup::onUpdateCopyColor);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v180);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v180 + 64LL))(v180, 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, 50.0, 0.0);
cocos2d::CCPoint::operator+(v230, &v210, v181);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int128 **))(*(_QWORD *)v180 + 184LL))(v180, &v210);
*((_DWORD *)v180 + 93) = 0x40000000;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), v180);
v182 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
v183 = CCMenuItemSpriteExtra::create(v182, 0, a1, (__int64)ColorSelectPopup::onSelectSpecialColor);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v183);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, 50.0, 25.0);
cocos2d::CCPoint::operator+(v224, &v210, v184);
v185 = *(_QWORD *)v183;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v217, &v210);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v185 + 184))(v183, v186);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1200), v183);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v183 + 64LL))(v183, 7);
v221[0] = &v213;
v213 = 0;
v214 = 0;
v215 = 0;
*(_QWORD *)&v213 = sub_14003D460(0xF0u);
v214 = 238;
v215 = 239;
strcpy(
(char *)v213,
"Change the attributes of a color channel. Each color channel is separated by a Color ID, which goe"
"s up to 999.\n"
"This color channel can then be set in specific objects.\n"
"Copy Color inherits color from another channel.");
v226 = 0;
v227 = 4;
v228 = 15;
strcpy((char *)&v226, "Help");
v187 = (__int64 *)InfoAlertButton::create(&v226, &v213);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v187);
v188 = *v187;
v189 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v221,
(float)(v211 * 0.5) - 100.0,
(float)((float)(*(float *)(a1 + 736) * 0.5) + (float)(v212 * 0.5)) - 18.0);
cocos2d::CCNode::convertToNodeSpace(v189, &v217, v190);
(*(void (__fastcall **)(__int64 *, __int64))(v188 + 184))(v187, v191);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v231, (float)(v211 * 0.5) - 154.0, (float)(v212 * 0.5) + 30.0);
v192 = 0;
v207 = 0;
v218 = -21896;
while ( 1 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v221, (float)((float)v192 - 1.0) * 42.0, 22.0);
cocos2d::CCPoint::operator+(v231, v216, v193);
if ( v192 == 3 )
break;
if ( v192 )
{
if ( v192 != 1 )
goto LABEL_53;
v195 = "G:";
}
else
{
v195 = "R:";
}
LABEL_55:
v196 = cocos2d::CCLabelBMFont::create(v195, "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v196 + 160LL))(v196);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v196);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v220, 0.0, 20.0);
cocos2d::CCPoint::operator+(v216, v209, v197);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v196 + 184LL))(v196, v209);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), v196);
v198 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v213, (const struct cocos2d::CCRect *)v232);
v199 = (struct cocos2d::CCObject *)cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v198);
v200 = *((_QWORD *)v199 + 40);
v201 = *(void (__fastcall **)(char *, __int64))(v200 + 40);
LOBYTE(v200) = 100;
v201((char *)v199 + 320, v200);
v218 = 0;
v219 = 0;
(**((void (__fastcall ***)(__int64, __int16 *))v199 + 40))((__int64)v199 + 320, &v218);
if ( v192 == 3 )
v225[0] = 1120403456;
(*(void (__fastcall **)(struct cocos2d::CCObject *, _DWORD *))(*(_QWORD *)v199 + 312LL))(v199, v225);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v199 + 160LL))(v199);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v199,
0xFFFFFFFFLL);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v199 + 184LL))(v199, v216);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), v199);
v203 = CCTextInputNode::create(40, v202, (__int64)"Num");
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v203,
20);
(*(void (__fastcall **)(char *, _BYTE *))(*(_QWORD *)v203 + 184LL))(v203, v216);
*((_DWORD *)v203 + 141) = 1053609165;
CCTextInputNode::refreshLabel((__int64)v203);
*((_DWORD *)v203 + 140) = 1112014848;
CCTextInputNode::refreshLabel((__int64)v203);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)v203 + 74) + 336LL))(*((_QWORD *)v203 + 74), 0);
v204 = 7;
if ( v192 < 3 )
v204 = 4;
*((_DWORD *)v203 + 152) = v204;
v205 = "0123456789ABCDEFabcdef";
if ( v192 < 3 )
v205 = "0123456789";
v233 = 0;
v234 = 0;
v235 = 0;
v206 = -1;
do
++v206;
while ( v205[v206] );
sub_14003D230(&v233, v205, v206);
CCTextInputNode::setAllowedChars((__int64)v203, (void **)&v233);
*((_WORD *)v203 + 286) = -21896;
v203[574] = -16;
CCTextInputNode::refreshLabel((__int64)v203);
*((_DWORD *)v203 + 142) = 1053609165;
CCTextInputNode::refreshLabel((__int64)v203);
*((_QWORD *)v203 + 75) = v147;
v203[424] = v192 < 3;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1192), (struct cocos2d::CCObject *)v203);
if ( v192 )
{
if ( v192 == 1 )
{
*(_QWORD *)(a1 + 1256) = v203;
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v203 + 64LL))(v203, 9);
v192 = 2;
}
else
{
if ( v192 != 2 )
{
*(_QWORD *)(a1 + 1272) = v203;
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v203 + 64LL))(v203, 11);
ColorSelectPopup::updateHSVMode(a1);
ColorSelectPopup::updateCopyColorTextInputLabel(a1);
*(_BYTE *)(a1 + 744) = 0;
*(_BYTE *)(a1 + 1156) = 0;
return 1;
}
*(_QWORD *)(a1 + 1264) = v203;
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v203 + 64LL))(v203, 10);
v192 = 3;
}
}
else
{
*(_QWORD *)(a1 + 1248) = v203;
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v203 + 64LL))(v203, 8);
v192 = 1;
}
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v217, 0.0, -22.0);
cocos2d::CCPoint::operator+(v231, &v210, v194);
cocos2d::CCPoint::operator=(v216, &v210);
LABEL_53:
v195 = "HEX:";
if ( v192 == 2 )
v195 = "B:";
goto LABEL_55;
}
return result;
}