mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
small update
This commit is contained in:
parent
ab4a6a50aa
commit
e4fe4a6f12
1 changed files with 2 additions and 1 deletions
|
|
@ -576,7 +576,8 @@ void TextBox::setCaret(uint position) {
|
|||
if (offset < 0) {
|
||||
scrolled(1);
|
||||
} else if (offset >= getSize().y) {
|
||||
scrolled(-1);
|
||||
offset -= getSize().y;
|
||||
scrolled(-glm::ceil(offset/static_cast<double>(scrollStep)+0.5f));
|
||||
}
|
||||
uint lcaret = caret - label->getTextLineOffset(line);
|
||||
int realoffset = font->calcWidth(input, lcaret)-int(textOffset)+2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue