Add Alot
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "GuiText.h"
|
||||
|
||||
#include "colors.h"
|
||||
#include "utils.h"
|
||||
GuiText::GuiText(const Vector2f& position, const std::string& text, const std::string& fontPath, int size, const Color4f& color): m_Position(position), m_Text(new Text(text, fontPath, size, color)) {
|
||||
|
||||
}
|
||||
@@ -11,6 +12,7 @@ GuiText::GuiText(): m_Position(100,100), m_Text(new Text("Undefined", "fonts/ver
|
||||
}
|
||||
|
||||
void GuiText::Draw() const {
|
||||
utils::SetColor(Colors::WHITE);
|
||||
m_Text->Draw(m_Position);
|
||||
}
|
||||
|
||||
@@ -20,6 +22,12 @@ void GuiText::Update(float elapsedSec) {
|
||||
void GuiText::ChangeText(const std::string& text) const {
|
||||
m_Text->ChangeText(text);
|
||||
}
|
||||
void GuiText::SetPosition(const Vector2f& pos) {
|
||||
m_Position = pos;
|
||||
}
|
||||
GuiText::~GuiText() {
|
||||
delete m_Text;
|
||||
}
|
||||
std::string GuiText::GetText() const {
|
||||
return m_Text->GetText();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user