//
// GJUINode::loadFromConfig from 0x1000498e4 to 0x100049a18 (308 bytes)
//
// 1 xrefs:
// > UILayer::refreshDpad @ 0x1000498c0
//
// 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
//
void __fastcall GJUINode::loadFromConfig(GJUINode *a1, UIButtonConfig *a2)
{
int m_opacity; // w21
cocos2d::CCSprite *m_secondSprite; // x0
cocos2d::CCDirector *v6; // x0
__n128 v7; // q1
__n128 v8; // q0
_DWORD v9[4]; // [xsp+0h] [xbp-30h] BYREF
GJUINode::updateSize(a1, (float)a2->m_width, (float)a2->m_height);
a1->m_radius = fmaxf(a2->m_radius, 0.0);
GJUINode::updateButtonPositions(a1);
a1->m_deadzone = (float)(int)a2->m_deadzone;
GJUINode::toggleModeB(a1, a2->m_modeB);
a1->m_snap = a2->m_snap;
GJUINode::updateButtonScale(a1, a2->m_scale);
m_opacity = a2->m_opacity;
((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_firstSprite->setOpacity)(
a1->m_firstSprite,
(unsigned __int8)m_opacity);
m_secondSprite = a1->m_secondSprite;
if ( m_secondSprite )
((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))m_secondSprite->setOpacity)(
m_secondSprite,
(unsigned __int8)m_opacity);
a1->m_oneButton = a2->m_oneButton;
a1->m_split = a2->m_split;
GJUINode::updateButtonFrames(a1);
if ( a2->m_player2 )
{
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6);
v7.n128_u32[0] = LODWORD(a2->m_position.y);
v8.n128_f32[0] = *(float *)&v9[2] - a2->m_position.x;
sub_100022980(v8, v7, v9);
((void (__fastcall *)(GJUINode *, _DWORD *))a1->setPosition)(a1, v9);
}
else
{
((void (__fastcall *)(GJUINode *, cocos2d::CCPoint *))a1->setPosition)(a1, &a2->m_position);
}
}