mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix textbox horizontal scroll & fix console log width
This commit is contained in:
parent
85600eafea
commit
13fde2116d
2 changed files with 3 additions and 3 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)+2;
|
||||
int realoffset = font->calcWidth(input, lcaret)-int(textOffset) - padding.x;
|
||||
if (realoffset-width > 0) {
|
||||
setTextOffset(textOffset + realoffset-width);
|
||||
} else if (realoffset < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue