mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix mouse click textbox caret set
This commit is contained in:
parent
026ae756cf
commit
a1f0c2c252
1 changed files with 1 additions and 1 deletions
|
|
@ -661,7 +661,7 @@ int TextBox::calcIndexAt(int x, int y) const {
|
|||
line = std::min(line, label->getLinesNumber() - 1);
|
||||
size_t lineLength = getLineLength(line);
|
||||
uint offset = 0;
|
||||
while (lcoord.x + rawTextCache.metrics.calcWidth(labelText, offset) < x &&
|
||||
while (lcoord.x + rawTextCache.metrics.calcWidth(labelText, 0, offset) < x &&
|
||||
offset < lineLength - 1) {
|
||||
offset++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue