File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1431,13 +1431,10 @@ void intlGUIEditBox::calculateScrollPos()
1431
1431
}
1432
1432
1433
1433
// vertical scroll position
1434
- if (FrameRect.LowerRightCorner .Y < CurrentTextRect.LowerRightCorner .Y + VScrollPos)
1435
- VScrollPos = CurrentTextRect.LowerRightCorner .Y - FrameRect.LowerRightCorner .Y + VScrollPos;
1436
-
1437
- else if (FrameRect.UpperLeftCorner .Y > CurrentTextRect.UpperLeftCorner .Y + VScrollPos)
1438
- VScrollPos = CurrentTextRect.UpperLeftCorner .Y - FrameRect.UpperLeftCorner .Y + VScrollPos;
1439
- else
1440
- VScrollPos = 0 ;
1434
+ if (FrameRect.LowerRightCorner .Y < CurrentTextRect.LowerRightCorner .Y )
1435
+ VScrollPos += CurrentTextRect.LowerRightCorner .Y - FrameRect.LowerRightCorner .Y ; // scrolling downwards
1436
+ else if (FrameRect.UpperLeftCorner .Y > CurrentTextRect.UpperLeftCorner .Y )
1437
+ VScrollPos += CurrentTextRect.UpperLeftCorner .Y - FrameRect.UpperLeftCorner .Y ; // scrolling upwards
1441
1438
1442
1439
// todo: adjust scrollbar
1443
1440
if (m_vscrollbar)
You can’t perform that action at this time.
0 commit comments