30 lines
700 B
C++
30 lines
700 B
C++
#pragma once
|
|
#include "GuiElement.h"
|
|
#include "Text.h"
|
|
#include "Texture.h"
|
|
|
|
class GuiText : public GuiElement {
|
|
public:
|
|
GuiText(const Vector2f& position, const std::string& text, const std::string& fontPath, int size, const Color4f& color);
|
|
GuiText();
|
|
|
|
GuiText(const GuiText& other) = delete;
|
|
GuiText& operator=(const GuiText& other) = delete;
|
|
GuiText(GuiText&& other) = delete;
|
|
GuiText& operator=(GuiText&& other) = delete;
|
|
|
|
|
|
void Draw() const override;
|
|
void Update(float elapsedSec) override;
|
|
|
|
void ChangeText(const std::string& text) const;
|
|
void SetPosition(const Vector2f& pos);
|
|
|
|
~GuiText() override;
|
|
std::string GetText() const;
|
|
|
|
private:
|
|
Vector2f m_Position;
|
|
Text* m_Text;
|
|
};
|