forked from your-land-mirror/yl_speak_up
show_fs: properties
This commit is contained in:
parent
9d26267e67
commit
711febcb4c
@ -113,3 +113,18 @@ yl_speak_up.get_fs_properties = function(pname, selected)
|
||||
"button[5.0,7.8;2.0,0.9;back;Back]"..
|
||||
add_selected
|
||||
end
|
||||
|
||||
yl_speak_up.get_fs_properties_wrapper = function(player, param)
|
||||
if(not(param)) then
|
||||
param = {}
|
||||
end
|
||||
local pname = player:get_player_name()
|
||||
return yl_speak_up.get_fs_properties(pname, param.selected)
|
||||
end
|
||||
|
||||
yl_speak_up.register_fs("properties",
|
||||
yl_speak_up.input_properties,
|
||||
yl_speak_up.get_fs_properties_wrapper,
|
||||
-- force formspec version 1:
|
||||
1
|
||||
)
|
||||
|
12
show_fs.lua
12
show_fs.lua
@ -54,10 +54,6 @@ yl_speak_up.input_handler = function(player, formname, fields)
|
||||
elseif formname == "yl_speak_up:fashion_extended" then
|
||||
yl_speak_up.input_fashion_extended(player, formname, fields)
|
||||
return true
|
||||
-- handled in fs_properties.lua
|
||||
elseif formname == "yl_speak_up:properties" then
|
||||
yl_speak_up.input_properties(player, formname, fields)
|
||||
return true
|
||||
-- handled in inventory.lua
|
||||
elseif formname == "yl_speak_up:inventory" then
|
||||
yl_speak_up.input_inventory(player, formname, fields)
|
||||
@ -337,14 +333,6 @@ yl_speak_up.show_fs = function(player, fs_name, param)
|
||||
yl_speak_up.show_fs_ver(pname, "yl_speak_up:fashion_extended",
|
||||
yl_speak_up.get_fs_fashion_extended(pname))
|
||||
|
||||
elseif(fs_name == "properties") then
|
||||
if(not(param)) then
|
||||
param = {}
|
||||
end
|
||||
yl_speak_up.show_fs_ver(pname, "yl_speak_up:properties",
|
||||
yl_speak_up.get_fs_properties(pname, param.selected),
|
||||
1)
|
||||
|
||||
elseif(fs_name == "inventory") then
|
||||
-- this is a very classical formspec; it works far better with OLD fs;
|
||||
-- force formspec version 1
|
||||
|
Loading…
Reference in New Issue
Block a user