summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2016-10-03 00:30:33 +0100
committerNer'zhul <nerzhul@users.noreply.github.com>2016-10-08 18:58:28 +0200
commit067766eec213918b6cb5b2533d0c78eceb3949ec (patch)
tree3db9f36c4e6b2fa37624507e89141f361ee7a78f /doc
parent0baea8c25cb04bcbeca5ae532a00d877628f6b06 (diff)
downloadminetest-067766eec213918b6cb5b2533d0c78eceb3949ec.tar.gz
minetest-067766eec213918b6cb5b2533d0c78eceb3949ec.tar.bz2
minetest-067766eec213918b6cb5b2533d0c78eceb3949ec.zip
Fix backwards compatibility issue introduced by close_on_enter
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt20
1 files changed, 11 insertions, 9 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 74469e535..6bdcd4fe4 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1542,7 +1542,7 @@ examples.
* If `true` the background is clipped to formspec size
(`x` and `y` are used as offset values, `w` and `h` are ignored)
-#### `pwdfield[<X>,<Y>;<W>,<H>;<name>;<label>;<close_on_enter>]`
+#### `pwdfield[<X>,<Y>;<W>,<H>;<name>;<label>]`
* Textual password style field; will be sent to server when a button is clicked
* When enter is pressed in field, fields.key_enter_field will be sent with the name
of this field.
@@ -1552,10 +1552,9 @@ examples.
* Position and size units are inventory slots
* `name` is the name of the field as returned in fields to `on_receive_fields`
* `label`, if not blank, will be text printed on the top left above the field
-* `close_on_enter` (optional) is whether the form should accept and close when enter is
- pressed in this field. Defaults to true.
+* See field_close_on_enter to stop enter closing the formspec
-#### `field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>;<close_on_enter>]`
+#### `field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]`
* Textual field; will be sent to server when a button is clicked
* When enter is pressed in field, fields.key_enter_field will be sent with the name
of this field.
@@ -1569,18 +1568,21 @@ examples.
* `default` may contain variable references such as `${text}'` which
will fill the value from the metadata value `text`
* **Note**: no extra text or more than a single variable is supported ATM.
-* `close_on_enter` (optional) is whether the form should accept and close when enter is
- pressed in this field. Defaults to true.
+* See field_close_on_enter to stop enter closing the formspec
-#### `field[<name>;<label>;<default>;<close_on_enter>]`
+#### `field[<name>;<label>;<default>]`
* As above, but without position/size units
* When enter is pressed in field, fields.key_enter_field will be sent with the name
of this field.
* Special field for creating simple forms, such as sign text input
* Must be used without a `size[]` element
* A "Proceed" button will be added automatically
-* `close_on_enter` (optional) is whether the form should accept and close when enter is
- pressed in this field. Defaults to true.
+* See field_close_on_enter to stop enter closing the formspec
+
+#### `field_close_on_enter[<name>;<close_on_enter>]`
+* <name> is the name of the field
+* 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>]`
* Same as fields above, but with multi-line input