show_fs: edit_options_dialog
This commit is contained in:
parent
61b5799247
commit
21f77baae1
@ -774,3 +774,21 @@ yl_speak_up.get_fs_edit_option_dialog = function(player, n_id, d_id, o_id, calle
|
||||
"container_end[]"
|
||||
return formspec
|
||||
end
|
||||
|
||||
|
||||
yl_speak_up.get_fs_edit_option_dialog_wrapper = function(player, param)
|
||||
if(not(param)) then
|
||||
param = {}
|
||||
end
|
||||
local pname = player:get_player_name()
|
||||
yl_speak_up.speak_to[pname].o_id = param.o_id
|
||||
return yl_speak_up.get_fs_edit_option_dialog(player, param.n_id, param.d_id, param.o_id, param.caller)
|
||||
end
|
||||
|
||||
|
||||
yl_speak_up.register_fs("edit_option_dialog",
|
||||
yl_speak_up.input_edit_option_dialog,
|
||||
yl_speak_up.get_fs_edit_option_dialog_wrapper,
|
||||
-- no special formspec required:
|
||||
nil
|
||||
)
|
||||
|
||||
14
show_fs.lua
14
show_fs.lua
@ -41,10 +41,6 @@ yl_speak_up.input_handler = function(player, formname, fields)
|
||||
elseif formname == "yl_speak_up:save_or_discard_changes" then
|
||||
yl_speak_up.input_save_or_discard_changes(player, formname, fields)
|
||||
return true
|
||||
-- handled in fs_edit_options_dialog.lua
|
||||
elseif formname == "yl_speak_up:edit_option_dialog" then
|
||||
yl_speak_up.input_edit_option_dialog(player, formname, fields)
|
||||
return true
|
||||
elseif formname == "yl_speak_up:talk" then
|
||||
yl_speak_up.input_talk(player, formname, fields)
|
||||
return true
|
||||
@ -240,16 +236,6 @@ yl_speak_up.show_fs = function(player, fs_name, param)
|
||||
yl_speak_up.show_fs_ver(pname, "yl_speak_up:setdialog",
|
||||
yl_speak_up.get_fs_setdialog(player, param.n_id, param.d_id))
|
||||
|
||||
elseif(fs_name == "edit_option_dialog") then
|
||||
-- the optional "caller" parameter can be used for debugging
|
||||
if(not(param)) then
|
||||
param = {}
|
||||
end
|
||||
yl_speak_up.speak_to[pname].o_id = param.o_id
|
||||
yl_speak_up.show_fs_ver(pname, "yl_speak_up:edit_option_dialog",
|
||||
yl_speak_up.get_fs_edit_option_dialog(player, param.n_id, param.d_id, param.o_id,
|
||||
param.caller))
|
||||
|
||||
elseif(fs_name == "talk") then
|
||||
if(not(param)) then
|
||||
param = {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user