[saco] Implement/match CCmdWindow::Enable

This commit is contained in:
ricardoofnl
2026-08-02 13:54:59 +07:00
parent bc1bf0ede6
commit 76fa9023ba
2 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ public:
DWORD m_dwChatTextColor;
DWORD m_dwChatInfoColor;
DWORD m_dwChatDebugColor;
char _gap12E[4];
int field_12E;
CHAT_WINDOW_ENTRY m_ChatWindowEntries[MAX_MESSAGES];
CFontRender *m_pFontRender;
ID3DXSprite *field_63A6;
+13 -1
View File
@@ -3,6 +3,7 @@
extern CGame *pGame;
extern CConfig *pConfig;
extern CChatWindow *pChatWindow;
//----------------------------------------------------
@@ -70,10 +71,21 @@ void CCmdWindow::Enable()
RECT rect;
GetClientRect(pGame->GetMainWindowHwnd(), &rect);
int iWidth = (int)(rect.right * 0.6f);
if(iWidth > 800) iWidth = 800;
m_pEditControl->SetEnabled(true);
m_pEditControl->SetVisible(true);
// TODO: CCmdWindow::Enable()
m_pEditControl->SetLocation(40, pChatWindow->field_12E);
m_pEditControl->SetSize(iWidth, 14 - (int)(m_pGameUI->GetFont(0)->nHeight * -1.5f));
m_pGameUI->RequestFocus(m_pEditControl);
m_pEditControl->OnFocusIn();
int iField = pChatWindow->field_12E;
CDXUTDialog *pUI = m_pGameUI;
*(int *)((char *)pUI + 0x11E) = iWidth + 100;
*(int *)((char *)pUI + 0x122) = iField + 50;
}
m_bEnabled = TRUE;