mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-04-21 23:21:52 +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:
parent
57593fb212
commit
653d43699e
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user