| 52 | _texts.clear(); |
| 53 | } |
| 54 | void _EmbeddedParagraph::build() |
| 55 | { |
| 56 | if (_dirty) |
| 57 | { |
| 58 | godot::TextParagraph::clear(); |
| 59 | |
| 60 | for (const auto& text : _texts) |
| 61 | { |
| 62 | auto font = static_pointer_cast<godot::Font>(_font); |
| 63 | auto ft = godot::Ref<godot::Font>(font); |
| 64 | this->add_string(godot::String::utf8(text.c_str()), ft, 42, "", {}); |
| 65 | } |
| 66 | |
| 67 | _shape_lines(); |
| 68 | _dirty = false; |
| 69 | } |
| 70 | } |
| 71 | void _EmbeddedParagraph::add_text(const String& text, const TextStyle& style) |
| 72 | { |
| 73 | _texts.add(text); |
no test coverage detected