1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Formspec: textarea with scrollbar improvements

Increase scrollrate depending on fontsize

Scroll on mousewheel

Allow scrolling and marking text on non writable textareas

Update lua api about readonly mode

Show scrollbar if text overflows
This commit is contained in:
adrido 2017-10-09 06:57:18 +02:00 committed by Loic Blot
parent 9b8fa99fe3
commit e6e5fa3bf8
No known key found for this signature in database
GPG key ID: EFAA458E8C153987
5 changed files with 46 additions and 30 deletions

View file

@ -1918,9 +1918,10 @@ examples.
* if <close_on_enter> is false, pressing enter in the field will submit the form but not close it
* defaults to true when not specified (ie: no tag for a field)
#### `textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>;<scrollbar>]`
#### `textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]`
* Same as fields above, but with multi-line input
* if <scrollbar> is true an auto vertical scrollbar is added
* if the text overflows a vertical scrollbar is added
* if the name is empty the textarea is readonly. The label is not displayed then
#### `label[<X>,<Y>;<label>]`
* `x` and `y` work as per field