Last change
on this file since 121 was
121,
checked in by sam, 11 years ago
|
Implement naive bold font printing.
|
-
Property svn:keywords set to
Id
|
File size:
630 bytes
|
Rev | Line | |
---|
[100] | 1 | // |
---|
| 2 | // Deus Hax (working title) |
---|
| 3 | // Copyright (c) 2010 Sam Hocevar <sam@hocevar.net> |
---|
| 4 | // |
---|
[87] | 5 | |
---|
[100] | 6 | // |
---|
| 7 | // The Font class |
---|
| 8 | // -------------- |
---|
| 9 | // |
---|
[87] | 10 | |
---|
| 11 | #if !defined __DH_FONT_H__ |
---|
| 12 | #define __DH_FONT_H__ |
---|
| 13 | |
---|
[111] | 14 | #include "asset.h" |
---|
| 15 | |
---|
[87] | 16 | class FontData; |
---|
| 17 | |
---|
[111] | 18 | class Font : public Asset |
---|
[87] | 19 | { |
---|
| 20 | public: |
---|
| 21 | Font(char const *path); |
---|
| 22 | ~Font(); |
---|
| 23 | |
---|
[111] | 24 | protected: |
---|
| 25 | /* Inherited from Asset */ |
---|
| 26 | virtual Group GetGroup(); |
---|
| 27 | virtual void TickRender(float delta_time); |
---|
| 28 | |
---|
| 29 | public: |
---|
| 30 | /* New methods */ |
---|
| 31 | char const *GetName(); |
---|
| 32 | |
---|
[87] | 33 | void Print(int x, int y, char const *str); |
---|
[121] | 34 | void PrintBold(int x, int y, char const *str); |
---|
[87] | 35 | |
---|
| 36 | private: |
---|
| 37 | FontData *data; |
---|
| 38 | }; |
---|
| 39 | |
---|
| 40 | #endif // __DH_FONT_H__ |
---|
| 41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.