//
// GJUINode::init from 0x5c7a40 to 0x5c7bcc (396 bytes)
//
// 2 xrefs:
// > GJUINode::create @ 0x5c7c5c
// > ??> @ 0xad958
//
// 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 GJUINode::init(GJUINode *a1, UIButtonConfig *a2)
{
bool v4; // w21
const char *v6; // x0
cocos2d::CCSprite *v7; // x0
GJUINode_vtbl *v8; // x3
bool m_oneButton; // w1
const char *v10; // x0
cocos2d::CCSprite *v11; // x0
int m_height; // w2
float m_width; // s0
v4 = cocos2d::CCNode::init(a1);
if ( !v4 )
return 0;
a1->setContentSize(a1, &stru_1241E80);
if ( a2->m_oneButton || a2->m_split )
v6 = "PBtn_Jump_001.png";
else
v6 = "PBtn_Move_001.png";
v7 = cocos2d::CCSprite::createWithSpriteFrameName(v6);
v8 = a1->__vftable;
a1->m_firstSprite = v7;
((void (__fastcall *)(GJUINode *))v8->addChild_0)(a1);
m_oneButton = a2->m_oneButton;
if ( !m_oneButton )
{
if ( a2->m_split )
v10 = "PBtn_Jump_001.png";
else
v10 = "PBtn_Move_001.png";
v11 = cocos2d::CCSprite::createWithSpriteFrameName(v10);
a1->m_secondSprite = v11;
cocos2d::CCSprite::setFlipX(v11, 1);
a1->addChild_0(a1, a1->m_secondSprite, 1);
m_oneButton = a2->m_oneButton;
}
m_height = a2->m_height;
m_width = (float)a2->m_width;
a1->m_split = a2->m_split;
a1->m_oneButton = m_oneButton;
GJUINode::updateSize(a1, m_width, (float)m_height);
GJUINode::updateButtonPositions(a1);
GJUINode::updateDragRadius(a1, a2->m_radius);
GJUINode::updateDeadzone(a1, (int)a2->m_deadzone);
GJUINode::toggleModeB(a1, a2->m_modeB);
GJUINode::updateButtonScale(a1, a2->m_scale);
GJUINode::setOpacity(a1, a2->m_opacity);
a1->setPosition(a1, &a2->m_position);
a1->m_snap = a2->m_snap;
a1->m_swiping = 0;
return v4;
}