[saco] Implement/match CDXUTListBox::AddItem

This commit is contained in:
ricardoofnl
2026-08-30 16:52:56 +07:00
parent 07c5ed6f46
commit 1565af7ea1
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -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) )
+1 -1
View File
@@ -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 );