//
// ColorSelectPopup::init from 0x14008dce0 to 0x14009044e (10094 bytes)
//
// 2 xrefs:
// > ColorSelectPopup::create @ 0x14008dc99
// > ??> @ 0x1406c6ed0
//
// 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=7
bool ColorSelectPopup::init(ColorSelectPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3, ColorAction *a4)
{
bool result; // al
__int64 v7; // rcx
cocos2d::CCArray *v8; // rax
__int64 v9; // rcx
cocos2d::CCArray *v10; // rax
__int64 v11; // rdx
__int64 v12; // rcx
cocos2d::CCDirector *v13; // rax
bool v14; // r12
cocos2d::extension::CCControlColourPicker *v15; // rax
cocos2d::extension::CCControlColourPicker_vtbl *v16; // rbx
const cocos2d::CCPoint *v17; // rax
struct cocos2d::CCLabelBMFont *v18; // rdi
cocos2d::CCLabelBMFont_vtbl *v19; // rbx
const cocos2d::CCPoint *v20; // rax
ButtonSprite *v21; // rbx
CCMenuItemSpriteExtra *v22; // rax
struct cocos2d::CCLabelBMFont *v23; // rdi
cocos2d::CCLabelBMFont_vtbl *v24; // rbx
const cocos2d::CCPoint *v25; // rax
struct cocos2d::CCRect *v26; // rax
struct cocos2d::extension::CCScale9Sprite *v27; // rdi
__int64 v28; // rdx
const char *v29; // r9
const char *v30; // r8
CCTextInputNode *v31; // rax
CCTextInputNode_vtbl *v32; // rbx
__int64 v33; // rax
CCTextInputNode *m_fadeTimeInput; // rcx
CCTextInputNode *v35; // rcx
std::string *p_m_allowedChars; // rcx
CCTextInputNode *v37; // rcx
CCTextInputNode *v38; // rcx
const char *v39; // r8
Slider *v40; // rax
float v41; // xmm1_4
SliderThumb *m_thumb; // rcx
cocos2d::CCLabelBMFont *v43; // rax
cocos2d::CCLabelBMFont_vtbl *v44; // rbx
const cocos2d::CCPoint *v45; // rax
const char *v46; // r8
Slider *v47; // rax
const cocos2d::CCPoint *v48; // rax
SliderThumb *v49; // rcx
Slider *m_opacitySlider; // rdi
float Value; // xmm0_4
float m_width; // xmm3_4
cocos2d::CCSprite_vtbl *v53; // rbx
const cocos2d::CCRect *v54; // rax
ButtonSprite *v55; // rax
cocos2d::CCNode *v56; // rdi
ButtonSprite *v57; // rax
cocos2d::CCNode *v58; // rsi
ButtonSprite *v59; // rbx
CCMenuItemSpriteExtra *v60; // rdi
CCMenuItemSpriteExtra *v61; // rsi
CCMenuItemSpriteExtra *v62; // r15
CCMenuItemSpriteExtra_vtbl *v63; // rbx
struct cocos2d::CCPoint v64; // rax
__int64 v65; // rax
__int64 v66; // rax
int v67; // r9d
int v68; // r9d
__int64 v69; // rax
int v70; // r9d
__int64 v71; // rax
int v72; // r9d
__int64 v73; // rax
__int64 v74; // rax
CCMenuItemToggler *v75; // rax
CCMenuItemToggler *v76; // rax
float *v77; // rax
float *v78; // rbx
struct cocos2d::CCPoint v79; // rax
struct cocos2d::CCSprite *v80; // rsi
struct cocos2d::CCSprite *v81; // rbx
CCMenuItemToggler *v82; // rdi
CCMenuItemToggler_vtbl *v83; // rbx
struct cocos2d::CCPoint v84; // rax
struct cocos2d::CCLabelBMFont *v85; // rdi
cocos2d::CCLabelBMFont_vtbl *v86; // rbx
const cocos2d::CCPoint *v87; // rax
float *v88; // rax
float *v89; // rax
CCMenuItemToggler *ToggleButton; // rbx
cocos2d::CCNode *v91; // rdi
cocos2d::CCSprite *v92; // rax
cocos2d::CCSprite_vtbl *v93; // rbx
const cocos2d::CCPoint *v94; // rax
float width; // xmm6_4
cocos2d::CCSprite *v96; // rax
float v97; // xmm2_4
const cocos2d::CCPoint *v98; // rax
bool v99; // dl
struct cocos2d::CCLabelBMFont *v100; // rbx
struct cocos2d::CCRect *v101; // rax
struct cocos2d::extension::CCScale9Sprite *v102; // rdi
__int64 v103; // rdx
const char *v104; // r9
CCTextInputNode *v105; // rax
CCTextInputNode *m_colorInput; // rcx
CCTextInputNode *v107; // rcx
std::string *v108; // rcx
CCTextInputNode *v109; // rcx
CCTextInputNode *v110; // rcx
TextInputDelegate *v111; // r15
struct cocos2d::CCSprite *v112; // rax
CCMenuItemSpriteExtra *v113; // rdi
CCMenuItemSpriteExtra_vtbl *v114; // rbx
struct cocos2d::CCPoint v115; // rax
struct cocos2d::CCSprite *v116; // rbx
cocos2d::CCNode *v117; // rbx
struct cocos2d::CCSprite *v118; // rbx
cocos2d::CCNode *v119; // rbx
ConfigureHSVWidget *v120; // rax
ConfigureHSVWidget_vtbl *v121; // rbx
const cocos2d::CCPoint *v122; // rax
struct cocos2d::CCLabelBMFont *v123; // rbx
struct cocos2d::CCRect *v124; // rax
struct cocos2d::extension::CCScale9Sprite *v125; // rdi
__int64 v126; // rdx
const char *v127; // r9
CCTextInputNode *v128; // rax
CCTextInputNode *m_copyColorInput; // rcx
CCTextInputNode *v130; // rcx
std::string *v131; // rcx
CCTextInputNode *v132; // rcx
CCTextInputNode *v133; // rcx
struct cocos2d::CCSprite *v134; // rbx
cocos2d::CCNode *v135; // rbx
struct cocos2d::CCSprite *v136; // rbx
cocos2d::CCNode *v137; // rbx
struct cocos2d::CCSprite *v138; // rax
CCMenuItemSpriteExtra *v139; // rdi
CCMenuItemSpriteExtra_vtbl *v140; // rbx
struct cocos2d::CCPoint v141; // rax
cocos2d::CCNode *v142; // rdi
cocos2d::CCNode_vtbl *v143; // rbx
struct cocos2d::CCPoint v144; // rax
int v145; // edi
const char *v146; // rcx
struct cocos2d::CCLabelBMFont *v147; // rbx
struct cocos2d::CCRect *v148; // rax
struct cocos2d::extension::CCScale9Sprite *v149; // rsi
__int64 v150; // rdx
const char *v151; // r9
int v152; // eax
CCTextInputNode *v153; // rbx
int v154; // eax
__int64 *v155; // rdx
size_t v156; // r8
void **v157; // rdx
int v158; // [rsp+28h] [rbp-E0h]
int v159; // [rsp+28h] [rbp-E0h]
int v160; // [rsp+28h] [rbp-E0h]
int v161; // [rsp+28h] [rbp-E0h]
__int16 v162; // [rsp+88h] [rbp-80h] BYREF
GLubyte b; // [rsp+8Ah] [rbp-7Eh]
cocos2d::CCPoint v164; // [rsp+98h] [rbp-70h] BYREF
ButtonSprite *v165; // [rsp+A0h] [rbp-68h] BYREF
float v166; // [rsp+A8h] [rbp-60h]
float v167; // [rsp+ACh] [rbp-5Ch]
cocos2d::CCPoint v168; // [rsp+B0h] [rbp-58h] BYREF
unsigned __int128 v169; // [rsp+B8h] [rbp-50h] BYREF
__int64 v170; // [rsp+C8h] [rbp-40h]
__int64 v171; // [rsp+D0h] [rbp-38h]
void **v172; // [rsp+D8h] [rbp-30h] BYREF
unsigned __int128 *v173; // [rsp+E0h] [rbp-28h] BYREF
__int16 v174; // [rsp+E8h] [rbp-20h] BYREF
char v175; // [rsp+EAh] [rbp-1Eh]
cocos2d::CCPoint v176; // [rsp+F0h] [rbp-18h] BYREF
cocos2d::CCPoint v177; // [rsp+F8h] [rbp-10h] BYREF
cocos2d::CCPoint v178; // [rsp+100h] [rbp-8h] BYREF
cocos2d::CCPoint v179; // [rsp+108h] [rbp+0h] BYREF
cocos2d::CCSize v180; // [rsp+110h] [rbp+8h] BYREF
cocos2d::ccHSVValue m_hsv; // [rsp+118h] [rbp+10h] BYREF
__int64 v182; // [rsp+128h] [rbp+20h]
__int64 v183; // [rsp+130h] [rbp+28h]
char Src[12]; // [rsp+138h] [rbp+30h] BYREF
int v185; // [rsp+144h] [rbp+3Ch]
__int64 v186; // [rsp+148h] [rbp+40h]
__int64 v187; // [rsp+150h] [rbp+48h]
cocos2d::CCPoint v188; // [rsp+158h] [rbp+50h] BYREF
struct cocos2d::CCPoint v189; // [rsp+160h] [rbp+58h] BYREF
cocos2d::CCPoint v190; // [rsp+168h] [rbp+60h] BYREF
void *v191[2]; // [rsp+170h] [rbp+68h] BYREF
__int64 v192; // [rsp+180h] [rbp+78h]
__int64 v193; // [rsp+188h] [rbp+80h]
_QWORD v194[4]; // [rsp+190h] [rbp+88h] BYREF
void *v195[2]; // [rsp+1B0h] [rbp+A8h] BYREF
size_t Size; // [rsp+1C0h] [rbp+B8h]
unsigned __int64 v197; // [rsp+1C8h] [rbp+C0h]
cocos2d::CCRect v198; // [rsp+1D0h] [rbp+C8h] BYREF
cocos2d::CCRect v199[11]; // [rsp+1E0h] [rbp+D8h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 450.0, 300.0, 1);
if ( result )
{
if ( a4 )
{
a1->m_colorAction = a4;
cocos2d::CCObject::retain(a4);
}
v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7);
a1->m_colorObjects = v8;
cocos2d::CCObject::retain(v8);
v10 = (cocos2d::CCArray *)cocos2d::CCArray::create(v9);
a1->m_copyObjects = v10;
cocos2d::CCObject::retain(v10);
a1->m_initializing = 1;
a1->determineStartValues(a1);
LOBYTE(v11) = -56;
a1->setOpacity(&a1->cocos2d::CCRGBAProtocol, v11);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize(v13);
v14 = a1->m_gameObject || a1->m_gameObjects;
v15 = (cocos2d::extension::CCControlColourPicker *)cocos2d::extension::CCControlColourPicker::create();
a1->m_colorPicker = v15;
v15->m_delegate = &a1->cocos2d::extension::ColorPickerDelegate;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_colorPicker, 10);
v16 = a1->m_colorPicker->__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, v166 * 0.5, (float)(16 * v14 + 20) + (float)(v167 * 0.5));
v16->setPosition_0(a1->m_colorPicker, v17);
cocos2d::CCArray::addObject(a1->m_colorObjects, a1->m_colorPicker);
v18 = cocos2d::CCLabelBMFont::create("Select Color", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v18->setScale_0)(v18);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, v18);
v19 = v18->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, v166 * 0.5, (float)(v167 * 0.5) + 135.0);
v19->setPosition_0(v18, v20);
v165 = (ButtonSprite *)operator new(0x2C0u);
v21 = ButtonSprite::ButtonSprite(v165);
if ( v21 )
{
if ( ButtonSprite::init_1(v21, "OK", 40, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_01.png", 30.0) )
{
cocos2d::CCObject::autorelease(v21);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v21->~ButtonSprite)(v21, 1);
v21 = nullptr;
}
}
v22 = CCMenuItemSpriteExtra::create(
v21,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::closeColorSelect);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v22);
a1->m_joystickConnected = -1;
if ( v14 && !a1->m_noChannel )
{
cocos2d::CCPoint::CCPoint(
&v168,
(float)(int)(a1->m_newColorTrigger ? 0xFFFFFFF6 : 0) + (float)(v166 * 0.5),
(float)(v167 * 0.5) - 68.0);
v23 = cocos2d::CCLabelBMFont::create("Fade Time: ", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v23->setScale_0)(v23);
v23->setPosition_0(v23, &v168);
v24 = v23->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 1.0, 0.5);
v24->setAnchorPoint(v23, v25);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, v23);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&m_hsv, 0.0, 0.0, 40.0, 40.0);
v26 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect(&v198, (const struct cocos2d::CCRect *)&m_hsv);
v27 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v26);
LOBYTE(v28) = 100;
v27->setOpacity(&v27->cocos2d::CCRGBAProtocol, v28);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v176, 70.0, 30.0);
v27->setContentSize(v27, (const cocos2d::CCSize *)&v176);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v27, -1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 45.0, 0.0);
cocos2d::CCPoint::operator+(&v168, &v164);
v27->setPosition_0(v27, &v164);
v30 = "Num";
if ( a1->m_fadeTime == -99999.0 )
v30 = "Mixed";
v31 = CCTextInputNode::create(50.0, 40.0, v30, v29, v158, (const char *)&qword_14052A4D8);
a1->m_fadeTimeInput = v31;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v31, 20);
v32 = a1->m_fadeTimeInput->__vftable;
v33 = (__int64)v27->getPosition_0(v27);
v32->setPosition_0(a1->m_fadeTimeInput, (const cocos2d::CCPoint *)v33);
m_fadeTimeInput = a1->m_fadeTimeInput;
m_fadeTimeInput->m_maxLabelScale = 0.60000002;
CCTextInputNode::refreshLabel(m_fadeTimeInput);
v35 = a1->m_fadeTimeInput;
v35->m_maxLabelWidth = 200.0;
CCTextInputNode::refreshLabel(v35);
a1->m_fadeTimeInput->m_textField->setVisible(a1->m_fadeTimeInput->m_textField, 0);
a1->m_fadeTimeInput->m_maxLabelLength = 5;
v185 = 0;
v186 = 11;
v187 = 15;
strcpy(Src, "0123456789.");
v165 = (ButtonSprite *)Src;
p_m_allowedChars = &a1->m_fadeTimeInput->m_allowedChars;
if ( p_m_allowedChars != (std::string *)Src )
sub_14003CCE0((void **)p_m_allowedChars, Src, 0xBu);
sub_14003A830((__int64)Src);
v162 = -21896;
v37 = a1->m_fadeTimeInput;
*(_WORD *)&v37->m_placeholderColor.r = -21896;
v37->m_placeholderColor.b = -16;
CCTextInputNode::refreshLabel(v37);
v38 = a1->m_fadeTimeInput;
v38->m_placeholderScale = 0.5;
CCTextInputNode::refreshLabel(v38);
a1->m_fadeTimeInput->m_delegate = &a1->TextInputDelegate;
a1->m_fadeTimeInput->setTag(a1->m_fadeTimeInput, 5);
a1->m_fadeTimeInput->m_numberInput = 1;
v40 = Slider::create(
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::sliderChanged,
v39,
"slidergroove.png",
"sliderthumb.png",
"sliderthumbsel.png",
0.80000001);
a1->m_fadeTimeSlider = v40;
v40->m_sliderBar->setVisible(v40->m_sliderBar, 0);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, a1->m_fadeTimeSlider);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 0.0, -28.0);
cocos2d::CCPoint::operator+(&v168, &v164);
a1->m_fadeTimeSlider->setPosition_0(a1->m_fadeTimeSlider, &v164);
v41 = fminf(1.0, a1->m_fadeTime / 10.0);
if ( v41 < 0.0 )
v41 = 0.0;
Slider::setValue(a1->m_fadeTimeSlider, v41);
m_thumb = a1->m_fadeTimeSlider->m_touchLogic->m_thumb;
m_thumb->setTag(m_thumb, 1);
ColorSelectPopup::updateDurLabel(a1);
}
v162 = *(_WORD *)&a1->m_currentColor.r;
b = a1->m_currentColor.b;
a1->m_colorPicker->setColorValue(a1->m_colorPicker, (const cocos2d::ccColor3B *)&v162);
if ( a1->m_colorTrigger && !a1->m_noChannel )
{
v43 = cocos2d::CCLabelBMFont::create(" ", "goldFont.fnt");
a1->m_opacityLabel = v43;
a1->m_mainLayer->addChild_1(a1->m_mainLayer, v43);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_opacityLabel->setScale_0)(a1->m_opacityLabel);
v44 = a1->m_opacityLabel->__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, (float)(v166 * 0.5) + 150.0, (float)(v167 * 0.5) - 15.0);
v44->setPosition_0(a1->m_opacityLabel, v45);
v47 = Slider::create(
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::sliderChanged,
v46,
"slidergroove.png",
"sliderthumb.png",
"sliderthumbsel.png",
0.55000001);
a1->m_opacitySlider = v47;
v47->m_sliderBar->setVisible(v47->m_sliderBar, 0);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, a1->m_opacitySlider);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 0.0, -20.0);
v48 = a1->m_opacityLabel->getPosition_0(a1->m_opacityLabel);
cocos2d::CCPoint::operator+(v48, &v164);
a1->m_opacitySlider->setPosition_0(a1->m_opacitySlider, &v164);
v49 = a1->m_opacitySlider->m_touchLogic->m_thumb;
v49->setTag(v49, 2);
ColorSelectPopup::updateOpacityLabel(a1);
m_opacitySlider = a1->m_opacitySlider;
SliderThumb::setValue(m_opacitySlider->m_touchLogic->m_thumb, a1->m_opacity);
Value = SliderThumb::getValue(m_opacitySlider->m_touchLogic->m_thumb);
m_width = m_opacitySlider->m_width;
if ( (float)(Value * m_width) <= m_width )
m_width = m_width * Value;
v53 = m_opacitySlider->m_sliderBar->__vftable;
v54 = (const cocos2d::CCRect *)((const cocos2d::CCRect *(__fastcall *)(cocos2d::CCRect *__hidden, float, float, float, float))cocos2d::CCRect::CCRect)(
(cocos2d::CCRect *)&m_hsv,
0.0,
0.0,
m_width,
m_opacitySlider->m_height);
v53->setTextureRect_0(m_opacitySlider->m_sliderBar, v54);
}
v165 = (ButtonSprite *)operator new(0x2C0u);
v55 = ButtonSprite::ButtonSprite(v165);
v56 = v55;
if ( v55 )
{
if ( ButtonSprite::init_1(v55, "Copy", 40, 0, 0.60000002, 1, "goldFont.fnt", "GJ_button_04.png", 30.0) )
{
cocos2d::CCObject::autorelease(v56);
}
else
{
((void (__fastcall *)(cocos2d::CCNode *, __int64))v56->~CCNode)(v56, 1);
v56 = nullptr;
}
}
v165 = (ButtonSprite *)operator new(0x2C0u);
v57 = ButtonSprite::ButtonSprite(v165);
v58 = v57;
if ( v57 )
{
if ( ButtonSprite::init_1(v57, "Paste", 40, 0, 0.60000002, 1, "goldFont.fnt", "GJ_button_04.png", 30.0) )
{
cocos2d::CCObject::autorelease(v58);
}
else
{
((void (__fastcall *)(cocos2d::CCNode *, __int64))v58->~CCNode)(v58, 1);
v58 = nullptr;
}
}
v165 = (ButtonSprite *)operator new(0x2C0u);
v59 = ButtonSprite::ButtonSprite(v165);
if ( v59 )
{
if ( ButtonSprite::init_1(v59, "Default", 40, 0, 0.60000002, 1, "goldFont.fnt", "GJ_button_04.png", 30.0) )
{
cocos2d::CCObject::autorelease(v59);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v59->~ButtonSprite)(v59, 1);
v59 = nullptr;
}
}
v60 = CCMenuItemSpriteExtra::create(v56, nullptr, a1, (cocos2d::SEL_MenuHandler *)ColorSelectPopup::onCopy);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v60);
v61 = CCMenuItemSpriteExtra::create(v58, nullptr, a1, (cocos2d::SEL_MenuHandler *)ColorSelectPopup::onPaste);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v61);
v62 = CCMenuItemSpriteExtra::create(v59, nullptr, a1, (cocos2d::SEL_MenuHandler *)ColorSelectPopup::onDefault);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v62);
v63 = v60->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, (float)(v166 * 0.5) + 190.0, (float)(v167 * 0.5) + 130.0);
v64 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v164);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v63->setPosition_0)(v60, v64);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 0.0, -40.0);
v65 = (__int64)v60->getPosition_0(v60);
cocos2d::CCPoint::operator+(v65, &v164);
v61->setPosition_0(v61, &v164);
cocos2d::CCArray::addObject(a1->m_colorObjects, v60);
cocos2d::CCArray::addObject(a1->m_colorObjects, v61);
if ( v62 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 0.0, -40.0);
v66 = (__int64)v61->getPosition_0(v61);
cocos2d::CCPoint::operator+(v66, &v164);
v62->setPosition_0(v62, &v164);
cocos2d::CCArray::addObject(a1->m_colorObjects, v62);
}
cocos2d::CCPoint::CCPoint(&v177, (float)(v166 * 0.5) + 64.0, (float)(v167 * 0.5) - 130.0);
cocos2d::CCPoint::CCPoint(&v188, (float)(v166 * 0.5) - 205.0, (float)(v167 * 0.5) - 90.0);
if ( !a1->m_noChannel )
{
v165 = (ButtonSprite *)&v169;
v170 = 14;
v171 = 15;
strcpy((char *)&v169, "Player\nColor 1");
HIBYTE(v169) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v173, 0.0, -40.0);
cocos2d::CCPoint::operator+(&v188, &v164);
LOBYTE(v67) = a1->m_playerColor == 1;
a1->m_playerColor1Toggle = (CCMenuItemToggler *)((__int64 (__fastcall *)(_DWORD, unsigned int, unsigned int, int, __int64))SetupTriggerPopup::createToggleButton)(
(_DWORD)a1,
(unsigned int)&v169,
(unsigned int)ColorSelectPopup::onPlayerColor1,
v67,
(__int64)&v164);
v173 = &v169;
v170 = 14;
v171 = 15;
strcpy((char *)&v169, "Player\nColor 2");
HIBYTE(v169) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, (float)(v166 * 0.5) - 108.0, (float)(v167 * 0.5) - 130.0);
LOBYTE(v68) = a1->m_playerColor == 2;
a1->m_playerColor2Toggle = (CCMenuItemToggler *)((__int64 (__fastcall *)(_DWORD, unsigned int, unsigned int, int, __int64))SetupTriggerPopup::createToggleButton)(
(_DWORD)a1,
(unsigned int)&v169,
(unsigned int)ColorSelectPopup::onPlayerColor2,
v68,
v69);
if ( a1->m_backgroundTrigger )
{
v173 = &v169;
v170 = 11;
v171 = 15;
*(_QWORD *)&v169 = 0x6F72470A746E6954LL;
*((_QWORD *)&v169 + 1) = 6581877;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 90.0, 40.0);
cocos2d::CCPoint::operator+(&v177, &v164);
SetupTriggerPopup::createToggleButton(
(_DWORD)a1,
(unsigned int)&v169,
(unsigned int)ColorSelectPopup::onTintGround,
a1->m_tintGround,
(__int64)&v164);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v173, 0.0, -9.0);
cocos2d::CCPoint::operator+(&v188, &v168);
if ( a1->m_colorTrigger )
{
v173 = &v169;
v170 = 8;
v171 = 15;
v169 = 0x676E69646E656C42uLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, &v168);
LOBYTE(v70) = a1->m_blending == 1;
SetupTriggerPopup::createToggleButton(
(_DWORD)a1,
(unsigned int)&v169,
(unsigned int)ColorSelectPopup::onToggleTintMode,
v70,
v71);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v173, 0.0, 30.0);
cocos2d::CCPoint::operator+(&v168, &v164);
cocos2d::CCPoint::operator=(&v168, &v164);
}
v173 = &v169;
*((_QWORD *)&v169 + 1) = 29295;
v170 = 10;
v171 = 15;
*(_QWORD *)&v169 = 0x6C6F432079706F43LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, &v168);
LOBYTE(v72) = a1->m_copyColorID != 0;
SetupTriggerPopup::createToggleButton(
(_DWORD)a1,
(unsigned int)&v169,
(unsigned int)ColorSelectPopup::onToggleHSVMode,
v72,
v73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v173, 0.0, 30.0);
cocos2d::CCPoint::operator+(&v168, &v164);
cocos2d::CCPoint::operator=(&v168, &v164);
if ( v14 )
{
v173 = &v169;
v170 = 13;
v171 = 15;
strcpy((char *)&v169, "Touch\nTrigger");
HIWORD(v169) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, &v177);
SetupTriggerPopup::createToggleButton(
(_DWORD)a1,
(unsigned int)&v169,
(unsigned int)SetupTriggerPopup::onTouchTriggered,
a1->m_touchTriggered,
v74);
a1->m_touchToggle = v75;
v173 = &v169;
v170 = 13;
v171 = 15;
strcpy((char *)&v169, "Spawn\nTrigger");
HIWORD(v169) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 90.0, 0.0);
cocos2d::CCPoint::operator+(&v177, &v164);
SetupTriggerPopup::createToggleButton(
(_DWORD)a1,
(unsigned int)&v169,
(unsigned int)SetupTriggerPopup::onSpawnedByTrigger,
a1->m_spawnTriggered,
(__int64)&v164);
a1->m_spawnToggle = v76;
v173 = &v169;
v170 = 13;
v171 = 15;
strcpy((char *)&v169, "Multi\nTrigger");
HIWORD(v169) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 8.0, 0.0);
v78 = v77;
cocos2d::CCPoint::CCPoint(&v164, &v168);
GameToolbox::createToggleButton(
(const char *)&v169,
(cocos2d::SEL_MenuHandler *)SetupTriggerPopup::onMultiTrigger,
a1->m_multiTriggered,
a1->m_buttonMenu,
v79,
a1,
a1->m_mainLayer,
0.69999999,
0.34999999,
110.0,
v78,
(const char *)&qword_14052A4D8,
0,
0,
a1->m_multiTriggerContainer);
SetupTriggerPopup::updateMultiTriggerBtn(a1);
}
cocos2d::CCPoint::CCPoint(&v176, (float)(v166 * 0.5) + 110.0, (float)(v167 * 0.5) + 18.0);
v80 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png");
v81 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v80->setScale_0)(v80);
((void (__fastcall *)(struct cocos2d::CCSprite *))v81->setScale_0)(v81);
v82 = CCMenuItemToggler::create(v80, v81, a1, (cocos2d::SEL_MenuHandler *)ColorSelectPopup::onCopyOpacity);
CCMenuItemToggler::toggle(v82, !a1->m_copyOpacity);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v82);
v83 = v82->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v84 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v173);
((void (__fastcall *)(CCMenuItemToggler *, struct cocos2d::CCPoint))v83->setPosition_0)(v82, v84);
*(_DWORD *)(*(_QWORD *)&v82->m_nScriptTapHandler + 372LL) = 1069547520;
HIDWORD(v82->m_offButton->m_pfnSelector.adj) = 1069547520;
CCMenuItemToggler::toggle(v82, (bool)v82->m_onButton);
cocos2d::CCArray::addObject(a1->m_copyObjects, v82);
v85 = cocos2d::CCLabelBMFont::create("Copy Opacity", (const char *)&qword_14052A4D8);
a1->addChild_1(a1, v85);
v86 = v85->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v173, 0.0, 0.5);
v86->setAnchorPoint(v85, v87);
v88 = (float *)v80->getContentSize(v80);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v173, (float)((float)(*v88 * 0.5) * 0.69999999) + 8.0, 0.0);
cocos2d::CCPoint::operator+(&v176, &v164);
v85->setPosition_0(v85, &v164);
cocos2d::CCLabelBMFont::limitLabelWidth(v85, 110.0, 0.34999999, 0.0);
cocos2d::CCArray::addObject(a1->m_copyObjects, v85);
v173 = &v169;
*((_QWORD *)&v169 + 1) = 22099;
v170 = 10;
v171 = 15;
*(_QWORD *)&v169 = 0x480A79636167654CLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v165, 0.0, 100.0);
cocos2d::CCPoint::operator+(&v176, &v164);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 8.0, 0.0);
ToggleButton = GameToolbox::createToggleButton(
(const char *)&v169,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::onHSVLegacyMode,
!a1->m_legacyHSV,
a1->m_buttonMenu,
(struct cocos2d::CCPoint)&v164,
a1,
a1->m_mainLayer,
0.69999999,
0.30000001,
0.0,
v89,
(const char *)&qword_14052A4D8,
0,
111,
nullptr);
v91 = a1->m_mainLayer->getChildByTag(a1->m_mainLayer, 111);
cocos2d::CCArray::addObject(a1->m_copyObjects, ToggleButton);
if ( v91 )
cocos2d::CCArray::addObject(a1->m_copyObjects, v91);
}
v92 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
a1->m_currentColorSprite = v92;
((void (__fastcall *)(cocos2d::CCSprite *))v92->setScale_0)(v92);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_currentColorSprite, 5);
v93 = a1->m_currentColorSprite->__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, (float)(v166 * 0.5) - 200.0, (float)(v167 * 0.5) + 125.0);
v93->setPosition_0(a1->m_currentColorSprite, v94);
width = a1->m_currentColorSprite->getContentSize(a1->m_currentColorSprite)->width;
v96 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
a1->m_originalColorSprite = v96;
((void (__fastcall *)(cocos2d::CCSprite *))v96->setScaleY)(v96);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_originalColorSprite, 5);
v97 = (float)((float)-width * 0.5) - (float)(width * 0.5) * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 0.0, v97);
v98 = a1->m_currentColorSprite->getPosition_0(a1->m_currentColorSprite);
cocos2d::CCPoint::operator+(v98, &v164);
a1->m_originalColorSprite->setPosition_0(a1->m_originalColorSprite, &v164);
cocos2d::CCArray::addObject(a1->m_colorObjects, a1->m_currentColorSprite);
cocos2d::CCArray::addObject(a1->m_colorObjects, a1->m_originalColorSprite);
if ( a1->m_newColorTrigger )
{
cocos2d::CCPoint::CCPoint(&v168, (float)(v166 * 0.5) + 150.0, (float)(v167 * 0.5) - 90.0);
v100 = cocos2d::CCLabelBMFont::create("Color ID", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v100->setScale_0)(v100);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, v100);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 0.0, 30.0);
cocos2d::CCPoint::operator+(&v168, &v164);
v100->setPosition_0(v100, &v164);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&m_hsv, 0.0, 0.0, 40.0, 40.0);
v101 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect(&v198, (const struct cocos2d::CCRect *)&m_hsv);
v102 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v101);
LOBYTE(v103) = 100;
v102->setOpacity(&v102->cocos2d::CCRGBAProtocol, v103);
v102->setColor(&v102->cocos2d::CCRGBAProtocol, &stru_1405299F4);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v165, 50.0, 30.0);
v102->setContentSize(v102, (const cocos2d::CCSize *)&v165);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v102, -1);
v102->setPosition_0(v102, &v168);
v105 = CCTextInputNode::create(50.0, 40.0, "Num", v104, v159, (const char *)&qword_14052A4D8);
a1->m_colorInput = v105;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v105, 20);
a1->m_colorInput->setPosition_0(a1->m_colorInput, &v168);
m_colorInput = a1->m_colorInput;
m_colorInput->m_maxLabelScale = 0.60000002;
CCTextInputNode::refreshLabel(m_colorInput);
v107 = a1->m_colorInput;
v107->m_maxLabelWidth = 200.0;
CCTextInputNode::refreshLabel(v107);
a1->m_colorInput->m_textField->setVisible(a1->m_colorInput->m_textField, 0);
a1->m_colorInput->m_maxLabelLength = 4;
v191[1] = (void *)14648;
v192 = 10;
v193 = 15;
v191[0] = (void *)0x3736353433323130LL;
v172 = v191;
v108 = &a1->m_colorInput->m_allowedChars;
if ( v108 != (std::string *)v191 )
sub_14003CCE0((void **)v108, v191, 0xAu);
sub_14003A830((__int64)v191);
v162 = -21896;
v109 = a1->m_colorInput;
*(_WORD *)&v109->m_placeholderColor.r = -21896;
v109->m_placeholderColor.b = -16;
CCTextInputNode::refreshLabel(v109);
v110 = a1->m_colorInput;
v110->m_placeholderScale = 0.5;
CCTextInputNode::refreshLabel(v110);
v111 = &a1->TextInputDelegate;
a1->m_colorInput->m_delegate = &a1->TextInputDelegate;
a1->m_colorInput->setTag(a1->m_colorInput, 3);
a1->m_colorInput->m_numberInput = 1;
cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v176);
v112 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
v113 = CCMenuItemSpriteExtra::create(
v112,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::onSelectSpecialColor);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 54.0, 28.5);
cocos2d::CCPoint::operator+(&v168, &v164);
v114 = v113->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v115 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v173);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v114->setPosition_0)(v113, v115);
v113->setTag(v113, 6);
v116 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v116->setScale_0)(v116);
v117 = CCMenuItemSpriteExtra::create(
v116,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::onUpdateCustomColor);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v117);
v117->setTag(v117, 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, -50.0, 0.0);
cocos2d::CCPoint::operator+(&v176, &v164);
v117->setPosition_0(v117, &v164);
v117[1].m_unknown5 = 0x40000000;
v118 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v118->setScale_0)(v118);
v119 = CCMenuItemSpriteExtra::create(
v118,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::onUpdateCustomColor);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v119);
v119->setTag(v119, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 50.0, 0.0);
cocos2d::CCPoint::operator+(&v176, &v164);
v119->setPosition_0(v119, &v164);
v119[1].m_unknown5 = 0x40000000;
ColorSelectPopup::updateTextInputLabel(a1);
}
else
{
v111 = &a1->TextInputDelegate;
}
m_hsv = a1->m_hsv;
v120 = ConfigureHSVWidget::create(&m_hsv, v99, 0);
a1->m_hsvWidget = v120;
a1->addChild_1(a1, v120);
v121 = a1->m_hsvWidget->__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, (float)(v166 * 0.5) - 75.0, (float)(v167 * 0.5) + 45.0);
v121->setPosition_0(a1->m_hsvWidget, v122);
((void (__fastcall *)(ConfigureHSVWidget *))a1->m_hsvWidget->setScale_0)(a1->m_hsvWidget);
cocos2d::CCArray::addObject(a1->m_copyObjects, a1->m_hsvWidget);
cocos2d::CCPoint::CCPoint(&v179, (float)(v166 * 0.5) + 150.0, (float)(v167 * 0.5) + 90.0);
v123 = cocos2d::CCLabelBMFont::create("Channel ID", "goldFont.fnt");
a1->addChild_1(a1, v123);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v123->setScale_0)(v123);
v123->setPosition_0(v123, &v179);
cocos2d::CCArray::addObject(a1->m_copyObjects, v123);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 0.0, -30.0);
cocos2d::CCPoint::operator+(&v179, &v178);
cocos2d::CCRect::CCRect(v199, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCSize::CCSize(&v180, 50.0, 30.0);
v124 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)&m_hsv, v199);
v125 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v124);
LOBYTE(v126) = 100;
v125->setOpacity(&v125->cocos2d::CCRGBAProtocol, v126);
v162 = 0;
b = 0;
v125->setColor(&v125->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v162);
v125->setContentSize(v125, &v180);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v125, -1);
v125->setPosition_0(v125, &v178);
cocos2d::CCArray::addObject(a1->m_copyObjects, v125);
v128 = CCTextInputNode::create(50.0, 40.0, "Num", v127, v160, (const char *)&qword_14052A4D8);
a1->m_copyColorInput = v128;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v128, 20);
a1->m_copyColorInput->setPosition_0(a1->m_copyColorInput, &v178);
m_copyColorInput = a1->m_copyColorInput;
m_copyColorInput->m_maxLabelScale = 0.60000002;
CCTextInputNode::refreshLabel(m_copyColorInput);
v130 = a1->m_copyColorInput;
v130->m_maxLabelWidth = 200.0;
CCTextInputNode::refreshLabel(v130);
a1->m_copyColorInput->m_textField->setVisible(a1->m_copyColorInput->m_textField, 0);
a1->m_copyColorInput->m_maxLabelLength = 6;
v194[1] = 14648;
v194[2] = 10;
v194[3] = 15;
v194[0] = 0x3736353433323130LL;
v172 = (void **)v194;
v131 = &a1->m_copyColorInput->m_allowedChars;
if ( v131 != (std::string *)v194 )
sub_14003CCE0((void **)v131, v194, 0xAu);
sub_14003A830((__int64)v194);
v162 = -21896;
v132 = a1->m_copyColorInput;
*(_WORD *)&v132->m_placeholderColor.r = -21896;
v132->m_placeholderColor.b = -16;
CCTextInputNode::refreshLabel(v132);
v133 = a1->m_copyColorInput;
v133->m_placeholderScale = 0.5;
CCTextInputNode::refreshLabel(v133);
a1->m_copyColorInput->m_delegate = v111;
a1->m_copyColorInput->setTag(a1->m_copyColorInput, 4);
a1->m_copyColorInput->m_numberInput = 1;
cocos2d::CCArray::addObject(a1->m_copyObjects, a1->m_copyColorInput);
cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v189);
v134 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v134->setScale_0)(v134);
v135 = CCMenuItemSpriteExtra::create(
v134,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::onUpdateCopyColor);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v135);
v135->setTag(v135, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, -50.0, 0.0);
cocos2d::CCPoint::operator+(&v189, &v165);
v135->setPosition_0(v135, (const cocos2d::CCPoint *)&v165);
v135[1].m_unknown5 = 0x40000000;
cocos2d::CCArray::addObject(a1->m_copyObjects, v135);
v136 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v136->setScale_0)(v136);
v137 = CCMenuItemSpriteExtra::create(
v136,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::onUpdateCopyColor);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v137);
v137->setTag(v137, 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 50.0, 0.0);
cocos2d::CCPoint::operator+(&v189, &v165);
v137->setPosition_0(v137, (const cocos2d::CCPoint *)&v165);
v137[1].m_unknown5 = 0x40000000;
cocos2d::CCArray::addObject(a1->m_copyObjects, v137);
v138 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
v139 = CCMenuItemSpriteExtra::create(
v138,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)ColorSelectPopup::onSelectSpecialColor);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v139);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, 50.0, 25.0);
cocos2d::CCPoint::operator+(&v179, &v165);
v140 = v139->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v141 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v173);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v140->setPosition_0)(v139, v141);
cocos2d::CCArray::addObject(a1->m_copyObjects, v139);
v139->setTag(v139, 7);
v172 = (void **)&v169;
v169 = 0;
v170 = 0;
v171 = 15;
*(_QWORD *)&v169 = sub_14003AA10(0xF0u);
v170 = 238;
v171 = 239;
strcpy(
(char *)v169,
"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.");
m_hsv = 0;
v182 = 4;
v183 = 15;
strcpy((char *)&m_hsv, "Help");
v142 = (cocos2d::CCNode *)InfoAlertButton::create(&m_hsv, &v169);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v142);
v143 = v142->__vftable;
cocos2d::CCPoint::CCPoint(
&v164,
(float)(v166 * 0.5) - 100.0,
(float)((float)(a1->m_height * 0.5) + (float)(v167 * 0.5)) - 18.0);
v144 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v172);
((void (__fastcall *)(cocos2d::CCNode *, struct cocos2d::CCPoint))v143->setPosition_0)(v142, v144);
cocos2d::CCPoint::CCPoint(&v190, (float)(v166 * 0.5) - 154.0, (float)(v167 * 0.5) + 30.0);
v145 = 0;
v162 = 0;
v172 = v195;
v174 = -21896;
while ( 1 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v173, (float)((float)v145 - 1.0) * 42.0, 22.0);
cocos2d::CCPoint::operator+(&v190, &v168);
if ( v145 == 3 )
break;
if ( v145 )
{
if ( v145 != 1 )
goto LABEL_59;
v146 = (const char *)&unk_14053FEBC;
}
else
{
v146 = (const char *)&unk_14053FEC0;
}
LABEL_61:
v147 = cocos2d::CCLabelBMFont::create(v146, "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v147->setScale_0)(v147);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, v147);
cocos2d::CCPoint::CCPoint(&v198.origin, 0.0, 20.0);
cocos2d::CCPoint::operator+(&v168, &v164);
v147->setPosition_0(v147, &v164);
cocos2d::CCArray::addObject(a1->m_colorObjects, v147);
v148 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v169, v199);
v149 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v148);
LOBYTE(v150) = 100;
v149->setOpacity(&v149->cocos2d::CCRGBAProtocol, v150);
v174 = 0;
v175 = 0;
v149->setColor(&v149->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v174);
if ( v145 == 3 )
v180.width = 100.0;
v149->setContentSize(v149, &v180);
((void (__fastcall *)(struct cocos2d::extension::CCScale9Sprite *))v149->setScale_0)(v149);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v149, -1);
v149->setPosition_0(v149, &v168);
cocos2d::CCArray::addObject(a1->m_colorObjects, v149);
v152 = 80;
if ( v145 < 3 )
v152 = 40;
v153 = CCTextInputNode::create((float)v152, 20.0, "Num", v151, v161, (const char *)&qword_14052A4D8);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v153, 20);
v153->setPosition_0(v153, &v168);
v153->m_maxLabelScale = 0.40000001;
CCTextInputNode::refreshLabel(v153);
v153->m_maxLabelWidth = 50.0;
CCTextInputNode::refreshLabel(v153);
v153->m_textField->setVisible(v153->m_textField, 0);
v154 = 7;
if ( v145 < 3 )
v154 = 4;
v153->m_maxLabelLength = v154;
v155 = (__int64 *)"0123456789ABCDEFabcdef";
if ( v145 < 3 )
v155 = &qword_14053E3E8;
*(_OWORD *)v195 = 0;
Size = 0;
v197 = 0;
v156 = -1;
do
++v156;
while ( *((_BYTE *)v155 + v156) );
sub_14003A930(v195, v155, v156);
if ( &v153->m_allowedChars != (std::string *)v195 )
{
v157 = v195;
if ( v197 > 0xF )
v157 = (void **)v195[0];
sub_14003CCE0((void **)&v153->m_allowedChars, v157, Size);
}
sub_14003A830((__int64)v195);
*(_WORD *)&v153->m_placeholderColor.r = -21896;
v153->m_placeholderColor.b = -16;
CCTextInputNode::refreshLabel(v153);
v153->m_placeholderScale = 0.40000001;
CCTextInputNode::refreshLabel(v153);
v153->m_delegate = v111;
v153->m_numberInput = v145 < 3;
cocos2d::CCArray::addObject(a1->m_colorObjects, v153);
if ( v145 )
{
if ( v145 == 1 )
{
a1->m_gInput = v153;
v153->setTag(v153, 9);
v145 = 2;
}
else
{
if ( v145 != 2 )
{
a1->m_hexInput = v153;
v153->setTag(v153, 11);
ColorSelectPopup::updateHSVMode(a1);
ColorSelectPopup::updateCopyColorTextInputLabel(a1);
a1->m_disableTextDelegate = 0;
a1->m_initializing = 0;
return 1;
}
a1->m_bInput = v153;
v153->setTag(v153, 10);
v145 = 3;
}
}
else
{
a1->m_rInput = v153;
v153->setTag(v153, 8);
v145 = 1;
}
}
cocos2d::CCPoint::CCPoint(&v176, 0.0, -22.0);
cocos2d::CCPoint::operator+(&v190, &v165);
cocos2d::CCPoint::operator=(&v168, &v165);
LABEL_59:
v146 = "HEX:";
if ( v145 == 2 )
v146 = "B:";
goto LABEL_61;
}
return result;
}