mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 19:53:04 +08:00
[saco] Implement/match CCmdWindow::Enable
This commit is contained in:
+1
-1
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user