Fixed many issues with text paragraphs in GUI

This commit is contained in:
Yousef Khadadeh 2026-04-25 19:01:19 +03:00
parent 2d039dc47b
commit eb490906a0
13 changed files with 132 additions and 37 deletions

View file

@ -18,6 +18,10 @@ namespace GUIStuff {
void Element::clay_draw(SkCanvas* canvas, UpdateInputData& io, Clay_RenderCommand* command, bool skiaAA) {}
void Element::clear_bb() {
boundingBox = std::nullopt;
}
void Element::set_bounding_box_from_elem_data(const Clay_ElementData& elemData) {
if(elemData.found)
boundingBox = {{elemData.boundingBox.x, elemData.boundingBox.y}, {elemData.boundingBox.x + elemData.boundingBox.width, elemData.boundingBox.y + elemData.boundingBox.height}};