summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-08-12 17:14:26 +0200
committerWuzzy <almikes@aol.com>2016-08-12 17:14:26 +0200
commit1ba124a64505823ff466db4d0ec5b5ac3077a87d (patch)
treedbf003687bca55a64575f1c76973674c660a885a /init.lua
parenta41ba8f45c5958c048074e48271499cc158bd068 (diff)
Add dummy next/previous entry buttons
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 4ee186c..00b4e4d 100644
--- a/init.lua
+++ b/init.lua
@@ -295,6 +295,15 @@ function doc.formspec_category(id, playername)
return formstring
end
+function doc.formspec_entry_navigation(category_id, entry_id)
+ local formstring = ""
+ formstring = formstring .. "button[10,8.5;1,1;doc_button_goto_prev;<]"
+ formstring = formstring .. "button[11,8.5;1,1;doc_button_goto_next;>]"
+ formstring = formstring .. "tooltip[doc_button_goto_prev;Show previous entry]"
+ formstring = formstring .. "tooltip[doc_button_goto_next;Show next entry]"
+ return formstring
+end
+
function doc.formspec_entry(category_id, entry_id)
local formstring
if category_id == nil then
@@ -323,6 +332,7 @@ function doc.formspec_entry(category_id, entry_id)
formstring = "label[0,0;Help > "..category.def.name.." > "..entry.name.."]"
formstring = formstring .. category.def.build_formspec(entry.data)
+ formstring = formstring .. doc.formspec_entry_navigation(category_id, entry_id)
end
return formstring
end