diff options
author | Wuzzy <almikes@aol.com> | 2015-03-11 17:26:19 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2015-03-11 17:26:19 +0100 |
commit | ccb771db0c018099b8f1691eb99ec326513e8d2a (patch) | |
tree | 08a82746a5aebc07a28ebd4b50e005ffcffd291b /init.lua | |
parent | f753fbdf71f2c667d20b5f37b5f76967a352942b (diff) |
Implement buttons in main tab
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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) |