diff --git a/libs/ui/source/edit.cpp b/libs/ui/source/edit.cpp index ea37bf7d..20eed6de 100644 --- a/libs/ui/source/edit.cpp +++ b/libs/ui/source/edit.cpp @@ -309,6 +309,10 @@ namespace psemek::ui break; } + p.begin_stencil(); + p.draw_rect(text_box_, {0, 0, 0, 255}); + p.commit_stencil(); + if (*st->text_shadow_offset != geom::vector{0, 0} && (*st->shadow_color)[3] != 0) { auto shoffset = offset + geom::cast(*st->text_shadow_offset); @@ -319,6 +323,8 @@ namespace psemek::ui for (auto const & g : cached_state_->glyphs) p.draw_glyph(*cached_state_->font, g.character, g.position + offset, *st->text_color); + p.end_stencil(); + if (caret_visible_) { float x;