mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement/match CmdWindow::ResetDialogControls(...)
* Update CCmdWindow constructor
This commit is contained in:
parent
8f44bc5a0d
commit
79e40cf088
@ -1,8 +1,9 @@
|
||||
|
||||
#include "main.h"
|
||||
|
||||
//----------------------------------------------------
|
||||
extern CConfig *pConfig;
|
||||
|
||||
//----------------------------------------------------
|
||||
// MATCH
|
||||
CCmdWindow::CCmdWindow(IDirect3DDevice9 *pD3DDevice)
|
||||
{
|
||||
@ -10,7 +11,7 @@ CCmdWindow::CCmdWindow(IDirect3DDevice9 *pD3DDevice)
|
||||
m_pD3DDevice = pD3DDevice;
|
||||
m_iCmdCount = 0;
|
||||
field_1AF4 = 0;
|
||||
field_8 = 0;
|
||||
m_pEditControl = NULL;
|
||||
field_1AF0 = -1;
|
||||
|
||||
memset(&field_1565[0],0,1290);
|
||||
@ -19,14 +20,36 @@ CCmdWindow::CCmdWindow(IDirect3DDevice9 *pD3DDevice)
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
// MATCH
|
||||
void CCmdWindow::ResetDialogControls(CDXUTDialog *pGameUI)
|
||||
{
|
||||
m_pGameUI = pGameUI;
|
||||
|
||||
if(pGameUI) {
|
||||
pGameUI->AddIMEEditBox(IDC_CMDEDIT,"",10,175,570,40,true,&m_pEditControl);
|
||||
if(pConfig->GetIntVariable("ime")) {
|
||||
CDXUTIMEEditBox::EnableImeSystem(true);
|
||||
CDXUTIMEEditBox::StaticOnCreateDevice();
|
||||
}
|
||||
m_pEditControl->GetElement(0)->TextureColor.Init(D3DCOLOR_ARGB( 240, 5, 5, 5 ));
|
||||
m_pEditControl->SetTextColor(D3DCOLOR_ARGB( 255, 255, 255, 255 ));
|
||||
m_pEditControl->SetCaretColor(D3DCOLOR_ARGB( 255, 150, 150, 150 ));
|
||||
m_pEditControl->SetSelectedBackColor(D3DCOLOR_ARGB( 255, 185, 34, 40 ));
|
||||
m_pEditControl->SetSelectedTextColor(D3DCOLOR_ARGB( 255, 10, 10, 15 ));
|
||||
m_pEditControl->SetEnabled(false);
|
||||
m_pEditControl->SetVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
// MATCH
|
||||
void CCmdWindow::AddDefaultCmdProc(CMDPROC cmdDefault)
|
||||
{
|
||||
m_pDefaultCmd = cmdDefault;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
// MATCH
|
||||
void CCmdWindow::AddCmdProc(PCHAR szCmdName, CMDPROC cmdHandler)
|
||||
{
|
||||
if(m_iCmdCount < MAX_CMDS && (strlen(szCmdName) < MAX_CMD_STRLEN)) {
|
||||
|
@ -11,8 +11,8 @@ class CCmdWindow // size: 6908
|
||||
private:
|
||||
|
||||
IDirect3DDevice9 *m_pD3DDevice;
|
||||
int field_4;
|
||||
int field_8;
|
||||
CDXUTDialog *m_pGameUI;
|
||||
CDXUTIMEEditBox *m_pEditControl;
|
||||
|
||||
public:
|
||||
|
||||
@ -35,4 +35,6 @@ public:
|
||||
|
||||
void AddDefaultCmdProc(CMDPROC cmdDefault);
|
||||
void AddCmdProc(PCHAR szCmdName, CMDPROC cmdHandler);
|
||||
|
||||
void ResetDialogControls(CDXUTDialog *pGameUI);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user