mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
small fixes
This commit is contained in:
parent
d3c9911640
commit
535c7d8326
4 changed files with 5 additions and 5 deletions
|
|
@ -369,7 +369,7 @@ void TextBox::click(GUI*, int x, int y) {
|
|||
}
|
||||
|
||||
void TextBox::mouseMove(GUI*, int x, int y) {
|
||||
ssize_t index = calcIndexAt(x, y);
|
||||
ptrdiff_t index = calcIndexAt(x, y);
|
||||
setCaret(index);
|
||||
extendSelection(index);
|
||||
resetMaxLocalCaret();
|
||||
|
|
@ -656,7 +656,7 @@ void TextBox::setCaret(size_t position) {
|
|||
}
|
||||
}
|
||||
|
||||
void TextBox::setCaret(ssize_t position) {
|
||||
void TextBox::setCaret(ptrdiff_t position) {
|
||||
if (position < 0) {
|
||||
setCaret(static_cast<size_t>(input.length() + position + 1));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue