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.
 
 
 

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