diff options
author | Wuzzy <almikes@aol.com> | 2016-12-15 12:24:40 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-12-15 12:24:40 +0100 |
commit | d2ac96253d40b55c8d4f3a498acff6da94f263d0 (patch) | |
tree | 3a360690ca51056673f77889b06d05b0d5979d4e /init.lua | |
parent | ed270627424fc6b9c7a9b5f9b961b9a4f43c7a9b (diff) |
Make category buttons wider
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -701,10 +701,11 @@ function doc.formspec_main(playername) for c=1,#doc.data.category_order do local id = doc.data.category_order[c] local data = doc.data.categories[id] + local bw = doc.FORMSPEC.WIDTH / math.floor(((doc.data.category_count-1) / CATEGORYFIELDSIZE.HEIGHT)+1) -- Skip categories which do not exist if data ~= nil then -- Category buton - local button = "button["..((x-1)*3)..","..y..";3,1;doc_button_category_"..id..";"..minetest.formspec_escape(data.def.name).."]" + local button = "button["..((x-1)*bw)..","..y..";"..bw..",1;doc_button_category_"..id..";"..minetest.formspec_escape(data.def.name).."]" local tooltip = "" -- Optional description if data.def.description ~= nil then |