mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-14 04:13:59 +02:00
Fixes to scrollbar mouse tracking
Click inside the scroll panel area would sometimes scroll even if you weren't clicking the scrollbar
This commit is contained in:
@@ -156,14 +156,13 @@ void ScrollPanel::XOnMouseMoved(int x, int y)
|
||||
}
|
||||
}
|
||||
|
||||
if (x > (Size.X-scrollBarWidth) && x < (Size.X-scrollBarWidth)+scrollBarWidth)
|
||||
if (x > (Size.X-scrollBarWidth) && x < Size.X)
|
||||
{
|
||||
if (y > scrollPos && y < scrollPos+scrollHeight)
|
||||
isMouseInsideScrollbar = true;
|
||||
isMouseInsideScrollbar = y > scrollPos && y < scrollPos+scrollHeight;
|
||||
isMouseInsideScrollbarArea = true;
|
||||
}
|
||||
else
|
||||
isMouseInsideScrollbar = false;
|
||||
isMouseInsideScrollbar = isMouseInsideScrollbarArea = false;
|
||||
|
||||
if (oldViewportPositionY != ViewportPosition.Y)
|
||||
{
|
||||
|
Reference in New Issue
Block a user