From ccb771db0c018099b8f1691eb99ec326513e8d2a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 11 Mar 2015 17:26:19 +0100 Subject: Implement buttons in main tab --- init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/init.lua b/init.lua index 695c700..9ae9f8a 100644 --- a/init.lua +++ b/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) -- cgit v1.2.3