Implement buttons in main tab
This commit is contained in:
parent
f753fbdf71
commit
ccb771db0c
12
init.lua
12
init.lua
@ -131,6 +131,18 @@ function doc.process_form(player,formname,fields)
|
||||
return
|
||||
end
|
||||
end
|
||||
if(formname == "doc:main") then
|
||||
for id,category in pairs(doc.data.categories) do
|
||||
if fields["doc_button_category_"..id] then
|
||||
local formspec = doc.formspec_core(2)..doc.formspec_category(id)
|
||||
minetest.show_formspec(playername, "doc:category", formspec)
|
||||
break
|
||||
end
|
||||
end
|
||||
elseif(formname == "doc:category") then
|
||||
elseif(formname == "doc:entry") then
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(doc.process_form)
|
||||
|
Loading…
x
Reference in New Issue
Block a user