mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add allow_close[]
element to formspecs (#15971)
This commit is contained in:
parent
04e82749db
commit
fd85737460
9 changed files with 71 additions and 44 deletions
|
@ -2903,6 +2903,13 @@ Elements
|
|||
* For information on converting forms to the new coordinate system, see `Migrating
|
||||
to Real Coordinates`.
|
||||
|
||||
### `allow_close[<bool>]`
|
||||
|
||||
* When set to false, the formspec will not close when the user tries to close
|
||||
it with the Escape key or similar. Default true.
|
||||
* The formspec can still be closed with `*_exit[]` elements and
|
||||
`core.close_formspec()`, regardless of this setting.
|
||||
|
||||
### `container[<X>,<Y>]`
|
||||
|
||||
* Start of a container block, moves all physical elements in the container by
|
||||
|
@ -6206,8 +6213,10 @@ Call these functions only at load time!
|
|||
* `table`: See `core.explode_table_event`
|
||||
* `scrollbar`: See `core.explode_scrollbar_event`
|
||||
* Special case: `["quit"]="true"` is sent when the user actively
|
||||
closed the form by mouse click, keypress or through a button_exit[]
|
||||
closed the form by mouse click, keypress or through a `button_exit[]`
|
||||
element.
|
||||
* Special case: `["try_quit"]="true"` is sent when the user tries to
|
||||
close the formspec, but the formspec used `allow_close[false]`.
|
||||
* Special case: `["key_enter"]="true"` is sent when the user pressed
|
||||
the Enter key and the focus was either nowhere (causing the formspec
|
||||
to be closed) or on a button. If the focus was on a text field,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue