38 static const std::vector<ElementComponent*>&
instances() {
return _instances; }
52 float width()
const {
return _width; }
53 void setWidth(
const float value) { _width = std::max(value, 0.0f); _textDirty =
true; }
55 float height()
const {
return _height; }
56 void setHeight(
const float value) { _height = std::max(value, 0.0f); _textDirty =
true; }
58 float opacity()
const {
return _opacity; }
59 void setOpacity(
const float value) { _opacity = std::clamp(value, 0.0f, 1.0f); }
65 void setFontSize(
const int value) { _fontSize = std::max(value, 1); _textDirty =
true; }
67 const std::string&
text()
const {
return _text; }
68 void setText(
const std::string& value) { _text = value; _textDirty =
true; }
77 void setWrapLines(
const bool value) { _wrapLines = value; _textDirty =
true; }
86 inline static std::vector<ElementComponent*> _instances;
92 float _width = 100.0f;
93 float _height = 50.0f;
94 float _opacity = 1.0f;
100 bool _wrapLines =
false;
101 bool _textDirty =
true;
102 bool _useInput =
false;