25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
898 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 Font class
  12. // --------------
  13. //
  14. #if !defined __LOL_FONT_H__
  15. #define __LOL_FONT_H__
  16. #include "entity.h"
  17. namespace lol
  18. {
  19. class FontData;
  20. class Font : public Entity
  21. {
  22. public:
  23. Font(char const *path);
  24. ~Font();
  25. protected:
  26. /* Inherited from Entity */
  27. virtual char const *GetName();
  28. virtual void TickDraw(float seconds, Scene &scene);
  29. public:
  30. /* New methods */
  31. void Print(vec3 pos, char const *str, vec2 scale = vec2(1.0f));
  32. ivec2 GetSize() const;
  33. private:
  34. FontData *data;
  35. };
  36. } /* namespace lol */
  37. #endif // __LOL_FONT_H__