[saco] Implement CDXUTElement::SetTexture(...)

This commit is contained in:
RD42
2024-05-18 22:53:38 +08:00
parent d8b2b2b92b
commit 8d20084ee2
2 changed files with 16 additions and 0 deletions
+15
View File
@@ -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 );
}
+1
View File
@@ -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