You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

56 rivejä
942 B

  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. // The Text class
  12. // --------------
  13. //
  14. #if !defined __LOL_TEXT_H__
  15. #define __LOL_TEXT_H__
  16. #include "entity.h"
  17. namespace lol
  18. {
  19. class TextData;
  20. class Text : public Entity
  21. {
  22. public:
  23. Text(char const *text, char const *font);
  24. virtual ~Text();
  25. void SetText(char const *text);
  26. void SetInt(int val);
  27. void SetPos(vec3 pos);
  28. vec3 GetPos();
  29. void SetAlign(int align);
  30. enum
  31. {
  32. ALIGN_LEFT,
  33. ALIGN_RIGHT,
  34. ALIGN_CENTER,
  35. };
  36. protected:
  37. virtual void TickDraw(float seconds);
  38. private:
  39. TextData *data;
  40. };
  41. } /* namespace lol */
  42. #endif // __LOL_TEXT_H__