Fixes and function additions

- Fixed Text pos at NoCollapse flag
- Fix Button Input Api (HandleScrolling after layout Update)
- Add getter for IO and Current Menu
- Add AdObject func wrappers to Menu
This commit is contained in:
2025-12-20 19:25:20 +01:00
parent b3d621a847
commit 0cb5de882f
4 changed files with 15 additions and 6 deletions

View File

@@ -103,6 +103,8 @@ class PD_UI7_API Layout {
void Update();
fvec2 DbgScrollOffset() { return ScrollOffset; }
private:
friend class Menu;
friend class Context;

View File

@@ -103,6 +103,11 @@ class PD_UI7_API Menu {
void HandleTitlebarActions();
void DrawBaseLayout();
void AddObject(PD::UI7::Container::Ref obj) { pLayout->AddObject(obj); }
void AddObjectEx(PD::UI7::Container::Ref obj, PD::u32 flags) {
pLayout->AddObjectEx(obj, flags);
}
void Update();
/** Data Section */

View File

@@ -55,10 +55,12 @@ class PD_UI7_API Context {
PD_SHARED(Context);
IO::Ref GetIO() { return pIO; }
void AddViewPort(const ID& id, const ivec4& vp);
void UseViewPort(const ID& id);
void Update();
bool BeginMenu(const ID& id, UI7MenuFlags flags = 0, bool* pShow = nullptr);
Menu::Ref CurrentMenu() { return pCurrent; }
void EndMenu();
void AboutMenu(bool* show = nullptr);
void MetricsMenu(bool* show = nullptr);