//
// GJRotateCommandLayer::init from 0x4df3e4 to 0x4e055a (4470 bytes)
//
// 1 xrefs:
// > GJRotateCommandLayer::create @ 0x4e05f6
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool GJRotateCommandLayer::init(GJRotateCommandLayer *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
cocos2d::CCDirector *v4; // r0
cocos2d::CCLabelBMFont *v5; // r5
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
const char *v7; // r1
ButtonSprite *v8; // r0
CCMenuItemSpriteExtra *v9; // r0
CCMenuItemSpriteExtra *v10; // r5
cocos2d::CCMenu *m_buttonMenu; // r7
void (__fastcall *v12)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
cocos2d::CCLabelBMFont *v13; // r5
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r6
cocos2d::CCNode *v15; // r11
void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
const char *v17; // r2
CCTextInputNode *v18; // r0
CCTextInputNode *m_moveTimeInput; // r5
void (__fastcall *v20)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
int v21; // r0
CCTextInputNode *v22; // r5
CCTextInputNode *v23; // r3
Slider *v24; // r0
Slider *m_moveTimeSlider; // r6
void (__fastcall *v26)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
float v27; // s15
cocos2d::CCLabelBMFont *v28; // r9
void (__fastcall *v29)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
cocos2d::CCLabelBMFont *v30; // r0
cocos2d::CCLabelBMFont *m_rotateEasingLabel; // r5
void (__fastcall *v32)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
int v33; // r11
cocos2d::CCSprite *v34; // r10
cocos2d::CCLabelBMFont *v35; // r0
cocos2d::CCSprite_vtbl *v36; // r3
cocos2d::CCLabelBMFont *m_rotateEasingRateLabel; // r11
void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
int v39; // r5
CCMenuItemSpriteExtra *v40; // r0
cocos2d::CCMenu *v41; // r11
void (__fastcall *v42)(char *, cocos2d::CCRect *); // r10
int v43; // r9
cocos2d::CCSprite *v44; // r9
CCMenuItemSpriteExtra *v45; // r9
cocos2d::CCSprite *v46; // r9
CCMenuItemSpriteExtra *v47; // r9
cocos2d::CCMenu *v48; // r11
const cocos2d::CCPoint *v49; // r10
void (*v50)(GJRotateCommandLayer *, cocos2d::CCObject *); // r3
float v51; // s15
cocos2d::CCLabelBMFont *v52; // r9
void (__fastcall *v53)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCNode *v54; // r9
void (__fastcall *v55)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
int m_times360; // r11
const char *v57; // r2
CCTextInputNode *v58; // r7
void (__fastcall *v59)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
int v60; // r0
CCTextInputNode_vtbl *v61; // r3
Slider *v62; // r7
void (__fastcall *v63)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
float v64; // s15
float v65; // s15
float v66; // s15
bool m_lockObjectRotation; // r10
cocos2d::CCMenu *v68; // r11
bool m_followP1; // r10
cocos2d::CCMenu *v70; // r3
cocos2d::CCLayer *v71; // r7
cocos2d::CCLayer *m_mainLayer; // r11
bool m_followP2; // r10
cocos2d::CCMenu *v74; // r11
cocos2d::CCLayer *v75; // r7
int v76; // r2
bool v77; // r3
int v78; // r11
int m_centerGroupID; // r5
int v80; // r2
bool v81; // r3
cocos2d::CCLabelBMFont *v82; // r9
cocos2d::CCNode *v83; // r10
const char *v84; // r2
CCTextInputNode *v85; // r5
cocos2d::CCSprite *v86; // r9
CCMenuItemSpriteExtra *v87; // r9
void (__fastcall *v88)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
cocos2d::CCSprite *v89; // r9
CCMenuItemSpriteExtra *v90; // r9
void (__fastcall *v91)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
cocos2d::CCNode *v93; // [sp+34h] [bp-F8h]
cocos2d::CCPoint *i; // [sp+34h] [bp-F8h]
TextInputDelegate *v95; // [sp+38h] [bp-F4h]
char *v96; // [sp+3Ch] [bp-F0h]
_BOOL4 v97; // [sp+40h] [bp-ECh]
char *m_rotateEasingRateButton; // [sp+44h] [bp-E8h]
char *v99; // [sp+44h] [bp-E8h]
char *v100; // [sp+44h] [bp-E8h]
char *v101; // [sp+48h] [bp-E4h]
cocos2d::CCMenu *v102; // [sp+50h] [bp-DCh]
cocos2d::ccColor3B v103; // [sp+64h] [bp-C8h]
cocos2d::ccColor3B v104; // [sp+68h] [bp-C4h]
cocos2d::ccColor3B v105; // [sp+6Ch] [bp-C0h]
cocos2d::CCLabelBMFont *v106; // [sp+70h] [bp-BCh] BYREF
cocos2d::CCSize v107; // [sp+74h] [bp-B8h] BYREF
cocos2d::CCPoint v108; // [sp+7Ch] [bp-B0h] BYREF
cocos2d::CCSize v109; // [sp+84h] [bp-A8h] BYREF
cocos2d::CCPoint v110; // [sp+8Ch] [bp-A0h] BYREF
void (*v111)(GJRotateCommandLayer *, cocos2d::CCObject *); // [sp+94h] [bp-98h]
unsigned int v112; // [sp+98h] [bp-94h]
cocos2d::CCPoint v113; // [sp+9Ch] [bp-90h] BYREF
cocos2d::CCPoint v114; // [sp+A4h] [bp-88h] BYREF
cocos2d::CCPoint v115; // [sp+ACh] [bp-80h] BYREF
int v116; // [sp+B4h] [bp-78h]
int v117; // [sp+B8h] [bp-74h]
void (*v118)(GJRotateCommandLayer *, cocos2d::CCObject *); // [sp+BCh] [bp-70h]
int v119; // [sp+C0h] [bp-6Ch]
void (*v120)(GJRotateCommandLayer *, cocos2d::CCObject *); // [sp+C4h] [bp-68h]
int v121; // [sp+C8h] [bp-64h]
void (*v122)(GJRotateCommandLayer *, cocos2d::CCObject *); // [sp+CCh] [bp-60h]
int v123; // [sp+D0h] [bp-5Ch]
void (*v124)(GJRotateCommandLayer *, cocos2d::CCObject *); // [sp+D4h] [bp-58h]
int v125; // [sp+D8h] [bp-54h]
void (*v126)(GJRotateCommandLayer *, cocos2d::CCObject *); // [sp+DCh] [bp-50h]
unsigned int v127; // [sp+E0h] [bp-4Ch]
void (*v128)(GJRotateCommandLayer *, cocos2d::CCObject *); // [sp+E4h] [bp-48h]
unsigned int v129; // [sp+E8h] [bp-44h]
cocos2d::CCPoint v130; // [sp+ECh] [bp-40h] BYREF
cocos2d::CCRect v131; // [sp+F4h] [bp-38h] BYREF
cocos2d::CCRect v132; // [sp+104h] [bp-28h] BYREF
cocos2d::CCRect v133; // [sp+114h] [bp-18h] BYREF
cocos2d::CCRect v134; // 0:r2.8,8:^0.8
cocos2d::CCRect v135; // 0:r2.8,8:^0.8
v97 = SetupTriggerPopup::init(a1, a2, a3, 430.0, 310.0, 1);
if ( v97 )
{
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v107, v4);
v5 = cocos2d::CCLabelBMFont::create();
setPosition = v5->setPosition;
cocos2d::CCPoint::CCPoint(
&v133.origin,
v107.width * 0.5,
(float)((float)(a1->m_height * 0.5) + (float)(v107.height * 0.5)) - 15.0);
setPosition(v5, &v133.origin);
a1->m_mainLayer->addChild(a1->m_mainLayer, v5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v5->setScale)(v5, 1058642330);
v8 = ButtonSprite::create((ButtonSprite *)"OK", v7);
v116 = 660;
v117 = 1;
v9 = CCMenuItemSpriteExtra::create(v8, nullptr, (cocos2d::SEL_MenuHandler)((unsigned int)a1 | 0x29400000000LL));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v9);
sub_776584((int)&v132, "Rotate command help");
sub_776584(
(int)&v133,
"Rotate a group of objects.\n"
"Set Center Group ID to rotate around an object.\n"
"Only one object can be in the center group.\n"
"Use disable optim if rotating from a far away center point and the movement is laggy.");
v10 = InfoAlertButton::create((int)&v132, (int)&v133, 1065353216);
sub_774008(&v133);
sub_774008(&v132);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v10);
m_buttonMenu = a1->m_buttonMenu;
v12 = v10->setPosition;
cocos2d::CCPoint::CCPoint(
&v132.origin,
(float)((float)(a1->m_width * 0.5) + (float)(v107.width * 0.5)) - 18.0,
(float)((float)(a1->m_height * 0.5) + (float)(v107.height * 0.5)) - 18.0);
cocos2d::CCNode::convertToNodeSpace(&v133.origin, m_buttonMenu, &v132.origin);
v12(v10, &v133.origin);
a1->determineStartValues(a1);
cocos2d::CCPoint::CCPoint(&v108, (float)(v107.width * 0.5) - 90.0, (float)(v107.height * 0.5) - 50.0);
v13 = cocos2d::CCLabelBMFont::create();
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v13->setScale)(v13, 1060320051);
v13->setPosition(v13, &v108);
setAnchorPoint = v13->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v133.origin, 1.0, 0.5);
setAnchorPoint(v13, &v133.origin);
a1->m_mainLayer->addChild(a1->m_mainLayer, v13);
cocos2d::CCRect::CCRect(&v131, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCRect::CCRect(&v133, &v131);
v15 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02_small.png",
(const char *)&v133,
v134);
((void (__fastcall *)(cocos2d::CCNode *, int))v15->__vftable[1].~CCNode_0)(v15, 100);
cocos2d::CCSize::CCSize(&v109, 70.0, 30.0);
v15->setContentSize(v15, &v109);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v15, -1);
v16 = v15->setPosition;
cocos2d::CCPoint::CCPoint(&v132.origin, 45.0, 0.0);
cocos2d::CCPoint::operator+(&v133, &v108, &v132);
v16(v15, &v133.origin);
if ( a1->m_moveTime == -99999.0 )
v17 = "Mixed";
else
v17 = "Num";
v18 = CCTextInputNode::create(50.0, 40.0, v17, "Thonburi");
a1->m_moveTimeInput = v18;
((void (__fastcall *)(cocos2d::CCLayer *, CCTextInputNode *, int, void (__fastcall *)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int), int *, const char *))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v18,
20,
a1->m_mainLayer->addChild_0,
&dword_18,
"bigFont.fnt");
m_moveTimeInput = a1->m_moveTimeInput;
v20 = m_moveTimeInput->setPosition;
v21 = (int)v15->getPosition(v15);
v20(m_moveTimeInput, (const cocos2d::CCPoint *)v21);
CCTextInputNode::setMaxLabelScale(a1->m_moveTimeInput, 0.6);
CCTextInputNode::setMaxLabelWidth(a1->m_moveTimeInput, 200.0);
a1->m_moveTimeInput->m_textField->setVisible(a1->m_moveTimeInput->m_textField, 0);
v22 = a1->m_moveTimeInput;
v22->m_maxLabelLength = 5;
sub_776584((int)&v133, "0123456789.");
CCTextInputNode::setAllowedChars((int)v22, (int)&v133);
sub_774008(&v133);
*(_WORD *)&v103.r = -21896;
v103.b = -16;
CCTextInputNode::setLabelPlaceholderColor(a1->m_moveTimeInput, v103);
CCTextInputNode::setLabelPlaceholderScale(a1->m_moveTimeInput, 0.5);
v23 = a1->m_moveTimeInput;
v23->m_numberInput = 1;
v23->m_delegate = &a1->TextInputDelegate;
v95 = &a1->TextInputDelegate;
a1->m_moveTimeInput->setTag(a1->m_moveTimeInput, 3);
v119 = 0;
v118 = GJRotateCommandLayer::sliderChanged;
v24 = (Slider *)Slider::create(a1, (unsigned int)GJRotateCommandLayer::sliderChanged, 0, 0.8);
a1->m_moveTimeSlider = v24;
Slider::setBarVisibility(v24, 0);
a1->m_mainLayer->addChild(a1->m_mainLayer, a1->m_moveTimeSlider);
m_moveTimeSlider = a1->m_moveTimeSlider;
v26 = m_moveTimeSlider->setPosition;
cocos2d::CCPoint::CCPoint(&v132.origin, 0.0, -32.0);
cocos2d::CCPoint::operator+(&v133, &v108, &v132);
v26(m_moveTimeSlider, &v133.origin);
v27 = a1->m_moveTime / 10.0;
if ( v27 >= 1.0 )
{
v27 = 1.0;
}
else if ( v27 <= 0.0 )
{
v27 = 0.0;
}
Slider::setValue(a1->m_moveTimeSlider, v27);
GJRotateCommandLayer::updateDurLabel(a1, 0);
v28 = cocos2d::CCLabelBMFont::create();
v29 = v28->setPosition;
cocos2d::CCPoint::CCPoint(&v133.origin, (float)(v107.width * 0.5) - 90.0, (float)(v107.height * 0.5) + 20.0);
v29(v28, &v133.origin);
a1->m_mainLayer->addChild(a1->m_mainLayer, v28);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v28->setScale)(v28, 1061997773);
v30 = cocos2d::CCLabelBMFont::create();
a1->m_rotateEasingLabel = v30;
a1->m_mainLayer->addChild(a1->m_mainLayer, v30);
m_rotateEasingLabel = a1->m_rotateEasingLabel;
v32 = m_rotateEasingLabel->setPosition;
v33 = (int)v28->getPosition(v28);
cocos2d::CCPoint::CCPoint(&v132.origin, 0.0, -30.0);
cocos2d::CCPoint::operator+(&v133, v33, &v132);
v32(m_rotateEasingLabel, &v133.origin);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_rotateEasingLabel->setScale)(
a1->m_rotateEasingLabel,
1060320051);
v34 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_colorBtn_001.png");
v34->setColor(v34, &stru_9AC91C);
v34->setOpacity(v34, 100);
v35 = cocos2d::CCLabelBMFont::create();
v36 = v34->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_rotateEasingRateLabel = v35;
v36->addChild(v34, v35);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_rotateEasingRateLabel->setScaleX)(
a1->m_rotateEasingRateLabel,
1052770304);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_rotateEasingRateLabel->setScaleY)(
a1->m_rotateEasingRateLabel,
1061158912);
m_rotateEasingRateLabel = a1->m_rotateEasingRateLabel;
v38 = m_rotateEasingRateLabel->setPosition;
cocos2d::CCNode::convertToNodeSpace(&v130, v34, &stru_AC6EC0);
cocos2d::CCPoint::CCPoint(&v132.origin, 1.0, 1.5);
cocos2d::CCPoint::operator+(&v133, &v130, &v132);
v38(m_rotateEasingRateLabel, &v133.origin);
v39 = 0;
((void (__fastcall *)(cocos2d::CCSprite *, int))v34->setScaleX)(v34, 1061997773);
((void (__fastcall *)(cocos2d::CCSprite *, int))v34->setScaleY)(v34, 1053609165);
v121 = 0;
v120 = GJRotateCommandLayer::onEasingRate;
v40 = CCMenuItemSpriteExtra::create(
v34,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(GJRotateCommandLayer::onEasingRate, (unsigned int)a1));
a1->m_rotateEasingRateButton = v40;
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v40);
v41 = a1->m_buttonMenu;
m_rotateEasingRateButton = (char *)a1->m_rotateEasingRateButton;
v42 = *(void (__fastcall **)(char *, cocos2d::CCRect *))(*(_DWORD *)m_rotateEasingRateButton + 92);
v43 = (int)v28->getPosition(v28);
cocos2d::CCPoint::CCPoint(&v130, 55.0, -2.0);
cocos2d::CCPoint::operator+(&v132, v43, &v130);
cocos2d::CCNode::convertToNodeSpace(&v133.origin, v41, &v132.origin);
v42(m_rotateEasingRateButton, &v133);
CCMenuItemSpriteExtra::setSizeMult(a1->m_rotateEasingRateButton, 1.2);
GJRotateCommandLayer::updateEasingRateLabel(a1);
GJRotateCommandLayer::toggleEasingRateVisibility(a1);
v44 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
cocos2d::CCSprite::setFlipX(v44, 1);
((void (__fastcall *)(cocos2d::CCSprite *, int))v44->setScale)(v44, 1060320051);
v123 = 0;
v122 = GJRotateCommandLayer::onEasing;
v45 = CCMenuItemSpriteExtra::create(
v44,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(GJRotateCommandLayer::onEasing, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v45);
v99 = (char *)v45->setPosition;
v102 = a1->m_buttonMenu;
v101 = (char *)a1->m_rotateEasingLabel->getPosition(a1->m_rotateEasingLabel);
cocos2d::CCPoint::CCPoint(&v130, 100.0, 0.0);
cocos2d::CCPoint::operator+(&v132, v101, &v130);
cocos2d::CCNode::convertToNodeSpace(&v133.origin, v102, &v132.origin);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v99)(v45, &v133);
CCMenuItemSpriteExtra::setSizeMult(v45, 2.0);
v45->setTag(v45, 1);
v46 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, int))v46->setScale)(v46, 1060320051);
v124 = GJRotateCommandLayer::onEasing;
v125 = 0;
v47 = CCMenuItemSpriteExtra::create(
v46,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(GJRotateCommandLayer::onEasing, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v47);
v48 = a1->m_buttonMenu;
v100 = (char *)v47->setPosition;
v49 = a1->m_rotateEasingLabel->getPosition(a1->m_rotateEasingLabel);
cocos2d::CCPoint::CCPoint(&v130, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v132, v49, &v130);
cocos2d::CCNode::convertToNodeSpace(&v133.origin, v48, &v132.origin);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v100)(v47, &v133);
CCMenuItemSpriteExtra::setSizeMult(v47, 2.0);
v47->setTag(v47, 0);
v50 = GJRotateCommandLayer::sliderDegreesChanged;
while ( 1 )
{
v112 = 0;
v51 = -105.0;
v111 = v50;
if ( v39 )
v51 = 105.0;
cocos2d::CCPoint::CCPoint(&v113, v51 + (float)(v107.width * 0.5), (float)(v107.height * 0.5) + 105.0);
v52 = cocos2d::CCLabelBMFont::create();
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v52->setScale)(v52, 1060320051);
v52->setPosition(v52, &v113);
v53 = v52->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v133.origin, 1.0, 0.5);
v53(v52, &v133.origin);
a1->m_mainLayer->addChild(a1->m_mainLayer, v52);
cocos2d::CCRect::CCRect(&v132, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCRect::CCRect(&v133, &v132);
v54 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02_small.png",
(const char *)&v133,
v135);
((void (__fastcall *)(cocos2d::CCNode *, int))v54->__vftable[1].~CCNode_0)(v54, 100);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v114, 70.0, 30.0);
v54->setContentSize(v54, (const cocos2d::CCSize *)&v114);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v54, -1);
v55 = v54->setPosition;
cocos2d::CCPoint::CCPoint(&v115, 45.0, 0.0);
cocos2d::CCPoint::operator+(&v133, &v113, &v115);
v55(v54, &v133.origin);
if ( v39 )
m_times360 = a1->m_times360;
else
m_times360 = (int)a1->m_degrees;
v57 = "Mixed";
if ( m_times360 != -99999 )
v57 = "Num";
v58 = CCTextInputNode::create(60.0, 40.0, v57, "Thonburi");
((void (__fastcall *)(cocos2d::CCLayer *, CCTextInputNode *, int, cocos2d::CCLayer_vtbl *, int *, const char *))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v58,
20,
a1->m_mainLayer->SetupTriggerPopup::FLAlertLayer::__vftable,
&dword_18,
"bigFont.fnt");
v59 = v58->setPosition;
v60 = (int)v54->getPosition(v54);
v59(v58, (const cocos2d::CCPoint *)v60);
CCTextInputNode::setMaxLabelScale(v58, 0.6);
CCTextInputNode::setMaxLabelWidth(v58, 60.0);
v58->m_textField->setVisible(v58->m_textField, 0);
v58->m_maxLabelLength = 8;
sub_776584((int)&v133, "0123456789-.");
CCTextInputNode::setAllowedChars((int)v58, (int)&v133);
sub_774008(&v133);
*(_WORD *)&v104.r = -21896;
v104.b = -16;
CCTextInputNode::setLabelPlaceholderColor(v58, v104);
CCTextInputNode::setLabelPlaceholderScale(v58, 0.5);
v58->m_numberInput = 1;
v58->m_delegate = v95;
v61 = v58->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( v39 )
{
a1->m_timesInput = v58;
v61->setTag(v58, 1);
}
else
{
a1->m_degreesInput = v58;
v61->setTag(v58, 0);
}
v62 = (Slider *)Slider::create(a1, (unsigned int)v111, v112, 0.8);
Slider::setBarVisibility(v62, 0);
a1->m_mainLayer->addChild(a1->m_mainLayer, v62);
v63 = v62->setPosition;
cocos2d::CCPoint::CCPoint(&v115, 0.0, -32.0);
cocos2d::CCPoint::operator+(&v133, &v113, &v115);
v63(v62, &v133.origin);
if ( m_times360 == -99999 )
{
v66 = 0.5;
}
else
{
v64 = (float)m_times360;
v65 = v39 ? v64 / 20.0 : v64 / 720.0;
v66 = v65 + 0.5;
if ( v66 >= 1.0 )
{
v66 = 1.0;
}
else if ( v66 <= 0.0 )
{
v66 = 0.0;
}
}
Slider::setValue(v62, v66);
if ( v39 )
{
a1->m_timesSlider = v62;
sub_776584((int)&v110, "Follow\nP1");
m_followP1 = a1->m_followP1;
v129 = 0;
v70 = a1->m_buttonMenu;
v128 = GJRotateCommandLayer::onFollowRotation;
v93 = v70;
cocos2d::CCPoint::CCPoint(&v115, v113.x - 60.0, v113.y - 60.0);
m_mainLayer = a1->m_mainLayer;
cocos2d::CCPoint::CCPoint(&v133.origin, 8.0, 0.0);
a1->m_followP1Toggler = GameToolbox::createToggleButton(
(int)&v110,
(unsigned int)v128,
v129,
m_followP1,
v93,
&v115,
a1,
m_mainLayer,
0.6,
0.4,
0.0,
(int)&v133,
(int)"bigFont.fnt",
0,
0,
nullptr);
sub_774008(&v110);
a1->m_followP1Toggler->setTag(a1->m_followP1Toggler, 1);
a1->m_followP1Toggler->m_notClickable = 1;
sub_776584((int)&v110, "Follow\nP2");
LODWORD(v130.x) = GJRotateCommandLayer::onFollowRotation;
v130.y = 0.0;
m_followP2 = a1->m_followP2;
v74 = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v115, (float)(v113.x - 60.0) + 90.0, v113.y - 60.0);
v75 = a1->m_mainLayer;
cocos2d::CCPoint::CCPoint(&v133.origin, 8.0, 0.0);
a1->m_followP2Toggler = GameToolbox::createToggleButton(
(int)&v110,
LODWORD(v130.x),
LODWORD(v130.y),
m_followP2,
v74,
&v115,
a1,
v75,
0.6,
0.4,
0.0,
(int)&v133,
(int)"bigFont.fnt",
0,
0,
nullptr);
sub_774008(&v110);
a1->m_followP2Toggler->setTag(a1->m_followP2Toggler, 2);
a1->m_followP2Toggler->m_notClickable = 1;
}
else
{
a1->m_degreesSlider = v62;
sub_776584((int)&v110, "Lock object rotation");
m_lockObjectRotation = a1->m_lockObjectRotation;
v68 = a1->m_buttonMenu;
v127 = 0;
v126 = GJRotateCommandLayer::onLockRotation;
cocos2d::CCPoint::CCPoint(&v115, v113.x - 60.0, v113.y - 60.0);
v71 = a1->m_mainLayer;
cocos2d::CCPoint::CCPoint(&v133.origin, 8.0, 0.0);
GameToolbox::createToggleButton(
(int)&v110,
(unsigned int)v126,
v127,
m_lockObjectRotation,
v68,
&v115,
a1,
v71,
0.6,
0.4,
0.0,
(int)&v133,
(int)"bigFont.fnt",
0,
0,
nullptr);
sub_774008(&v110);
}
v50 = GJRotateCommandLayer::sliderTimesChanged;
if ( v39 )
break;
v39 = 1;
}
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
for ( i = nullptr; ; i = (cocos2d::CCPoint *)(&dword_0 + 1) )
{
cocos2d::CCPoint::CCPoint(&v110);
v106 = (cocos2d::CCLabelBMFont *)&unk_ACDDA8;
if ( i )
{
cocos2d::CCPoint::CCPoint(&v133.origin, (float)(v107.width * 0.5) + 170.0, (float)(v107.height * 0.5) - 58.0);
cocos2d::CCPoint::operator=((PlayerObject *)&v110, COERCE_FLOAT(&v133), v80, v81);
sub_7753D4((int)&v106, "Center\nGroup ID");
v78 = 4;
m_centerGroupID = a1->m_centerGroupID;
v111 = GJRotateCommandLayer::onUpdateGroupID2;
}
else
{
cocos2d::CCPoint::CCPoint(&v133.origin, (float)(v107.width * 0.5) + 90.0, (float)(v107.height * 0.5) - 58.0);
cocos2d::CCPoint::operator=((PlayerObject *)&v110, COERCE_FLOAT(&v133), v76, v77);
sub_7753D4((int)&v106, "Target\nGroup ID");
v78 = 2;
m_centerGroupID = a1->m_targetGroupID;
v111 = GJRotateCommandLayer::onUpdateGroupID;
}
v112 = 0;
v82 = cocos2d::CCLabelBMFont::create();
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v82->setScale)(v82, 1056964608);
a1->m_mainLayer->addChild(a1->m_mainLayer, v82);
v96 = (char *)v82->setPosition;
cocos2d::CCPoint::CCPoint(&v132.origin, 0.0, 75.0);
cocos2d::CCPoint::operator+(&v133, &v110, &v132);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCRect *))v96)(v82, &v133);
cocos2d::CCRect::CCRect(&v132, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCRect::CCRect(&v133, &v132);
v83 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02_small.png",
(const char *)&v133,
v135);
((void (__fastcall *)(cocos2d::CCNode *, int))v83->__vftable[1].~CCNode_0)(v83, 100);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v113, 50.0, 30.0);
v83->setContentSize(v83, (const cocos2d::CCSize *)&v113);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v83, -1);
v83->setPosition(v83, &v110);
v84 = "Mixed";
if ( m_centerGroupID != -99999 )
v84 = "Num";
v85 = CCTextInputNode::create(50.0, 40.0, v84, "Thonburi");
((void (__fastcall *)(cocos2d::CCLayer *, CCTextInputNode *, int, void (__fastcall *)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int), int *, const char *))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v85,
20,
a1->m_mainLayer->addChild_0,
&dword_18,
"bigFont.fnt");
v85->setPosition(v85, &v110);
CCTextInputNode::setMaxLabelScale(v85, 0.6);
CCTextInputNode::setMaxLabelWidth(v85, 80.0);
v85->m_textField->setVisible(v85->m_textField, 0);
v85->m_maxLabelLength = 6;
sub_776584((int)&v133, "0123456789");
CCTextInputNode::setAllowedChars((int)v85, (int)&v133);
sub_774008(&v133);
*(_WORD *)&v105.r = -21896;
v105.b = -16;
CCTextInputNode::setLabelPlaceholderColor(v85, v105);
CCTextInputNode::setLabelPlaceholderScale(v85, 0.5);
v85->m_delegate = v95;
v85->m_numberInput = 1;
v85->setTag(v85, v78);
if ( i )
a1->m_centerIDInput = v85;
else
a1->m_targetIDInput = v85;
cocos2d::CCNode::convertToNodeSpace(&v114, a1->m_buttonMenu, &v110);
v86 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, int))v86->setScale)(v86, 1068708659);
((void (__fastcall *)(cocos2d::CCSprite *, int))v86->setRotation)(v86, 1119092736);
v87 = CCMenuItemSpriteExtra::create(
v86,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__((unsigned int)v111, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v87);
v87->setTag(v87, 1);
v88 = v87->setPosition;
cocos2d::CCPoint::CCPoint(&v115, 0.0, 40.0);
cocos2d::CCPoint::operator+(&v133, &v114, &v115);
v88(v87, &v133.origin);
CCMenuItemSpriteExtra::setSizeMult(v87, 2.0);
v89 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, int))v89->setScale)(v89, 1068708659);
((void (__fastcall *)(cocos2d::CCSprite *, int))v89->setRotation)(v89, 1119092736);
v90 = CCMenuItemSpriteExtra::create(
v89,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__((unsigned int)v111, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v90);
v90->setTag(v90, 2);
v91 = v90->setPosition;
cocos2d::CCPoint::CCPoint(&v115, 0.0, -40.0);
cocos2d::CCPoint::operator+(&v133, &v114, &v115);
v91(v90, &v133.origin);
CCMenuItemSpriteExtra::setSizeMult(v90, 2.0);
sub_774008(&v106);
if ( i )
break;
}
GJRotateCommandLayer::updateTextInputLabel(a1);
GJRotateCommandLayer::updateTextInputLabel2(a1);
GJRotateCommandLayer::updateDegreesLabel(a1);
GJRotateCommandLayer::updateTimesLabel(a1);
GJRotateCommandLayer::updateEasingLabel(a1);
a1->m_disableTextChanged = 0;
}
return v97;
}