diff options
| author | Wuzzy <almikes@aol.com> | 2015-03-11 19:12:14 +0100 | 
|---|---|---|
| committer | Wuzzy <almikes@aol.com> | 2015-03-11 19:12:14 +0100 | 
| commit | 4b052c050fe935e9a024f8228f76e9e879eb9e05 (patch) | |
| tree | 10742783a426c60fcb969df2f6e6f56536d7f35c | |
| parent | 786d7a7d5d406e0e206062ac168308ec595844de (diff) | |
Implement the “return” buttons
| -rw-r--r-- | init.lua | 12 | 
1 files changed, 11 insertions, 1 deletions
| @@ -155,6 +155,10 @@ function doc.process_form(player,formname,fields)  				minetest.show_formspec(playername, "doc:entry", formspec)  			end  		end +		if fields["doc_button_goto_main"] then +			local formspec = doc.formspec_core(1)..doc.formspec_main() +			minetest.show_formspec(playername, "doc:main", formspec) +		end  		if fields["doc_catlist"] then  			local event = minetest.explode_textlist_event(fields["doc_catlist"])  			if event.type == "CHG" then @@ -163,7 +167,13 @@ function doc.process_form(player,formname,fields)  			end  		end  	elseif(formname == "doc:entry") then - +		if fields["doc_button_goto_main"] then +			local formspec = doc.formspec_core(1)..doc.formspec_main() +			minetest.show_formspec(playername, "doc:main", formspec) +		elseif fields["doc_button_goto_category"] then +			local formspec = doc.formspec_core(2)..doc.formspec_category(doc.data.players[playername].category, playername) +			minetest.show_formspec(playername, "doc:category", formspec) +		end  	end  end | 
