From 5ceafaad77cb70d3ac3ffd3975d2d7a483c46f34 Mon Sep 17 00:00:00 2001 From: Wiktor Kocielski Date: Wed, 6 Sep 2023 05:23:06 +0300 Subject: [PATCH] WindowBase::Resized delegate --- Source/Engine/Platform/Base/WindowBase.cpp | 1 + Source/Engine/Platform/Base/WindowBase.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Source/Engine/Platform/Base/WindowBase.cpp b/Source/Engine/Platform/Base/WindowBase.cpp index 5cff76361..49b4cc631 100644 --- a/Source/Engine/Platform/Base/WindowBase.cpp +++ b/Source/Engine/Platform/Base/WindowBase.cpp @@ -405,6 +405,7 @@ void WindowBase::OnResize(int32 width, int32 height) _swapChain->Resize(width, height); if (RenderTask) RenderTask->Resize(width, height); + Resized({ static_cast(width), static_cast(height) }); INVOKE_EVENT_PARAMS_2(OnResize, &width, &height); } diff --git a/Source/Engine/Platform/Base/WindowBase.h b/Source/Engine/Platform/Base/WindowBase.h index e4e7d2080..812359fb4 100644 --- a/Source/Engine/Platform/Base/WindowBase.h +++ b/Source/Engine/Platform/Base/WindowBase.h @@ -315,6 +315,11 @@ public: /// Action Closed; + /// + /// Event fired when window gets resized. + /// + Delegate Resized; + /// /// Event fired when window gets focused. ///