Mercurial > LightClone
comparison LightClone/Source/GuiLabel.h @ 17:4951acfe92fc
Reworking GUI system
author | koryspansel <koryspansel@bendbroadband.com> |
---|---|
date | Wed, 14 Sep 2011 13:33:22 -0700 |
parents | |
children | 33cb6979ac51 |
comparison
equal
deleted
inserted
replaced
16:88f7c22e7b45 | 17:4951acfe92fc |
---|---|
1 /* | |
2 * GuiLabel | |
3 */ | |
4 | |
5 #ifndef __GUILABEL_H__ | |
6 #define __GUILABEL_H__ | |
7 | |
8 #include "Core.h" | |
9 #include "GuiElement.h" | |
10 | |
11 /* | |
12 * GuiLabelFlag | |
13 */ | |
14 enum | |
15 { | |
16 GuiLabelFlag_CenterX = (1 << 0), | |
17 GuiLabelFlag_CenterY = (1 << 1), | |
18 }; | |
19 | |
20 /* | |
21 * GuiLabel | |
22 */ | |
23 class GuiLabel : public GuiElement | |
24 { | |
25 /* | |
26 * MaximumLabelLength | |
27 */ | |
28 static const uint32 MaximumLabelLength = 32; | |
29 | |
30 /* | |
31 * pResourceManager | |
32 */ | |
33 ResourceManager* pResourceManager; | |
34 | |
35 /* | |
36 * pFont | |
37 */ | |
38 ID3DXFont* pFont; | |
39 | |
40 /* | |
41 * kLabel | |
42 */ | |
43 char kLabel[MaximumLabelLength]; | |
44 | |
45 /* | |
46 * nFlags | |
47 */ | |
48 uint32 nFlags; | |
49 | |
50 /* | |
51 * kColor | |
52 */ | |
53 D3DCOLOR kColor; | |
54 | |
55 public: | |
56 | |
57 /* | |
58 * GuiLabel | |
59 */ | |
60 GuiLabel(); | |
61 | |
62 /* | |
63 * Initialize | |
64 */ | |
65 virtual ErrorCode Initialize(ResourceManager* pResourceManager); | |
66 | |
67 /* | |
68 * Terminate | |
69 */ | |
70 virtual void Terminate(); | |
71 | |
72 /* | |
73 * Update | |
74 */ | |
75 virtual void Update(float fElapsed); | |
76 | |
77 /* | |
78 * Render | |
79 */ | |
80 virtual void Render(RenderContext& kContext); | |
81 | |
82 /* | |
83 * SetFont | |
84 */ | |
85 ErrorCode SetFont(const char* pName, uint32 nSize, uint32 nHeight = FW_NORMAL); | |
86 | |
87 /* | |
88 * SetText | |
89 */ | |
90 ErrorCode SetText(const char* pText); | |
91 }; | |
92 | |
93 #endif //__GUILABEL_H__ |