//
// GJUINode::init from 0x30dcd4 to 0x30dddc (264 bytes)
//
// 1 xrefs:
// > GJUINode::create @ 0x30de6e
//
// 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)
{
_BOOL4 v4; // r6
const char *v5; // r0
cocos2d::CCSprite *v6; // r0
GJUINode_vtbl *v7; // r3
const char *v8; // r0
cocos2d::CCSprite *v9; // r0
float m_width; // s15
v4 = cocos2d::CCNode::init(a1);
if ( v4 )
{
a1->setContentSize(a1, &stru_AC5AE8);
if ( a2->m_oneButton )
{
v5 = "PBtn_Jump_001.png";
}
else if ( a2->m_split )
{
v5 = "PBtn_Jump_001.png";
}
else
{
v5 = "PBtn_Move_001.png";
}
v6 = cocos2d::CCSprite::createWithSpriteFrameName(v5);
v7 = a1->__vftable;
a1->m_firstSprite = v6;
v7->addChild_0(a1, v6, 1);
if ( !a2->m_oneButton )
{
if ( a2->m_split )
v8 = "PBtn_Jump_001.png";
else
v8 = "PBtn_Move_001.png";
v9 = cocos2d::CCSprite::createWithSpriteFrameName(v8);
a1->m_secondSprite = v9;
cocos2d::CCSprite::setFlipX(v9, 1);
a1->addChild_0(a1, a1->m_secondSprite, 1);
}
m_width = (float)a2->m_width;
a1->m_split = a2->m_split;
a1->m_oneButton = a2->m_oneButton;
GJUINode::updateSize(a1, m_width, (float)a2->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;
}