Subversion Repositories spk

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
11 cycrow 1
#ifndef __RENDERTEXT_H__
2
#define __RENDERTEXT_H__
3
 
4
#include "Display.h"
5
#include <spk.h>
6
 
7
class CRenderText : public CRenderObject
8
{
9
public:
10
	CRenderText ( int = 0 );
11
	~CRenderText ();
12
 
13
	void SetText ( CyString text ) { m_sText = text; }
14
	virtual void render ( MyDirect3DDevice9 *device, int x, int y, LPD3DXSPRITE sprite );
15
	virtual void InitFont ( MyDirect3DDevice9 *device, LPCTSTR fontStr, int size );
16
	virtual void StartAnimation ( SAnimate *anim );
17
 
18
	virtual bool CheckMouse ( int x, int y, int offsetx, int offsety );
19
	virtual void SetSize ( int w, int h )
20
	{
21
		m_iWidth = w;
22
		m_iHeight = h;
23
	}
24
	virtual void SetSize(int size)
25
	{
26
		m_iSize = size;
27
	}
28
 
29
	void SetAlignment ( int align )
30
	{
31
		m_iAlign = align;
32
	}
33
 
34
	virtual void ParseSetting ( COverlay *, CyString cmd, CyString rest, CyString section );
35
 
36
protected:
37
	CyString	m_sText;
38
	int		m_iWidth;
39
	int		m_iHeight;
40
	int		m_iAlign;
41
 
42
	bool m_bBreakLine;
43
 
44
	int m_iSize;
45
 
46
	LPD3DXFONT m_font;
47
};
48
 
49
class CRenderTextHeader : public CRenderText 
50
{
51
public:
52
	CRenderTextHeader ( MyDirect3DDevice9 *device, LPCTSTR fontStr, CyString header );
53
};
54
 
55
class CRenderTextNormal : public CRenderText 
56
{
57
public:
58
	CRenderTextNormal ( MyDirect3DDevice9 *device, LPCTSTR fontStr, CyString header );
59
};
60
 
61
#endif //__RENDERTEXT_H__