UI7 Add Containers to Layout

- Hotfix in CommandPool
- Add UI7 ItemRowHeight (Universal Item Size/Height)
- Add Containers to Layout
- Add ColorEdit to Menu
- Switch Back to COlorEdit in UI7::StyleEditor
- Add DrawList Layer Sorting to UI7 (Not working as expected)
- STart Work at ColorEdit container
This commit is contained in:
2026-01-24 11:58:41 +01:00
parent 4a73e8c8da
commit b2c7c1fdbf
11 changed files with 196 additions and 40 deletions

View File

@@ -29,7 +29,7 @@ namespace PD {
namespace UI7 {
Menu::Menu(const ID& id, IO::Ref io) : pIO(io), pID(id) {
pLayout = Layout::New(id, io);
TitleBarHeight = io->FontScale * 30.f;
TitleBarHeight = pIO->FontScale * pIO->Font->PixelHeight + pIO->MenuPadding.y;
pLayout->WorkRect.y += TitleBarHeight;
pLayout->CursorInit();
}
@@ -74,6 +74,16 @@ PD_UI7_API void Menu::Image(Li::Texture::Ref img, fvec2 size, Li::Rect uv) {
pLayout->AddObject(r);
}
PD_UI7_API void Menu::ColorEdit(const std::string& label, u32& clr) {
u32 id = Strings::FastHash("drd" + label);
Container::Ref r = pLayout->FindObject(id);
if (!r) {
r = UI7::ColorEdit::New(label, &clr, pIO);
r->SetID(id);
}
pLayout->AddObject(r);
}
PD_UI7_API void Menu::Separator() {
// Dynamic Objects are very simple...
Container::Ref r = DynObj::New(