hm
This commit is contained in:
34
mods/i3/tests/test_tabs.lua
Normal file
34
mods/i3/tests/test_tabs.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
i3.new_tab("test1", {
|
||||
description = "Test 1 Test 1",
|
||||
image = "i3_heart.png",
|
||||
|
||||
formspec = function(player, data, fs)
|
||||
fs("label", 3, 1, "Just a test")
|
||||
fs"label[3,2;Lorem Ipsum]"
|
||||
end,
|
||||
})
|
||||
|
||||
i3.new_tab("test2", {
|
||||
description = "Test 2",
|
||||
image = "i3_mesepick.png",
|
||||
|
||||
formspec = function(player, data, fs)
|
||||
fs("label[3,1;Test 2]")
|
||||
end,
|
||||
})
|
||||
|
||||
i3.new_tab("test_creative", {
|
||||
description = "Test creative",
|
||||
|
||||
access = function(player, data)
|
||||
local name = player:get_player_name()
|
||||
return core.is_creative_enabled(name)
|
||||
end,
|
||||
|
||||
formspec = function(player, data, fs)
|
||||
fs("label[3,1;Creative enabled]")
|
||||
end,
|
||||
|
||||
fields = i3.set_fs,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user