Add label component

This commit is contained in:
2025-12-13 16:02:14 +08:00
parent 1e2555a35b
commit 1d1f71af19
2 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#include "Label.h"
Label::Label(const std::string& text, TextStyle style) :
m_labelData({text, style})
{
}
Label::Label() {
}
void Label::setText(const std::string& text, TextStyle style) {
m_labelData.text = text;
m_labelData.textstytle = style;
}
void Label::setText(const std::string& text) {
m_labelData.text = text;
}
void Label::setBackgroundColor(SDL_Color normal) {
m_labelData.backgroundColor = normal;
}
void Label::setBorder(int thickness, SDL_Color color) {
m_labelData.borderThickness = thickness;
m_labelData.borderColor = color;
}
void Label::update(float deltaTime) {
}