MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / build

Method build

modules/gui/gui/src/backend/paragraph/paragraph.cpp:54–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 _texts.clear();
53}
54void _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}
71void _EmbeddedParagraph::add_text(const String& text, const TextStyle& style)
72{
73 _texts.add(text);

Callers 3

perform_layoutMethod · 0.45

Calls 3

clearFunction · 0.50
add_stringMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected