|
1 | 1 | --[[============================================================ |
2 | 2 | --= |
3 | | ---= InputField v3.2-dev - text input handling library for LÖVE (0.10.2+) |
| 3 | +--= InputField v3.3 - text input handling library for LÖVE (0.10.2+) |
4 | 4 | --= - Written by Marcus 'ReFreezed' Thunström |
5 | 5 | --= - MIT License (See the bottom of this file) |
6 | 6 | --= - https://github.com/ReFreezed/InputField |
|
52 | 52 | getTextDimensions, getTextWidth, getTextHeight |
53 | 53 | getTextLength |
54 | 54 | getTextOffset |
| 55 | + getVisibleLine, getVisibleLineCount |
55 | 56 | isBusy |
56 | 57 | releaseMouse |
57 | 58 | reset |
|
133 | 134 | --============================================================]] |
134 | 135 |
|
135 | 136 | local InputField = { |
136 | | - _VERSION = "InputField 3.2.0-dev", |
| 137 | + _VERSION = "InputField 3.3.0", |
137 | 138 | } |
138 | 139 |
|
139 | 140 |
|
@@ -974,9 +975,13 @@ function InputField.getMouseScrollSpeedY(field) |
974 | 975 | return field.mouseScrollSpeedY |
975 | 976 | end |
976 | 977 |
|
| 978 | +-- |
977 | 979 | -- field:setMouseScrollSpeed( speedX [, speedY=speedX ] ) |
978 | 980 | -- field:setMouseScrollSpeedX( speedX ) |
979 | 981 | -- field:setMouseScrollSpeedY( speedY ) |
| 982 | +-- |
| 983 | +-- Also see setWheelScrollSpeed(). |
| 984 | +-- |
980 | 985 | function InputField.setMouseScrollSpeed(field, speedX, speedY) |
981 | 986 | speedY = speedY or speedX |
982 | 987 | field.mouseScrollSpeedX = math.max(speedX, 0) |
@@ -1413,14 +1418,14 @@ function InputField.getScrollHandles(field) |
1413 | 1418 | end |
1414 | 1419 |
|
1415 | 1420 | -- offset, coverage = field:getScrollHandleHorizontal( ) |
1416 | | --- Values are between 0 and 1. |
| 1421 | +-- The values (and their sum) are between 0 and 1. |
1417 | 1422 | function InputField.getScrollHandleHorizontal(field) |
1418 | 1423 | local hOffset, hCoverage, vOffset, vCoverage = field:getScrollHandles() |
1419 | 1424 | return hOffset, hCoverage |
1420 | 1425 | end |
1421 | 1426 |
|
1422 | 1427 | -- offset, coverage = field:getScrollHandleVertical( ) |
1423 | | --- Values are between 0 and 1. |
| 1428 | +-- The values (and their sum) are between 0 and 1. |
1424 | 1429 | function InputField.getScrollHandleVertical(field) |
1425 | 1430 | local hOffset, hCoverage, vOffset, vCoverage = field:getScrollHandles() |
1426 | 1431 | return vOffset, vCoverage |
@@ -1520,6 +1525,8 @@ end |
1520 | 1525 | -- lineIndex -- integer Visible line index. |
1521 | 1526 | -- linePosition -- integer Visible line start position. |
1522 | 1527 | -- |
| 1528 | +-- Note: The coordinates are relative to the field's position. |
| 1529 | +-- |
1523 | 1530 | function InputField.getInfoAtCursor(field, pos, info) |
1524 | 1531 | updateWrap(field) |
1525 | 1532 |
|
@@ -1565,6 +1572,7 @@ end |
1565 | 1572 | -- linePosition -- integer Visible line start position. |
1566 | 1573 | -- |
1567 | 1574 | -- Returns nil if characterPosition is invalid or points at a newline. |
| 1575 | +-- Note: The coordinates are relative to the field's position. |
1568 | 1576 | -- |
1569 | 1577 | function InputField.getInfoAtCharacter(field, pos, info) |
1570 | 1578 | updateWrap(field) |
|
0 commit comments