mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
parent
d176dabeb4
commit
1469424075
1 changed files with 2 additions and 2 deletions
|
@ -1120,8 +1120,8 @@ s32 intlGUIEditBox::getCursorPos(s32 x, s32 y)
|
||||||
|
|
||||||
if (x < CurrentTextRect.UpperLeftCorner.X)
|
if (x < CurrentTextRect.UpperLeftCorner.X)
|
||||||
x = CurrentTextRect.UpperLeftCorner.X;
|
x = CurrentTextRect.UpperLeftCorner.X;
|
||||||
else if (x > CurrentTextRect.LowerRightCorner.X)
|
else if (x > CurrentTextRect.LowerRightCorner.X + 1)
|
||||||
x = CurrentTextRect.LowerRightCorner.X;
|
x = CurrentTextRect.LowerRightCorner.X + 1;
|
||||||
|
|
||||||
s32 idx = font->getCharacterFromPos(Text.c_str(), x - CurrentTextRect.UpperLeftCorner.X);
|
s32 idx = font->getCharacterFromPos(Text.c_str(), x - CurrentTextRect.UpperLeftCorner.X);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue