- Add data getter to DrawList
- Add NoOOS (Out Of screen Rendering) flag to text renderer (requires a textbox)
- UI7 Label Wrapping (optinal and beta)
This commit is contained in:
2025-12-23 19:20:31 +01:00
parent 0cb5de882f
commit ac281dc7a9
7 changed files with 41 additions and 5 deletions

View File

@@ -272,6 +272,15 @@ PD_LITHIUM_API void Font::CmdTextEx(std::vector<Command::Ref> &cmds,
}
for (auto &it : lines) {
if (flags & LiTextFlags_NoOOS) {
if (rpos.y + off.y + lh < 0) {
off.y += lh;
continue;
}
if (rpos.y + off.y > box.y && box.y != 0) {
break;
}
}
if (flags & LiTextFlags_Short) {
fvec2 tmp_dim;
it = pShortText(it, scale, box - pos, tmp_dim);