[saco] Implement CDXUTElement::Refresh()

This commit is contained in:
RD42 2024-05-18 22:55:23 +08:00
parent 1f100e5d90
commit 69708b5ff5
2 changed files with 8 additions and 0 deletions

View File

@ -225,3 +225,9 @@ void CDXUTElement::SetFont( UINT iFont, D3DCOLOR defaultFontColor, DWORD dwTextF
//--------------------------------------------------------------------------------------
void CDXUTElement::Refresh()
{
TextureColor.Current = TextureColor.States[ DXUT_STATE_HIDDEN ];
FontColor.Current = FontColor.States[ DXUT_STATE_HIDDEN ];
}

View File

@ -68,6 +68,8 @@ public:
void SetTexture( UINT iTexture, RECT* prcTexture, D3DCOLOR defaultTextureColor = D3DCOLOR_ARGB(255, 255, 255, 255) );
void SetFont( UINT iFont, D3DCOLOR defaultFontColor = D3DCOLOR_ARGB(255, 255, 255, 255), DWORD dwTextFormat = DT_CENTER | DT_VCENTER );
void Refresh();
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