mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 19:53:04 +08:00
[saco] Implement/match CDXUTListBox::AddItem
This commit is contained in:
@@ -4258,7 +4258,7 @@ void CDXUTListBox::UpdateRects()
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
HRESULT CDXUTListBox::AddItem( const TCHAR *wszText, void *pData )
|
||||
HRESULT CDXUTListBox::AddItem( const TCHAR *wszText, void *pData, D3DCOLOR TextColor )
|
||||
{
|
||||
DXUTListBoxItem *pNewItem = new DXUTListBoxItem;
|
||||
if( !pNewItem )
|
||||
@@ -4268,6 +4268,10 @@ HRESULT CDXUTListBox::AddItem( const TCHAR *wszText, void *pData )
|
||||
pNewItem->pData = pData;
|
||||
SetRect( &pNewItem->rcActive, 0, 0, 0, 0 );
|
||||
pNewItem->bSelected = false;
|
||||
pNewItem->TextColor = TextColor;
|
||||
pNewItem->field_29D = false;
|
||||
for( int i = 0; i < 3; i++ )
|
||||
ZeroMemory( pNewItem->strColumnText[i], 64 );
|
||||
|
||||
HRESULT hr = m_Items.Add( pNewItem );
|
||||
if( FAILED(hr) )
|
||||
|
||||
@@ -624,7 +624,7 @@ public:
|
||||
void SetStyle( DWORD dwStyle ) { m_dwStyle = dwStyle; }
|
||||
void SetScrollBarWidth( int nWidth ) { m_nSBWidth = nWidth; UpdateRects(); }
|
||||
void SetBorder( int nBorder, int nMargin ) { m_nBorder = nBorder; m_nMargin = nMargin; }
|
||||
HRESULT AddItem( const TCHAR *wszText, void *pData );
|
||||
HRESULT AddItem( const TCHAR *wszText, void *pData, D3DCOLOR TextColor );
|
||||
HRESULT InsertItem( int nIndex, const TCHAR *wszText, void *pData );
|
||||
void RemoveItem( int nIndex );
|
||||
void RemoveItemByText( TCHAR *wszText );
|
||||
|
||||
Reference in New Issue
Block a user