mirror of
https://github.com/minetest/minetest.git
synced 2024-08-19 04:54:18 +02:00
Fix input regression introduced by a4a377ecad6f1732cc54e7ac329fdef9949f9bf7
Fix #5776
This commit is contained in:
parent
d176dabeb4
commit
1469424075
@ -1120,8 +1120,8 @@ s32 intlGUIEditBox::getCursorPos(s32 x, s32 y)
|
||||
|
||||
if (x < CurrentTextRect.UpperLeftCorner.X)
|
||||
x = CurrentTextRect.UpperLeftCorner.X;
|
||||
else if (x > CurrentTextRect.LowerRightCorner.X)
|
||||
x = CurrentTextRect.LowerRightCorner.X;
|
||||
else if (x > CurrentTextRect.LowerRightCorner.X + 1)
|
||||
x = CurrentTextRect.LowerRightCorner.X + 1;
|
||||
|
||||
s32 idx = font->getCharacterFromPos(Text.c_str(), x - CurrentTextRect.UpperLeftCorner.X);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user