Files
prog2/Engine/Text.h
Bram Verhulst 5f1dcd5788 Add Alot
2024-06-09 22:03:29 +02:00

32 lines
635 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();
Text(const Text& other) = delete;
Text(Text&& other) = delete;
Text& operator=(const Text& other) = delete;
Text& operator=(Text&& other) = delete;
void Draw(const Vector2f& pos) const;
void ChangeText(const std::string& text);
std::string GetText();
private:
std::string m_Text;
std::string m_FontPath;
int m_Size;
Color4f m_Color;
Texture* m_Texture;
bool m_IsCreatedOk{ false };
};