Split more stuff into different file

This commit is contained in:
Jean-Patrick Guerrero
2022-01-08 17:05:29 +01:00
parent eedc77086f
commit 6b8e64b532
6 changed files with 475 additions and 469 deletions

View File

@ -1,5 +1,5 @@
local http = ...
local make_fs = i3.files.gui()
local make_fs, get_inventory_fs = i3.files.gui()
IMPORT("gmatch", "split")
IMPORT("S", "err", "fmt", "reg_items")
@ -186,6 +186,12 @@ function i3.new_tab(name, def)
insert(i3.tabs, def)
end
i3.new_tab("inventory", {
description = S"Inventory",
formspec = get_inventory_fs,
fields = i3.files.fields(),
})
function i3.remove_tab(name)
if not true_str(name) then
return err "i3.remove_tab: tab name missing"