source: trunk/src/text.h @ 2377

Last change on this file since 2377 was 2377, checked in by Jnat, 7 years ago

added GetPos method to get text position

  • Property svn:keywords set to Id
File size: 942 bytes
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://www.wtfpl.net/ for more details.
9//
10
11//
12// The Text class
13// --------------
14//
15
16#if !defined __LOL_TEXT_H__
17#define __LOL_TEXT_H__
18
19#include "entity.h"
20
21namespace lol
22{
23
24class TextData;
25
26class Text : public Entity
27{
28public:
29    Text(char const *text, char const *font);
30    virtual ~Text();
31
32    void SetText(char const *text);
33    void SetInt(int val);
34    void SetPos(vec3 pos);
35    vec3 GetPos();
36    void SetAlign(int align);
37
38    enum
39    {
40        ALIGN_LEFT,
41        ALIGN_RIGHT,
42        ALIGN_CENTER,
43    };
44
45protected:
46    virtual void TickDraw(float seconds);
47
48private:
49    TextData *data;
50};
51
52} /* namespace lol */
53
54#endif // __LOL_TEXT_H__
55
Note: See TracBrowser for help on using the repository browser.