mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 03:51:47 +01:00
28 lines
460 B
C++
28 lines
460 B
C++
#pragma once
|
|
#include <string>
|
|
|
|
#include "Texture.h"
|
|
#include "../Game/TextureManager.h"
|
|
|
|
class Text
|
|
{
|
|
public:
|
|
Text(const std::string& text, const std::string& fontPath, int size, const Color4f& color);
|
|
Text() = default;
|
|
~Text();
|
|
|
|
void Draw(const Vector2f& pos) const;
|
|
|
|
void ChangeText(const std::string& text);
|
|
|
|
|
|
|
|
private:
|
|
std::string m_Text;
|
|
std::string m_FontPath;
|
|
int m_Size;
|
|
Color4f m_Color;
|
|
Texture* m_Texture;
|
|
bool m_IsCreatedOk{ false };
|
|
};
|