Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

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