From 91da4e96809743670522e59197faae6951dc0f3a Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sun, 8 Feb 2026 21:45:31 -0600 Subject: [PATCH] feat(ui): add CLayoutFrame::SetSize --- src/ui/CLayoutFrame.cpp | 7 +++++++ src/ui/CLayoutFrame.hpp | 1 + 2 files changed, 8 insertions(+) diff --git a/src/ui/CLayoutFrame.cpp b/src/ui/CLayoutFrame.cpp index 886d776..9e7cac4 100644 --- a/src/ui/CLayoutFrame.cpp +++ b/src/ui/CLayoutFrame.cpp @@ -862,6 +862,13 @@ void CLayoutFrame::SetProtectFlag(uint32_t flag) { this->m_flags &= ~0x800; } +void CLayoutFrame::SetSize(float width, float height) { + this->m_flags &= ~0x8; + this->m_width = width; + this->m_height = height; + this->Resize(0); +} + void CLayoutFrame::SetWidth(float width) { this->m_flags &= ~0x8; this->m_width = width; diff --git a/src/ui/CLayoutFrame.hpp b/src/ui/CLayoutFrame.hpp index 53ab714..26c36d8 100644 --- a/src/ui/CLayoutFrame.hpp +++ b/src/ui/CLayoutFrame.hpp @@ -49,6 +49,7 @@ class CLayoutFrame { virtual bool SetLayoutScale(float scale, bool force); virtual void SetWidth(float width); virtual void SetHeight(float height); + virtual void SetSize(float width, float height); virtual float GetWidth(); virtual float GetHeight(); virtual void GetSize(float& width, float& height, int32_t a4);