MCPcopy Create free account
hub / github.com/AbyssEngine/AbyssEngineOld / setText

Method setText

src/Abyss/UI/Label.cpp:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void Label::setText(const std::string_view text) {
25 if (text == _text)
26 return;
27 _text = text;
28
29 if (_text.empty()) {
30 _texture.reset();
31 return;
32 }
33
34 _texture = _fontRenderer->renderText(_text, _width, _height);
35 setTextureColor();
36}
37
38void Label::setColor(const SDL_Color color) {
39 if (color.r == _color.r && color.g == _color.g && color.b == _color.b && color.a == _color.a)

Callers 2

addNextItemMethod · 0.80
ButtonMethod · 0.80

Calls 2

emptyMethod · 0.80
renderTextMethod · 0.80

Tested by

no test coverage detected