mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add read-only UI contentOffset property
This commit is contained in:
parent
fbca439b2d
commit
08ebfa15db
7 changed files with 86 additions and 79 deletions
|
|
@ -646,7 +646,7 @@ void TextBox::setCaret(size_t position) {
|
|||
caretLastMove = Window::time();
|
||||
int width = label->getSize().x;
|
||||
uint line = label->getLineByTextIndex(caret);
|
||||
int offset = label->getLineYOffset(line) + contentOffset().y;
|
||||
int offset = label->getLineYOffset(line) + getContentOffset().y;
|
||||
uint lineHeight = font->getLineHeight()*label->getLineInterval();
|
||||
scrollStep = lineHeight;
|
||||
if (offset < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue