//
// FRequestProfilePage::setupCommentsBrowser from 0x100791970 to 0x100791aea (378 bytes)
//
// 3 xrefs:
// > FRequestProfilePage::loadPage @ 0x100791044
// > FRequestProfilePage::loadFRequestsFinished @ 0x100791b0f
// > sub_100791B60 @ 0x100791b8c
//
// 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 FRequestProfilePage::setupCommentsBrowser(FRequestProfilePage *a1, cocos2d::CCArray *a2)
{
cocos2d::CCDirector *v3; // rax
cocos2d::CCTouchDispatcher *v4; // rax
CustomListView *v5; // rdi
GJCommentListLayer *v6; // rax
GJCommentListLayer *m_listLayer; // r14
BoomListView *m_list; // rdi
cocos2d::CCMenu *m_buttonMenu; // rbx
int v10; // eax
float v11; // [rsp+8h] [rbp-28h] BYREF
float v12[8]; // [rsp+10h] [rbp-20h] BYREF
if ( a1->m_listLayer )
{
v3 = cocos2d::CCDirector::sharedDirector();
v4 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v3->getTouchDispatcher)(v3);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, a1->m_listLayer);
((void (__fastcall *)(GJCommentListLayer *))a1->m_listLayer->removeMeAndCleanup)(a1->m_listLayer);
a1->m_listLayer = nullptr;
}
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v12);
if ( a2 )
v5 = CustomListView::create(a2, nullptr, 196.0, 340.0, 0, (BoomListType)((16 * !a1->m_sent) | 2), 0.0);
else
v5 = nullptr;
v6 = GJCommentListLayer::create(v5, "Friend Requests", (cocos2d::ccColor4B)-12684609, 340.0, 196.0, 0);
a1->m_listLayer = v6;
((void (__fastcall *)(cocos2d::CCLayer *, GJCommentListLayer *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v6);
m_listLayer = a1->m_listLayer;
sub_10028CBE0(&v11, (float)(v12[0] + -340.0) * 0.5, (float)((float)((float)(v12[1] + -196.0) * 0.5) + -10.0) + 5.0);
((void (__fastcall *)(GJCommentListLayer *, float *))m_listLayer->setPosition)(m_listLayer, &v11);
m_list = a1->m_listLayer->m_list;
if ( m_list )
{
m_buttonMenu = a1->m_buttonMenu;
v10 = ((__int64 (__fastcall *)(BoomListView *))m_list->getTouchPriority)(m_list);
((void (__fastcall *)(cocos2d::CCMenu *, _QWORD))m_buttonMenu->setTouchPriority)(
m_buttonMenu,
(unsigned int)(v10 - 2));
}
}