[saco] Implement/match the four CChatWindow scrollbar pokes; CDXUTScrollBar::GetTrackPos comes along as the out-of-line COMDAT at 0x100670D0

This commit is contained in:
ricardoofnl
2026-09-04 22:16:53 +07:00
parent 272d63d75b
commit 13e0a5e9e8
3 changed files with 57 additions and 0 deletions
+47
View File
@@ -2,6 +2,8 @@
#include "main.h"
extern CConfig *pConfig;
extern CCmdWindow *pCmdWindow;
extern CGame *pGame;
//----------------------------------------------------
@@ -199,3 +201,48 @@ void CChatWindow::ReplaceControlChars(char *szString)
while(*++szString);
}
}
//----------------------------------------------------
void CChatWindow::PageUp()
{
if(field_8 && m_pScrollBar && !pGame->sub_100A0920() && !pCmdWindow->IsImeActive()) {
int iPos = m_pScrollBar->GetTrackPos()-field_0;
if(iPos < 1) iPos = 1;
m_pScrollBar->SetTrackPos(iPos);
}
}
//----------------------------------------------------
void CChatWindow::PageDown()
{
if(field_8 && m_pScrollBar && !pGame->sub_100A0920() && !pCmdWindow->IsImeActive()) {
int iPos = m_pScrollBar->GetTrackPos();
if(iPos == 1)
iPos = field_0;
else
iPos += field_0;
if(iPos > MAX_MESSAGES) iPos = MAX_MESSAGES;
m_pScrollBar->SetTrackPos(iPos);
}
}
//----------------------------------------------------
void CChatWindow::FUNC_10067390()
{
if(m_pScrollBar)
m_pScrollBar->SetTrackPos(MAX_MESSAGES-10);
}
//----------------------------------------------------
void CChatWindow::OnMouseWheel(int nDelta)
{
if(field_8 && m_pScrollBar) {
int nScrollLines;
SystemParametersInfo(SPI_GETWHEELSCROLLLINES,0,&nScrollLines,0);
m_pScrollBar->Scroll(-(nDelta*nScrollLines));
}
}
+8
View File
@@ -51,6 +51,14 @@ public:
void FUNC_10067200();
void FUNC_10067390(); // .text:10067390
void OnMouseWheel(int nDelta); // .text:100673C0
void PageUp(); // .text:100672D0
void PageDown(); // .text:10067330
void ReplaceControlChars(char *szString); // .text:10067420
void FUNC_10067E00(); // .text:10067E00
+2
View File
@@ -35,6 +35,8 @@ public:
void GetDialogSize(RECT *pRect);
bool IsImeActive(); // .text:10069810
void Enable();
void Disable();