鏡像自
https://github.com/luanti-org/luanti.git
已同步 2025-12-23 23:15:30 +01:00
Fix wrong scrolling (#6809)
此提交包含在:
@@ -1419,13 +1419,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
|
||||
}
|
||||
|
||||
新增問題並參考
封鎖使用者