diff options
author | Wuzzy <almikes@aol.com> | 2016-07-24 11:29:57 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-07-24 11:29:57 +0200 |
commit | 6f2518a5e35cd8e8bdc501275a316cf5f9265d56 (patch) | |
tree | 649ed2130c2433e1dfa75cc1f62e5e5c60e5343e /init.lua | |
parent | 67dc69cba4e3b4779bf821e1e389bcc1bb0fd483 (diff) |
Make help entry appear on double click
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -187,6 +187,15 @@ function doc.process_form(player,formname,fields) if event.type == "CHG" then doc.data.players[playername].catsel = event.index doc.data.players[playername].entry = doc.data.players[playername].entry_ids[event.index] + elseif event.type == "DCL" then + local cid = doc.data.players[playername].category + local eid = nil + local eids, catsel = doc.data.players[playername].entry_ids, event.index + if eids ~= nil and catsel ~= nil then + eid = eids[catsel] + end + local formspec = doc.formspec_core(3)..doc.formspec_entry(cid, eid) + minetest.show_formspec(playername, "doc:entry", formspec) end end elseif(formname == "doc:entry") then |