From ed270627424fc6b9c7a9b5f9b961b9a4f43c7a9b Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 15 Dec 2016 12:05:26 +0100 Subject: Increase formspec size --- API.md | 2 +- init.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/API.md b/API.md index cbb1230..ea0ef71 100644 --- a/API.md +++ b/API.md @@ -167,7 +167,7 @@ following predefined convenience functions: ##### Formspec restrictions When building your formspec, you have to respect the size limitations. -The help form uses a size of 12×9 and you must make sure +The help form uses a size of 15×10.5 and you must make sure all entry widgets are inside a boundary box. The remaining space is reserved for widgets of the help form and should not be used to avoid overlapping. diff --git a/init.lua b/init.lua index c2650d2..72a1ed5 100644 --- a/init.lua +++ b/init.lua @@ -22,8 +22,8 @@ doc.VERSION.STRING = doc.VERSION.MAJOR.."."..doc.VERSION.MINOR.."."..doc.VERSION -- Formspec information doc.FORMSPEC = {} -- Width of formspec -doc.FORMSPEC.WIDTH = 12 -doc.FORMSPEC.HEIGHT = 9 +doc.FORMSPEC.WIDTH = 15 +doc.FORMSPEC.HEIGHT = 10.5 --[[ Recommended bounding box coordinates for widgets to be placed in entry pages. Make sure all entry widgets are completely inside these coordinates to avoid overlapping. ]] @@ -683,7 +683,7 @@ end) function doc.formspec_core(tab) if tab == nil then tab = 1 else tab = tostring(tab) end - return "size["..doc.FORMSPEC.WIDTH..","..doc.FORMSPEC.HEIGHT.."]tabheader[0,0;doc_header;".. + return "size["..doc.FORMSPEC.WIDTH..","..doc.FORMSPEC.HEIGHT.."]bgcolor[#000000CC;true]tabheader[0,0;doc_header;".. minetest.formspec_escape(S("Category list")) .. "," .. minetest.formspec_escape(S("Entry list")) .. "," .. minetest.formspec_escape(S("Entry")) .. ";" -- cgit v1.2.3