diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2022-12-13 13:29:06 +0100 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2022-12-13 13:29:06 +0100 |
commit | 70c0be5b2cfb3b9cfe86d5a6e6624e28fb845453 (patch) | |
tree | 862b3a2c38c35e0c6c739c96cb9772eb784c622a /src/graphics/text.h | |
parent | 82be0bb0f9e19ea578858d6afff96ef8966424bc (diff) |
Move text to a separate file
Diffstat (limited to 'src/graphics/text.h')
-rw-r--r-- | src/graphics/text.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/graphics/text.h b/src/graphics/text.h new file mode 100644 index 0000000..22179f5 --- /dev/null +++ b/src/graphics/text.h @@ -0,0 +1,17 @@ +#ifndef GRAPHICS_TEXT_H +#define GRAPHICS_TEXT_H +#include"textureFont.h" + +namespace Graphics { + class Text : public sf::Drawable, public sf::Transformable { + private: + TextureFont &font_; + const std::string text_; + sf::VertexArray vertices_; + public: + Text(TextureFont &font, const std::string &text); + virtual void draw(sf::RenderTarget& target, + sf::RenderStates states) const override; + }; +} +#endif // GRAPHICS_TEXT_H |