//
// MessagesProfilePage::setupCommentsBrowser from 0x4c0f68 to 0x4c109c (308 bytes)
//
// 2 xrefs:
// > MessagesProfilePage::loadMessagesFinished @ 0x4c10c8
// > MessagesProfilePage::loadPage @ 0x4c128c
//
// 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 MessagesProfilePage::setupCommentsBrowser(MessagesProfilePage *a1, cocos2d::CCArray *a2)
{
cocos2d::CCDirector *v4; // r0
cocos2d::CCTouchDispatcher *v5; // r0
cocos2d::CCDirector *v6; // r0
CustomListView *v7; // r0
GJCommentListLayer *v8; // r0
GJCommentListLayer *m_listLayer; // r7
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
BoomListView *m_list; // r0
cocos2d::CCMenu *m_buttonMenu; // r4
void (__fastcall *setTouchPriority)(cocos2d::CCLayer *__hidden, int); // r5
int v14; // r0
cocos2d::CCSize v15; // [sp+14h] [bp-14h] BYREF
cocos2d::CCPoint v16; // [sp+1Ch] [bp-Ch] BYREF
if ( a1->m_listLayer )
{
v4 = cocos2d::CCDirector::sharedDirector();
v5 = v4->getTouchDispatcher(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, a1->m_listLayer);
a1->m_listLayer->removeMeAndCleanup(a1->m_listLayer);
a1->m_listLayer = nullptr;
}
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v15, v6);
if ( a2 )
v7 = CustomListView::create(a2, (BoomListType)0, 196.0, 340.0);
else
v7 = nullptr;
v8 = GJCommentListLayer::create(v7, "Messages", (cocos2d::ccColor4B)-12684609, 340.0, 196.0, 0);
a1->m_listLayer = v8;
a1->m_mainLayer->addChild(a1->m_mainLayer, v8);
m_listLayer = a1->m_listLayer;
setPosition = m_listLayer->setPosition;
cocos2d::CCPoint::CCPoint(
&v16,
(float)(v15.width - 340.0) * 0.5,
(float)((float)((float)(v15.height - 196.0) * 0.5) - 10.0) + 5.0);
setPosition(m_listLayer, &v16);
m_list = a1->m_listLayer->m_list;
if ( m_list )
{
m_buttonMenu = a1->m_buttonMenu;
setTouchPriority = m_buttonMenu->setTouchPriority;
v14 = m_list->getTouchPriority(m_list);
setTouchPriority(m_buttonMenu, v14 - 2);
}
}