- 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

@@ -81,7 +81,9 @@ PD_UI7_API void Menu::Separator() {
pIO->Theme->Get(UI7Color_TextDead));
});
// Set size before pushing (cause Cursor Move will require it)
r->SetSize(fvec2(pLayout->Size.x - 10, 1));
r->SetSize(fvec2(
pLayout->Size.x - pIO->MenuPadding.x * 2 - pLayout->InitialCursorOffset.x,
1));
pLayout->AddObject(r);
}
@@ -109,8 +111,9 @@ PD_UI7_API void Menu::SeparatorText(const std::string& label) {
fvec2(pLayout->Size.x, self->GetSize().y));
});
// Set size before pushing (cause Cursor Move will require it)
r->SetSize(
fvec2(pLayout->Size.x - 10, pIO->Font->PixelHeight * pIO->FontScale));
r->SetSize(fvec2(
pLayout->Size.x - pIO->MenuPadding.x * 2 - pLayout->InitialCursorOffset.x,
pIO->Font->PixelHeight * pIO->FontScale));
pLayout->AddObject(r);
}
PD_UI7_API void Menu::HandleFocus() {