From f1a46c989023d09840403e6338a01cc8095b1458 Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:32:09 +0300 Subject: [PATCH] Replicate the same scaling applied to the rectangle in world map. --- UnleashedRecomp/ui/options_menu.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/UnleashedRecomp/ui/options_menu.cpp b/UnleashedRecomp/ui/options_menu.cpp index 9453ed3e..204a1955 100644 --- a/UnleashedRecomp/ui/options_menu.cpp +++ b/UnleashedRecomp/ui/options_menu.cpp @@ -190,8 +190,15 @@ static void DrawTitle() if (isRectVisible) { + float rectScale = 1.0f; + if (rectBlinkMotion == 0.0) + { + constexpr float RECT_SCALES[] = { 1.2f, 1.1f, 1.1f, 1.0f, 1.15f, 0.4f, 1.2f, 1.1f, 1.05f, 1.0f, 1.5f, 1.2f, 1.0f }; + rectScale = RECT_SCALES[uint32_t(round(rectX / rectSize)) % std::size(RECT_SCALES)]; + } + ImVec2 rectMin = { optionsMin.x + rectX, optionsMin.y + rectY }; - ImVec2 rectMax = { optionsMin.x + rectX + rectSize, optionsMin.y + rectY + rectSize }; + ImVec2 rectMax = { optionsMin.x + rectX + rectSize * rectScale, optionsMin.y + rectY + rectSize }; auto rectOutlineMargin = Scale(2.5f);