diff --git a/saco/chatwindow.cpp b/saco/chatwindow.cpp index 8162e46..be99534 100644 --- a/saco/chatwindow.cpp +++ b/saco/chatwindow.cpp @@ -46,8 +46,8 @@ CChatWindow::CChatWindow(IDirect3DDevice9 *pD3DDevice, CFontRender *pFontRender, field_63B6 = NULL; field_63D2 = GetTickCount(); field_63DE = 1; - field_11E = 0; - field_116 = 0; + m_pScrollBar = NULL; + m_pGameUI = NULL; field_11A = 0; CreateFonts(); @@ -61,9 +61,38 @@ void CChatWindow::CreateFonts() // TODO: CChatWindow::CreateFonts .text:100681D0 } +//---------------------------------------------------- +// MATCH +void CChatWindow::ResetDialogControls(CDXUTDialog *pGameUI) +{ + m_pGameUI = pGameUI; + + if(pGameUI) { + m_pScrollBar = new CDXUTScrollBar(pGameUI); + pGameUI->AddControl(m_pScrollBar); + m_pScrollBar->SetVisible(true); + m_pScrollBar->SetEnabled(true); + + FUNC_10067200(); + } +} + +//---------------------------------------------------- //---------------------------------------------------- void CChatWindow::AddDebugMessage(CHAR * szFormat, ...) { // TODO: CChatWindow::AddDebugMessage .text:100680F0 } +// MATCH +void CChatWindow::FUNC_10067200() +{ + if(m_pScrollBar) { + m_pScrollBar->SetLocation(10,40); + m_pScrollBar->SetSize(20,((field_63E2+1)*field_0)-60); + m_pScrollBar->SetTrackRange(1,MAX_MESSAGES); + m_pScrollBar->SetPageSize(field_0); + m_pScrollBar->SetTrackPos(MAX_MESSAGES-field_0); + } +} + diff --git a/saco/chatwindow.h b/saco/chatwindow.h index 0268a00..588fa17 100644 --- a/saco/chatwindow.h +++ b/saco/chatwindow.h @@ -20,9 +20,9 @@ private: char field_C; int field_D; char field_11[261]; - int field_116; + CDXUTDialog *m_pGameUI; int field_11A; - int field_11E; + CDXUTScrollBar *m_pScrollBar; DWORD m_dwChatTextColor; DWORD m_dwChatInfoColor; DWORD m_dwChatDebugColor; @@ -41,13 +41,19 @@ private: int field_63D6; int field_63DA; int field_63DE; - char _gap63E2[8]; + int field_63E2; + char _gap63E6[4]; + void CreateFonts(); + void FUNC_10067200(); + public: void AddDebugMessage(CHAR *szFormat, ...); + void ResetDialogControls(CDXUTDialog *pGameUI); + CChatWindow(IDirect3DDevice9 *pD3DDevice, CFontRender *pFontRender, CHAR *szChatLogFile); };