diff --git a/Adventures in Lestoria/ScrollableWindowComponent.h b/Adventures in Lestoria/ScrollableWindowComponent.h index 97433909..1c74a0aa 100644 --- a/Adventures in Lestoria/ScrollableWindowComponent.h +++ b/Adventures in Lestoria/ScrollableWindowComponent.h @@ -196,8 +196,11 @@ protected: SetScrollAmount({GetScrollAmount().x,(-newScrollbarTop+1)/scrollBarScale}); }; + bool mouseOverScrollbar=geom2d::overlaps(geom2d::rect(windowAbsPos+vf2d{rect.size.x-12,scrollBarTop+12},{12,scrollBarHeight}),game->GetMousePos()); + if(mouseOverScrollbar||scrollBarSelected)scrollBarHoverTime=std::min(scrollBarHoverTime+game->GetElapsedTime(),"ThemeGlobal.HighlightTime"_F); + else scrollBarHoverTime=std::max(scrollBarHoverTime-game->GetElapsedTime(),0.f); + if(scrollBarSelected){ - scrollBarHoverTime=std::min(scrollBarHoverTime+game->GetElapsedTime(),"ThemeGlobal.HighlightTime"_F); if(game->GetMouse(0).bPressed&&!geom2d::contains(rect,bounds)){ scrollBarSelected=true; Menu::menus[parentMenu]->alreadyClicked=true; @@ -211,7 +214,6 @@ protected: ScrollToClickedPosition(); } }else{ - scrollBarHoverTime=std::max(scrollBarHoverTime-game->GetElapsedTime(),0.f); //It's possible to still scroll by clicking outside the scrollbar but in the scroll region. if(game->GetMouse(0).bHeld&&!geom2d::contains(rect,bounds)&& geom2d::overlaps(geom2d::rect(windowAbsPos+vf2d{rect.size.x-12.f,12.f},{12.f,rect.size.y-24.f}),game->GetMousePos())){ diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 20f1195a..b3b46deb 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 10477 +#define VERSION_BUILD 10482 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 07387423..93a46bc0 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ