summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorVincent Robinson <robinsonvincent89@gmail.com>2021-01-23 12:46:19 -0800
committerGitHub <noreply@github.com>2021-01-23 12:46:19 -0800
commit009e39e73b9aa003c369fe6bc88f366fdc91610e (patch)
treeb8e1fca357e8bf7dc6033170c4a929b0d6a2e643 /games
parent4c76239818f5159314f30883f98b977d30aaa26c (diff)
downloadminetest-009e39e73b9aa003c369fe6bc88f366fdc91610e.tar.gz
minetest-009e39e73b9aa003c369fe6bc88f366fdc91610e.tar.bz2
minetest-009e39e73b9aa003c369fe6bc88f366fdc91610e.zip
FormSpec: Add list spacing, slot size, and noclip (#10083)
* Add list spacing, slot size, and noclip * Simplify StyleSpec * Add test cases Co-authored-by: rubenwardy <rw@rubenwardy.com>
Diffstat (limited to 'games')
-rw-r--r--games/devtest/mods/testformspec/formspec.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/games/devtest/mods/testformspec/formspec.lua b/games/devtest/mods/testformspec/formspec.lua
index 5495896ce..0eef859a9 100644
--- a/games/devtest/mods/testformspec/formspec.lua
+++ b/games/devtest/mods/testformspec/formspec.lua
@@ -33,6 +33,15 @@ local tabheaders_fs = [[
tabheader[8,6;10,1.5;tabs_size2;Height=1.5;1;false;false]
]]
+local inv_style_fs = [[
+ style_type[list;noclip=true]
+ list[current_player;main;-1.125,-1.125;2,2]
+ style_type[list;spacing=.25,.125;size=.75,.875]
+ list[current_player;main;3,.5;3,3]
+ style_type[list;spacing=0;size=1]
+ list[current_player;main;.5,4;8,4]
+]]
+
local hypertext_basic = [[
<bigger>Normal test</bigger>
This is a normal text.
@@ -310,6 +319,10 @@ local pages = {
"size[12,13]real_coordinates[true]" ..
"container[0.5,1.5]" .. tabheaders_fs .. "container_end[]",
+ -- Inv
+ "size[12,13]real_coordinates[true]" ..
+ "container[0.5,1.5]" .. inv_style_fs .. "container_end[]",
+
-- Animation
[[
formspec_version[3]
@@ -341,7 +354,7 @@ Number]
local function show_test_formspec(pname, page_id)
page_id = page_id or 2
- local fs = pages[page_id] .. "tabheader[0,0;8,0.65;maintabs;Real Coord,Styles,Noclip,Hypertext,Tabs,Anim,ScrollC;" .. page_id .. ";false;false]"
+ local fs = pages[page_id] .. "tabheader[0,0;8,0.65;maintabs;Real Coord,Styles,Noclip,Hypertext,Tabs,Invs,Anim,ScrollC;" .. page_id .. ";false;false]"
minetest.show_formspec(pname, "testformspec:formspec", fs)
end