[saco] Implement/match CDXUTListBox::InsertItem

This commit is contained in:
ricardoofnl
2026-08-30 16:52:56 +07:00
parent 1565af7ea1
commit d011509921
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -4288,7 +4288,7 @@ HRESULT CDXUTListBox::AddItem( const TCHAR *wszText, void *pData, D3DCOLOR TextC
//--------------------------------------------------------------------------------------
HRESULT CDXUTListBox::InsertItem( int nIndex, const TCHAR *wszText, void *pData )
HRESULT CDXUTListBox::InsertItem( int nIndex, const TCHAR *wszText, void *pData, D3DCOLOR TextColor )
{
DXUTListBoxItem *pNewItem = new DXUTListBoxItem;
if( !pNewItem )
@@ -4298,6 +4298,7 @@ HRESULT CDXUTListBox::InsertItem( int nIndex, const TCHAR *wszText, void *pData
pNewItem->pData = pData;
SetRect( &pNewItem->rcActive, 0, 0, 0, 0 );
pNewItem->bSelected = false;
pNewItem->TextColor = TextColor;
HRESULT hr = m_Items.Insert( nIndex, pNewItem );
if( SUCCEEDED( hr ) )
+1 -1
View File
@@ -625,7 +625,7 @@ public:
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, D3DCOLOR TextColor );
HRESULT InsertItem( int nIndex, const TCHAR *wszText, void *pData );
HRESULT InsertItem( int nIndex, const TCHAR *wszText, void *pData, D3DCOLOR TextColor );
void RemoveItem( int nIndex );
void RemoveItemByText( TCHAR *wszText );
void RemoveItemByData( void *pData );