mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
Merge branch 'main' into update-items
This commit is contained in:
commit
c1e9976d95
9 changed files with 175 additions and 75 deletions
|
|
@ -826,7 +826,7 @@ void TextBox::setCaret(size_t position) {
|
|||
scrolled(-glm::ceil(offset/static_cast<double>(scrollStep)+0.5f));
|
||||
}
|
||||
uint lcaret = caret - label->getTextLineOffset(line);
|
||||
int realoffset = font->calcWidth(input, lcaret)-int(textOffset) - padding.x;
|
||||
int realoffset = font->calcWidth(input, lcaret)-int(textOffset) + 2;
|
||||
if (realoffset-width > 0) {
|
||||
setTextOffset(textOffset + realoffset-width);
|
||||
} else if (realoffset < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue