From aa164478e15fd2b83c62b98f021290e0b36896a0 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 22 Mar 2026 19:29:06 -0700 Subject: [PATCH] feat: fire DISPLAY_SIZE_CHANGED and UNIT_QUEST_LOG_CHANGED events DISPLAY_SIZE_CHANGED fires when the window is resized via SDL_WINDOWEVENT_RESIZED, allowing UI addons to adapt their layout to the new screen dimensions (5 FrameXML registrations). UNIT_QUEST_LOG_CHANGED("player") fires alongside QUEST_LOG_UPDATE at all 6 quest log modification points, for addons that register for this variant instead (4 FrameXML registrations). --- src/core/application.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/application.cpp b/src/core/application.cpp index 49c40976..4486427a 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -734,6 +734,9 @@ void Application::run() { if (renderer && renderer->getCamera()) { renderer->getCamera()->setAspectRatio(static_cast(newWidth) / newHeight); } + // Notify addons so UI layouts can adapt to the new size + if (addonManager_) + addonManager_->fireEvent("DISPLAY_SIZE_CHANGED"); } } // Debug controls