Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
4 additions
and
7 deletions.
-
+4
−7
src/gui/intlGUIEditBox.cpp
|
@@ -1431,13 +1431,10 @@ void intlGUIEditBox::calculateScrollPos() |
|
|
} |
|
|
|
|
|
// vertical scroll position |
|
|
if (FrameRect.LowerRightCorner.Y < CurrentTextRect.LowerRightCorner.Y + VScrollPos) |
|
|
VScrollPos = CurrentTextRect.LowerRightCorner.Y - FrameRect.LowerRightCorner.Y + VScrollPos; |
|
|
|
|
|
else if (FrameRect.UpperLeftCorner.Y > CurrentTextRect.UpperLeftCorner.Y + VScrollPos) |
|
|
VScrollPos = CurrentTextRect.UpperLeftCorner.Y - FrameRect.UpperLeftCorner.Y + VScrollPos; |
|
|
else |
|
|
VScrollPos = 0; |
|
|
if (FrameRect.LowerRightCorner.Y < CurrentTextRect.LowerRightCorner.Y) |
|
|
VScrollPos += CurrentTextRect.LowerRightCorner.Y - FrameRect.LowerRightCorner.Y; // scrolling downwards |
|
|
else if (FrameRect.UpperLeftCorner.Y > CurrentTextRect.UpperLeftCorner.Y) |
|
|
VScrollPos += CurrentTextRect.UpperLeftCorner.Y - FrameRect.UpperLeftCorner.Y; // scrolling upwards |
|
|
|
|
|
// todo: adjust scrollbar |
|
|
if (m_vscrollbar) |
|
|