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.

50 lines
900 B

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2011 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://sam.zoy.org/projects/COPYING.WTFPL for more details.
  9. //
  10. //
  11. // The Text class
  12. // --------------
  13. //
  14. #if !defined __DH_TEXT_H__
  15. #define __DH_TEXT_H__
  16. #include "entity.h"
  17. class TextData;
  18. class Text : public Entity
  19. {
  20. public:
  21. Text(char const *text, char const *font);
  22. virtual ~Text();
  23. void SetText(char const *text);
  24. void SetInt(int val);
  25. void SetPos(int3 pos);
  26. void SetAlign(int align);
  27. enum
  28. {
  29. ALIGN_LEFT,
  30. ALIGN_RIGHT,
  31. ALIGN_CENTER,
  32. };
  33. protected:
  34. virtual void TickDraw(float deltams);
  35. private:
  36. TextData *data;
  37. };
  38. #endif // __DH_TEXT_H__