//
// MessagesProfilePage::setupCommentsBrowser from 0x10022f4e0 to 0x10022f64f (367 bytes)
//
// 2 xrefs:
// > MessagesProfilePage::loadPage @ 0x10022eba7
// > MessagesProfilePage::loadMessagesFinished @ 0x10022f673
//
// 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 MessagesProfilePage::setupCommentsBrowser(MessagesProfilePage *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
_BYTE v11[8]; // [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, Message, 0.0);
else
v5 = nullptr;
v6 = GJCommentListLayer::create(v5, "Messages", (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 *, _BYTE *))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));
}
}