//
// SliderTouchLogic::init from 0x100303c00 to 0x100303d73 (371 bytes)
//
// 1 xrefs:
// > SliderTouchLogic::create @ 0x100303b98
//
// 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 __fastcall SliderTouchLogic::init(
SliderTouchLogic *a1,
cocos2d::CCNode *a2,
cocos2d::SEL_MenuHandler a3,
const char *a4,
const char *a5,
float a6)
{
size_t adj; // r14
void (__cdecl *ptr)(cocos2d::CCObject *); // r15
bool result; // al
char *v11; // r13
cocos2d::SEL_MenuHandler v12; // [rsp+10h] [rbp-50h] BYREF
cocos2d::CCNode *v13; // [rsp+20h] [rbp-40h]
const char *v14; // [rsp+28h] [rbp-38h]
float v15; // [rsp+30h] [rbp-30h]
bool v16; // [rsp+37h] [rbp-29h]
v15 = a6;
adj = a3.adj;
ptr = a3.ptr;
v13 = a2;
result = cocos2d::CCMenu::init(a1);
if ( result )
{
v14 = a5;
v16 = result;
a1->m_rotated = 0;
a1->m_length = 200.0 * v15;
sub_10028CBE0((float *)&v12, 0.0, 0.0);
((void (__fastcall *)(SliderTouchLogic *, cocos2d::SEL_MenuHandler *))a1->setPosition)(a1, &v12);
v11 = (char *)operator new(0x198u);
cocos2d::CCNodeRGBA::CCNodeRGBA((__int64)v11);
*((_WORD *)v11 + 169) = 0;
*(_OWORD *)(v11 + 344) = 0;
*(_OWORD *)(v11 + 360) = 0;
*(_OWORD *)(v11 + 376) = 0;
*((_QWORD *)v11 + 49) = 0;
*(_QWORD *)v11 = off_10090C860;
*((_QWORD *)v11 + 40) = off_10090CCC8;
v11[404] = 0;
*((_DWORD *)v11 + 100) = 1128792064;
v12.ptr = ptr;
v12.adj = adj;
if ( cocos2d::CCMenuItemImage::initWithNormalImage((cocos2d::CCMenuItemImage *)v11, a4, v14, nullptr, v13, v12) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v11);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v11 + 16LL))(v11);
v11 = nullptr;
}
a1->m_thumb = (SliderThumb *)v11;
((void (__fastcall *)(SliderTouchLogic *, char *))a1->addChild)(a1, v11);
((void (__fastcall *)(SliderThumb *, float))a1->m_thumb->setScale)(a1->m_thumb, v15);
a1->m_activateThumb = 0;
return v16;
}
return result;
}