| 84 | } |
| 85 | |
| 86 | void TextBox::setCaptionWithReplacing(std::string_view _value) |
| 87 | { |
| 88 | // replace "\\n" with char '\n' |
| 89 | size_t pos = _value.find("\\n"); |
| 90 | if (pos == std::string::npos) |
| 91 | { |
| 92 | setCaption(LanguageManager::getInstance().replaceTags(UString(_value))); |
| 93 | } |
| 94 | else |
| 95 | { |
| 96 | std::string value(_value); |
| 97 | while (pos != std::string::npos) |
| 98 | { |
| 99 | value[pos++] = '\n'; |
| 100 | value.erase(pos, 1); |
| 101 | pos = value.find("\\n"); |
| 102 | } |
| 103 | setCaption(LanguageManager::getInstance().replaceTags(value)); |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | void TextBox::setTextShadowColour(const Colour& _value) |
| 108 | { |
no test coverage detected