From 295f1e791732bf144618a9cbc60b8d1ff21cdeca Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 20 Apr 2024 09:39:52 +0200 Subject: [PATCH] Implement NATIVE_HOST_OPCODE_UI_RESIZE Signed-off-by: falkTX --- carla | 2 +- plugins/Common/IldaeilUI.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/carla b/carla index 0032f18..f980758 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 0032f18fad01806c512f1e12804d8c7adffb4e8a +Subproject commit f980758afb6f614119c8c228f3c0d993d8144657 diff --git a/plugins/Common/IldaeilUI.cpp b/plugins/Common/IldaeilUI.cpp index 000694c..d526787 100644 --- a/plugins/Common/IldaeilUI.cpp +++ b/plugins/Common/IldaeilUI.cpp @@ -382,9 +382,15 @@ class IldaeilUI : public UI, repaint(); } - void resizeUI(uint32_t, uint32_t) + void resizeUI(const uint32_t width, const uint32_t height) { - // unused for now + if (fDrawingState != kDrawingPluginEmbedUI) + return; + + const uint extraHeight = kButtonHeight * getScaleFactor() + ImGui::GetStyle().WindowPadding.y * 2; + + fShowingHostWindow = true; + fNextSize = Size(width, height + extraHeight); } void closeUI()