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
|
|
@ -12,7 +12,7 @@
|
|||
</container>
|
||||
|
||||
<container id="logContainer" pos="0,60"
|
||||
size-func="unpack(vec2.add(gui.get_viewport(), {0,-100}))">
|
||||
size-func="unpack(vec2.add(gui.get_viewport(), {-350,-100}))">
|
||||
<textbox
|
||||
id='log'
|
||||
color='0'
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
margin='0'
|
||||
editable='false'
|
||||
multiline='true'
|
||||
size-func="gui.get_viewport()[1],40"
|
||||
size-func="gui.get_viewport()[1]-350,40"
|
||||
gravity="bottom-left"
|
||||
markup="md"
|
||||
></textbox>
|
||||
|
|
|
|||
|
|
@ -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