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

Method setTextureColor

src/Abyss/UI/Label.cpp:6–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace Abyss::UI {
5
6void Label::setTextureColor() const {
7 if (!_texture)
8 return;
9
10 if (_color.r != 255 || _color.g != 255 || _color.b != 255 || _color.a != 255) {
11 SDL_SetTextureColorMod(_texture.get(), _color.r, _color.g, _color.b);
12 SDL_SetTextureAlphaMod(_texture.get(), _color.a);
13 SDL_SetTextureBlendMode(_texture.get(), SDL_BLENDMODE_BLEND);
14 }
15}
16
17Label::Label(const Concepts::FontRenderer &fontRenderer) : _fontRenderer(&fontRenderer) {}
18

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected