From 16c35b45c2250e367aa0e2943b15809a38785c6c Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:46:34 +0000 Subject: [PATCH] options_menu: fix info scrolling not resetting if text is too small --- UnleashedRecomp/ui/options_menu.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UnleashedRecomp/ui/options_menu.cpp b/UnleashedRecomp/ui/options_menu.cpp index a2fdbde..335d562 100644 --- a/UnleashedRecomp/ui/options_menu.cpp +++ b/UnleashedRecomp/ui/options_menu.cpp @@ -1521,6 +1521,13 @@ static void DrawInfoPanel(ImVec2 infoMin, ImVec2 infoMax) scrollOffset = std::clamp(scrollOffset, 0.0f, scrollMax); } + else + { + isScrolling = false; + scrollOffset = 0.0f; + scrollTimer = 0.0f; + scrollDirection = 1.0f; + } SetVerticalMarqueeFade(clipRectMin, clipRectMax, Scale(24), Lerp(Scale(24), 0.0f, scrollOffset / scrollMax));