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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user