mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
scroll thumb safety
avoid divnull
This commit is contained in:
parent
9ec752b646
commit
75883f74cf
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) *
|
||||
(mChildExt.y - mContentExt.y) /
|
||||
(mVTrackRect.extent.y - mVThumbSize);
|
||||
getMax(mVTrackRect.extent.y - mVThumbSize,1);
|
||||
|
||||
scrollTo(mChildRelPosAnchor.x, newVPos);
|
||||
}
|
||||
|
|
@ -820,7 +820,7 @@ void GuiScrollCtrl::onMouseDragged(const GuiEvent &event)
|
|||
{
|
||||
S32 newHPos = (newHThumbPos - mHTrackRect.point.x) *
|
||||
(mChildExt.x - mContentExt.x) /
|
||||
(mHTrackRect.extent.x - mHThumbSize);
|
||||
getMax(mHTrackRect.extent.x - mHThumbSize,1);
|
||||
|
||||
scrollTo(newHPos, mChildRelPosAnchor.y);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue