MCPcopy Create free account
hub / github.com/Cpasjuste/pplay / TextIcon

Method TextIcon

src/text_icon.cpp:10–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using namespace c2d;
9
10TextIcon::TextIcon(const std::string &str, unsigned int fontSize, Font *font, const Color &color)
11 : RectangleShape({32, 32}) {
12
13 text = new Text(str, fontSize, font);
14 text->setOrigin(Origin::Center);
15 setString(str);
16 RectangleShape::add(text);
17
18 RectangleShape::setFillColor(Color::Transparent);
19 RectangleShape::setOutlineColor(color);
20 RectangleShape::setOutlineThickness(1);
21 RectangleShape::setCornersRadius(5);
22 RectangleShape::setCornerPointCount(8);
23}
24
25void TextIcon::setFillColor(const Color &color) {
26 text->setFillColor(color);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected