| 56 | } |
| 57 | |
| 58 | void Label::draw(const int x, const int y) const { |
| 59 | if (!_texture || _text.empty()) |
| 60 | return; |
| 61 | |
| 62 | const auto renderer = Singletons::getRendererProvider().getRenderer(); |
| 63 | const SDL_Rect rect{x, y, _width, _height}; |
| 64 | SDL_RenderCopy(renderer, _texture.get(), nullptr, &rect); |
| 65 | } |
| 66 | |
| 67 | void Label::drawCentered(const int x, const int y) const { |
| 68 | if (!_texture || _text.empty()) |
no test coverage detected