//
// GameToolbox::addRThumbScrollButton from 0x1004ef8a0 to 0x1004efa27 (391 bytes)
//
// 2 xrefs:
// > AchievementsLayer::customSetup @ 0x10037341f
// > LevelBrowserLayer::init @ 0x10048c641
//
// 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 GameToolbox::addRThumbScrollButton(cocos2d::CCLayer *a1)
{
cocos2d::CCSprite *v2; // r14
cocos2d::CCDirector *v3; // rax
cocos2d::CCSprite *v4; // r15
unsigned __int64 *v5; // r12
cocos2d::CCSprite *v6; // r15
unsigned __int64 *v7; // rbx
char v8; // [rsp+0h] [rbp-40h] BYREF
float v9; // [rsp+4h] [rbp-3Ch]
double v10; // [rsp+8h] [rbp-38h] BYREF
unsigned __int64 v11[6]; // [rsp+10h] [rbp-30h] BYREF
double v12; // 0:xmm0_8.8
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v12 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v8);
v2 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_RThumb_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, double))a1->addChild)(a1, v2, v12);
v3 = cocos2d::CCDirector::sharedDirector();
*(float *)&v12 = sub_100484DA0((__int64)v3);
sub_10028CBE0((float *)&v10, *(float *)&v12 + -24.0, (float)(v9 * 0.5) + 80.0);
((void (__fastcall *)(cocos2d::CCSprite *, double *))v2->setPosition)(v2, &v10);
v4 = cocos2d::CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v4);
v5 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v2->getPosition)(v2);
sub_10028CBE0((float *)v11, 0.0, 22.0);
sub_10028CCE0(&v10, v5, v11);
((void (__fastcall *)(cocos2d::CCSprite *, double *))v4->setPosition)(v4, &v10);
((void (__fastcall *)(cocos2d::CCSprite *, float))v4->setScale)(v4, 0.69999999);
v6 = cocos2d::CCSprite::createWithSpriteFrameName("edit_downBtn_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v6);
v7 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v2->getPosition)(v2);
sub_10028CBE0((float *)v11, 0.0, -22.0);
sub_10028CCE0(&v10, v7, v11);
((void (__fastcall *)(cocos2d::CCSprite *, double *))v6->setPosition)(v6, &v10);
((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScale)(v6, 0.69999999);
}