Add more API funcs

This commit is contained in:
Jean-Patrick Guerrero
2021-01-28 21:00:08 +01:00
parent 7c9785d448
commit eecb3439ab
3 changed files with 77 additions and 16 deletions

10
API.md
View File

@ -41,10 +41,18 @@ i3.new_tab {
- `fs` is the formspec table which is callable with a metamethod. Each call adds a new entry.
- `i3.set_fs(player)` must be called to update the formspec.
##### `i3.delete_tab(name)`
##### `i3.delete_tab(tabname)`
Deletes a tab by name.
##### `i3.set_tab(player, tabname)`
Sets the current tab by name. `player` is an `ObjectRef` to the user.
##### `i3.override_tab(tabname, def)`
Overrides a tab by name. `def` is the tab definition like seen in `i3.set_tab`.
##### `i3.get_tabs()`
Returns the list of registered tabs.