mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #1591 from Azaezel/alpha41/thumbsSideways
scroll thumb safety
This commit is contained in:
commit
91e354fe99
1 changed files with 2 additions and 2 deletions
|
|
@ -800,7 +800,7 @@ void GuiScrollCtrl::onMouseDragged(const GuiEvent &event)
|
||||||
{
|
{
|
||||||
S32 newVPos = (newVThumbPos - mVTrackRect.point.y) *
|
S32 newVPos = (newVThumbPos - mVTrackRect.point.y) *
|
||||||
(mChildExt.y - mContentExt.y) /
|
(mChildExt.y - mContentExt.y) /
|
||||||
(mVTrackRect.extent.y - mVThumbSize);
|
getMax(mVTrackRect.extent.y - mVThumbSize,1);
|
||||||
|
|
||||||
scrollTo(mChildRelPosAnchor.x, newVPos);
|
scrollTo(mChildRelPosAnchor.x, newVPos);
|
||||||
}
|
}
|
||||||
|
|
@ -820,7 +820,7 @@ void GuiScrollCtrl::onMouseDragged(const GuiEvent &event)
|
||||||
{
|
{
|
||||||
S32 newHPos = (newHThumbPos - mHTrackRect.point.x) *
|
S32 newHPos = (newHThumbPos - mHTrackRect.point.x) *
|
||||||
(mChildExt.x - mContentExt.x) /
|
(mChildExt.x - mContentExt.x) /
|
||||||
(mHTrackRect.extent.x - mHThumbSize);
|
getMax(mHTrackRect.extent.x - mHThumbSize,1);
|
||||||
|
|
||||||
scrollTo(newHPos, mChildRelPosAnchor.y);
|
scrollTo(newHPos, mChildRelPosAnchor.y);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue