diff options
Diffstat (limited to 'games/minimal')
-rw-r--r-- | games/minimal/mods/test/formspec.lua | 20 | ||||
-rw-r--r-- | games/minimal/mods/test/textures/test_animation.jpg | bin | 0 -> 3696 bytes | |||
-rw-r--r-- | games/minimal/mods/test/textures/test_animation.png | bin | 0 -> 1048 bytes |
3 files changed, 16 insertions, 4 deletions
diff --git a/games/minimal/mods/test/formspec.lua b/games/minimal/mods/test/formspec.lua index 67aad3b20..50c506899 100644 --- a/games/minimal/mods/test/formspec.lua +++ b/games/minimal/mods/test/formspec.lua @@ -12,6 +12,7 @@ local clip_fs = [[ style_type[dropdown;noclip=%c]
style_type[scrollbar;noclip=%c]
style_type[table;noclip=%c]
+ style_type[animated_image;noclip=%c]
label[0,0;A clipping test]
button[0,1;3,0.8;x;A clipping test]
@@ -25,6 +26,7 @@ local clip_fs = [[ scrollbar[0,9;3,0.8;horizontal;x9;3]
tablecolumns[text;text]
table[0,10;3,1;x10;one,two,three,four;1]
+ animated_image[0,11;3,1;test_animation.png:4,100]
]]
@@ -119,8 +121,8 @@ local style_fs = [[ local pages = {
[[
+ formspec_version[3]
size[12,12]
- real_coordinates[true]
image_button[0,0;1,1;logo.png;;1x1]
image_button[1,0;2,2;logo.png;;2x2]
button[0,2;1,1;;1x1]
@@ -157,7 +159,7 @@ local pages = { tabheader[6.5,0;6,0.65;name;Tab 1,Tab 2,Tab 3,Secrets;1;false;false]
]],
- "size[12,12]real_coordinates[true]" ..
+ "formspec_version[3]size[12,12]" ..
("label[0.375,0.375;Styled - %s %s]"):format(
color("#F00", "red text"),
color("#77FF00CC", "green text")) ..
@@ -170,17 +172,27 @@ local pages = { style_fs:gsub("one_", "two_"):gsub("style%[[^%]]+%]", ""):gsub("style_type%[[^%]]+%]", "") ..
"container_end[]",
- "size[12,12]real_coordinates[true]" ..
+ "formspec_version[3]size[12,13]" ..
"label[0.1,0.5;Clip]" ..
"container[-2.5,1]" .. clip_fs:gsub("%%c", "false") .. "container_end[]" ..
"label[11,0.5;Noclip]" ..
"container[11.5,1]" .. clip_fs:gsub("%%c", "true") .. "container_end[]",
+
+ [[
+ formspec_version[3]
+ size[12,12]
+ animated_image[0.5,0.5;1,1;test_animation.png:4,100]
+ animated_image[1.75,0.5;1,1;test_animation.png:100,100]
+ animated_image[0.5,1.75;1,1;test_animation.jpg:4,100]
+ animated_image[3,0.5;5,2;test_animation.png:4,100]
+ animated_image[3,2.75;5,2;test_animation.jpg:4,100]
+ ]]
}
local function show_test_formspec(pname, page_id)
page_id = page_id or 2
- local fs = pages[page_id] .. "tabheader[0,0;6,0.65;maintabs;Real Coord,Styles,Noclip;" .. page_id .. ";false;false]"
+ local fs = pages[page_id] .. "tabheader[0,0;6,0.65;maintabs;Real Coord,Styles,Noclip,MiscEle;" .. page_id .. ";false;false]"
minetest.show_formspec(pname, "test:formspec", fs)
end
diff --git a/games/minimal/mods/test/textures/test_animation.jpg b/games/minimal/mods/test/textures/test_animation.jpg Binary files differnew file mode 100644 index 000000000..c4f125d5a --- /dev/null +++ b/games/minimal/mods/test/textures/test_animation.jpg diff --git a/games/minimal/mods/test/textures/test_animation.png b/games/minimal/mods/test/textures/test_animation.png Binary files differnew file mode 100644 index 000000000..b58715bf8 --- /dev/null +++ b/games/minimal/mods/test/textures/test_animation.png |