diff --git a/saco/d3d9/common/DXUTgui.cpp b/saco/d3d9/common/DXUTgui.cpp index 62fd8a6..6612efb 100644 --- a/saco/d3d9/common/DXUTgui.cpp +++ b/saco/d3d9/common/DXUTgui.cpp @@ -7,6 +7,7 @@ //-------------------------------------------------------------------------------------- #include "dxstdafx.h" #include "DXUTgui.h" +#include "DXUTsettingsDlg.h" #undef min // use __min instead #undef max // use __max instead @@ -199,3 +200,17 @@ void DXUTBlendColor::Blend( UINT iState, float fElapsedTime, float fRate ) +//-------------------------------------------------------------------------------------- +void CDXUTElement::SetTexture( UINT iTexture, RECT* prcTexture, D3DCOLOR defaultTextureColor ) +{ + this->iTexture = iTexture; + + if( prcTexture ) + rcTexture = *prcTexture; + else + SetRectEmpty( &rcTexture ); + + TextureColor.Init( defaultTextureColor ); +} + + diff --git a/saco/d3d9/common/DXUTgui.h b/saco/d3d9/common/DXUTgui.h index 5f0874e..dffea2c 100644 --- a/saco/d3d9/common/DXUTgui.h +++ b/saco/d3d9/common/DXUTgui.h @@ -65,6 +65,7 @@ struct DXUTBlendColor class CDXUTElement { public: + void SetTexture( UINT iTexture, RECT* prcTexture, D3DCOLOR defaultTextureColor = D3DCOLOR_ARGB(255, 255, 255, 255) ); UINT iTexture; // Index of the texture for this Element UINT iFont; // Index of the font for this Element DWORD dwTextFormat; // The format argument to DrawText