Rewrote texture loading actor and sprite

This commit is contained in:
Chris Danford
2001-11-25 04:31:44 +00:00
parent c52c818881
commit c679ec7956
24 changed files with 511 additions and 446 deletions
+13 -9
View File
@@ -16,28 +16,32 @@
#include "Sprite.h"
#include "BitmapText.h"
#include "BitmapFont.h"
class BitmapText : public Sprite
class BitmapText : public Actor
{
public:
BitmapText();
// virtual ~BitmapText();
~BitmapText();
BOOL LoadFromFontFile( CString sFontFilePath );
void SetText( CString sText );
bool LoadFromFontName( CString sFontName );
void SetText( CString sText ) { m_sText = sText; };
CString GetText() { return m_sText; };
void SetTopColor( D3DXCOLOR new_color ) { m_colorTop = new_color; };
void SetBottomColor( D3DXCOLOR new_color ) { m_colorBottom = new_color; };
void SetColor( D3DXCOLOR new_color ) { SetTopColor(new_color); SetBottomColor(new_color); };
virtual void Draw();
protected:
void ResetWidthAndHeight();
CString m_sFontFilePath;
CString m_sFontName;
CBitmapFont* m_pFont;
CString m_sText; // the string that the font is displaying
//Sprite m_Sprite; // holder for the graphic
CMap<TCHAR, TCHAR&, UINT, UINT&> m_mapCharToFrameNo;
D3DXCOLOR m_colorTop;
D3DXCOLOR m_colorBottom;
};