aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/testformspec
diff options
context:
space:
mode:
Diffstat (limited to 'games/devtest/mods/testformspec')
-rw-r--r--games/devtest/mods/testformspec/LICENSE.txt14
-rw-r--r--games/devtest/mods/testformspec/formspec.lua42
-rw-r--r--games/devtest/mods/testformspec/models/testformspec_character.b3dbin0 -> 73433 bytes
-rw-r--r--games/devtest/mods/testformspec/models/testformspec_chest.obj79
-rw-r--r--games/devtest/mods/testformspec/textures/default_chest_front.pngbin0 -> 423 bytes
-rw-r--r--games/devtest/mods/testformspec/textures/default_chest_inside.pngbin0 -> 102 bytes
-rw-r--r--games/devtest/mods/testformspec/textures/default_chest_side.pngbin0 -> 375 bytes
-rw-r--r--games/devtest/mods/testformspec/textures/default_chest_top.pngbin0 -> 423 bytes
-rw-r--r--games/devtest/mods/testformspec/textures/testformspec_character.pngbin0 -> 2754 bytes
9 files changed, 133 insertions, 2 deletions
diff --git a/games/devtest/mods/testformspec/LICENSE.txt b/games/devtest/mods/testformspec/LICENSE.txt
new file mode 100644
index 000000000..07696cc30
--- /dev/null
+++ b/games/devtest/mods/testformspec/LICENSE.txt
@@ -0,0 +1,14 @@
+License of media files
+----------------------
+Content imported from minetest_game.
+
+
+BlockMen (CC BY-SA 3.0)
+ default_chest_front.png
+ default_chest_lock.png
+ default_chest_side.png
+ default_chest_top.png
+
+stujones11 (CC BY-SA 3.0)
+An0n3m0us (CC BY-SA 3.0)
+ testformspec_character.b3d
diff --git a/games/devtest/mods/testformspec/formspec.lua b/games/devtest/mods/testformspec/formspec.lua
index 08c1b6dc0..2a2bdad60 100644
--- a/games/devtest/mods/testformspec/formspec.lua
+++ b/games/devtest/mods/testformspec/formspec.lua
@@ -33,6 +33,34 @@ 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;-0.75,0.75;2,2]
+
+ real_coordinates[false]
+ list[current_player;main;1.5,0;3,2]
+ real_coordinates[true]
+
+ real_coordinates[false]
+ style_type[list;size=1.1;spacing=0.1]
+ list[current_player;main;5,0;3,2]
+ real_coordinates[true]
+
+ style_type[list;size=.001;spacing=0]
+ list[current_player;main;7,3.5;8,4]
+
+ box[3,3.5;1,1;#000000]
+ box[5,3.5;1,1;#000000]
+ box[4,4.5;1,1;#000000]
+ box[3,5.5;1,1;#000000]
+ box[5,5.5;1,1;#000000]
+ style_type[list;spacing=.25,.125;size=.75,.875]
+ list[current_player;main;3,3.5;3,3]
+
+ style_type[list;spacing=0;size=1.1]
+ list[current_player;main;.5,7;8,4]
+]]
+
local hypertext_basic = [[
<bigger>Normal test</bigger>
This is a normal text.
@@ -164,7 +192,7 @@ local style_fs = [[
style[one_btn14:hovered+pressed;textcolor=purple]
image_button[0,9.6;1,1;testformspec_button_image.png;one_btn14;Bg]
- style[one_btn15;border=false;bgimg=testformspec_bg.png;bgimg_hovered=testformspec_bg_hovered.png;bgimg_pressed=testformspec_bg_pressed.png]
+ style[one_btn15;border=false;bgcolor=#1cc;bgimg=testformspec_bg.png;bgimg_hovered=testformspec_bg_hovered.png;bgimg_pressed=testformspec_bg_pressed.png]
item_image_button[1.25,9.6;1,1;testformspec:item;one_btn15;Bg]
style[one_btn16;border=false;bgimg=testformspec_bg_9slice.png;bgimg_hovered=testformspec_bg_9slice_hovered.png;bgimg_pressed=testformspec_bg_9slice_pressed.png;bgimg_middle=4,6]
@@ -199,6 +227,7 @@ local scroll_fs =
"box[1,1;8,6;#00aa]"..
"scroll_container[1,1;8,6;scrbar;vertical]"..
"button[0,1;1,1;lorem;Lorem]"..
+ "animated_image[0,1;4.5,1;clip_animated_image;testformspec_animation.png;4;100]" ..
"button[0,10;1,1;ipsum;Ipsum]"..
"pwdfield[2,2;1,1;lorem2;Lorem]"..
"list[current_player;main;4,4;1,5;]"..
@@ -211,6 +240,8 @@ local scroll_fs =
"tooltip[0,11;3,2;Buz;#f00;#000]"..
"box[0,11;3,2;#00ff00]"..
"hypertext[3,13;3,3;;" .. hypertext_basic .. "]" ..
+ "hypertext[3,17;3,3;;Hypertext with no scrollbar\\; the scroll container should scroll.]" ..
+ "textarea[3,21;3,1;textarea;;More scroll within scroll]" ..
"container[0,18]"..
"box[1,2;3,2;#0a0a]"..
"scroll_container[1,2;3,2;scrbar2;horizontal;0.06]"..
@@ -310,6 +341,9 @@ local pages = {
"size[12,13]real_coordinates[true]" ..
"container[0.5,1.5]" .. tabheaders_fs .. "container_end[]",
+ -- Inv
+ "size[12,13]real_coordinates[true]" .. inv_style_fs,
+
-- Animation
[[
formspec_version[3]
@@ -327,6 +361,10 @@ Number]
animated_image[3,4.25;1,1;;testformspec_animation.png;4;0;3]
animated_image[5.5,0.5;5,2;;testformspec_animation.png;4;100]
animated_image[5.5,2.75;5,2;;testformspec_animation.jpg;4;100]
+
+ style[m1;bgcolor=black]
+ model[0.5,6;4,4;m1;testformspec_character.b3d;testformspec_character.png]
+ model[5,6;4,4;m2;testformspec_chest.obj;default_chest_top.png,default_chest_top.png,default_chest_side.png,default_chest_side.png,default_chest_front.png,default_chest_inside.png;30,1;true;true]
]],
-- Scroll containers
@@ -337,7 +375,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
diff --git a/games/devtest/mods/testformspec/models/testformspec_character.b3d b/games/devtest/mods/testformspec/models/testformspec_character.b3d
new file mode 100644
index 000000000..8edbaf637
--- /dev/null
+++ b/games/devtest/mods/testformspec/models/testformspec_character.b3d
Binary files differ
diff --git a/games/devtest/mods/testformspec/models/testformspec_chest.obj b/games/devtest/mods/testformspec/models/testformspec_chest.obj
new file mode 100644
index 000000000..72ba175a0
--- /dev/null
+++ b/games/devtest/mods/testformspec/models/testformspec_chest.obj
@@ -0,0 +1,79 @@
+# Blender v2.78 (sub 0) OBJ File: 'chest-open.blend'
+# www.blender.org
+o Top_Cube.002_None_Top_Cube.002_None_bottom
+v -0.500000 0.408471 0.720970
+v -0.500000 1.115578 0.013863
+v -0.500000 0.894607 -0.207108
+v -0.500000 0.187501 0.499999
+v 0.500000 1.115578 0.013863
+v 0.500000 0.408471 0.720970
+v 0.500000 0.187501 0.499999
+v 0.500000 0.894607 -0.207108
+v -0.500000 0.187500 -0.500000
+v -0.500000 -0.500000 -0.500000
+v -0.500000 -0.500000 0.500000
+v 0.500000 0.187500 -0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+vt 0.0000 1.0000
+vt 0.0000 0.0000
+vt 1.0000 0.0000
+vt 1.0000 1.0000
+vt 1.0000 0.0000
+vt 1.0000 1.0000
+vt 0.0000 1.0000
+vt 0.0000 0.0000
+vt 0.0000 1.0000
+vt 1.0000 1.0000
+vt 1.0000 0.6875
+vt 0.0000 0.6875
+vt 1.0000 1.0000
+vt 0.0000 0.6875
+vt 1.0000 0.6875
+vt 1.0000 0.6875
+vt 1.0000 0.0000
+vt 0.0000 0.0000
+vt 1.0000 0.6875
+vt 1.0000 0.0000
+vt 1.0000 1.0000
+vt 1.0000 0.6875
+vt 1.0000 0.0000
+vt 0.0000 1.0000
+vt 0.0000 0.6875
+vt 0.0000 0.6875
+vt 0.0000 0.0000
+vt 1.0000 0.5000
+vt 1.0000 1.0000
+vt 0.0000 1.0000
+vt 0.0000 0.5000
+vt 0.0000 0.0000
+vt 1.0000 0.0000
+vn 0.0000 0.7071 0.7071
+vn -0.0000 -1.0000 -0.0000
+vn -1.0000 0.0000 0.0000
+vn 1.0000 0.0000 -0.0000
+vn 0.0000 -0.7071 0.7071
+vn 0.0000 0.0000 1.0000
+vn -0.0000 0.7071 -0.7071
+vn -0.0000 0.0000 -1.0000
+vn -0.0000 -0.7071 -0.7071
+vn -0.0000 1.0000 -0.0000
+g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Top
+s off
+f 6/1/1 5/2/1 2/3/1 1/4/1
+g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Bottom
+f 11/5/2 10/6/2 14/7/2 13/8/2
+g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Right-Left
+f 1/9/3 2/10/3 3/11/3 4/12/3
+f 5/13/4 6/1/4 7/14/4 8/15/4
+f 4/12/3 9/16/3 10/17/3 11/18/3
+f 12/19/4 7/14/4 13/8/4 14/20/4
+g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Back
+f 6/21/5 1/9/5 4/12/5 7/22/5
+f 7/22/6 4/12/6 11/18/6 13/23/6
+g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Front
+f 2/10/7 5/24/7 8/25/7 3/11/7
+f 9/16/8 12/26/8 14/27/8 10/17/8
+g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Inside
+f 4/28/9 3/29/9 8/30/9 7/31/9
+f 7/31/10 12/32/10 9/33/10 4/28/10
diff --git a/games/devtest/mods/testformspec/textures/default_chest_front.png b/games/devtest/mods/testformspec/textures/default_chest_front.png
new file mode 100644
index 000000000..85227d8fd
--- /dev/null
+++ b/games/devtest/mods/testformspec/textures/default_chest_front.png
Binary files differ
diff --git a/games/devtest/mods/testformspec/textures/default_chest_inside.png b/games/devtest/mods/testformspec/textures/default_chest_inside.png
new file mode 100644
index 000000000..5f7b6b132
--- /dev/null
+++ b/games/devtest/mods/testformspec/textures/default_chest_inside.png
Binary files differ
diff --git a/games/devtest/mods/testformspec/textures/default_chest_side.png b/games/devtest/mods/testformspec/textures/default_chest_side.png
new file mode 100644
index 000000000..44a65a43d
--- /dev/null
+++ b/games/devtest/mods/testformspec/textures/default_chest_side.png
Binary files differ
diff --git a/games/devtest/mods/testformspec/textures/default_chest_top.png b/games/devtest/mods/testformspec/textures/default_chest_top.png
new file mode 100644
index 000000000..f4a92ee07
--- /dev/null
+++ b/games/devtest/mods/testformspec/textures/default_chest_top.png
Binary files differ
diff --git a/games/devtest/mods/testformspec/textures/testformspec_character.png b/games/devtest/mods/testformspec/textures/testformspec_character.png
new file mode 100644
index 000000000..05021781e
--- /dev/null
+++ b/games/devtest/mods/testformspec/textures/testformspec_character.png
Binary files differ