mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CUnkClass3::ResetDialogControls(...)
This commit is contained in:
parent
1653916cb7
commit
d6b207ac3c
@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
extern CConfig *pConfig;
|
||||||
|
|
||||||
CUnkClass3::CUnkClass3(IDirect3DDevice9 *pD3DDevice)
|
CUnkClass3::CUnkClass3(IDirect3DDevice9 *pD3DDevice)
|
||||||
{
|
{
|
||||||
m_pD3DDevice = pD3DDevice;
|
m_pD3DDevice = pD3DDevice;
|
||||||
field_1C = 0;
|
m_pDialog = NULL;
|
||||||
field_28 = 0;
|
field_28 = 0;
|
||||||
field_34 = 0;
|
field_34 = 0;
|
||||||
field_30 = 0;
|
field_30 = 0;
|
||||||
@ -13,6 +15,37 @@ CUnkClass3::CUnkClass3(IDirect3DDevice9 *pD3DDevice)
|
|||||||
field_10 = 300;
|
field_10 = 300;
|
||||||
field_14 = 100;
|
field_14 = 100;
|
||||||
field_18 = 30;
|
field_18 = 30;
|
||||||
|
|
||||||
memset(field_89, 0, sizeof(field_89));
|
memset(field_89, 0, sizeof(field_89));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CUnkClass3::ResetDialogControls(CDXUTDialog *pDialog)
|
||||||
|
{
|
||||||
|
m_pDialog = pDialog;
|
||||||
|
|
||||||
|
if(pDialog) {
|
||||||
|
m_pListBox = new CDXUTListBox(m_pDialog);
|
||||||
|
m_pDialog->AddControl(m_pListBox);
|
||||||
|
m_pListBox->SetLocation(10,10);
|
||||||
|
m_pListBox->SetSize(field_C,field_10-100);
|
||||||
|
m_pListBox->OnInit();
|
||||||
|
m_pListBox->GetElement(0)->TextureColor.Init(D3DCOLOR_ARGB( 200, 255, 255, 255 ));
|
||||||
|
m_pListBox->field_4D = 0;
|
||||||
|
m_pListBox->SetEnabled(false);
|
||||||
|
m_pListBox->SetVisible(false);
|
||||||
|
m_pDialog->AddButton(20,"BUTTON1",10,5,field_14,field_18);
|
||||||
|
m_pDialog->AddButton(21,"BUTTON2",110,5,field_14,field_18);
|
||||||
|
|
||||||
|
m_pDialog->AddIMEEditBox(19,"",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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -10,8 +10,9 @@ private:
|
|||||||
int field_10;
|
int field_10;
|
||||||
int field_14;
|
int field_14;
|
||||||
int field_18;
|
int field_18;
|
||||||
int field_1C;
|
CDXUTDialog *m_pDialog;
|
||||||
char _gap20[8];
|
CDXUTListBox *m_pListBox;
|
||||||
|
CDXUTIMEEditBox *m_pEditControl;
|
||||||
int field_28;
|
int field_28;
|
||||||
int field_2C;
|
int field_2C;
|
||||||
int field_30;
|
int field_30;
|
||||||
@ -23,4 +24,5 @@ private:
|
|||||||
public:
|
public:
|
||||||
CUnkClass3(IDirect3DDevice9 *pD3DDevice);
|
CUnkClass3(IDirect3DDevice9 *pD3DDevice);
|
||||||
|
|
||||||
|
void ResetDialogControls(CDXUTDialog *pDialog);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user