1 #include <SFML/Graphics/Text.hpp>
66 text->Show (isVisible);
90 text->ChangeColor (color);
102 if (guiEvent.type == sf::Event::KeyPressed)
104 if (guiEvent.key.code == sf::Keyboard::Return)
115 if (contentArg.empty())
124 uint previousPos = 0;
125 uint subPos = charNumb;
126 sf::Text width (txt.substr (0, subPos));
130 while (width.getLocalBounds ().width < LabelMaxSize)
132 if (previousPos + subPos + 1 >= txt.length ())
134 width.setString (txt.substr (previousPos, ++subPos));
136 if (previousPos + subPos + 1 >= txt.length ())
138 txt.insert (previousPos + subPos - 1,
"\n");
139 previousPos += subPos;
141 width.setString (txt.substr (previousPos, subPos));