forked from Sokomine/yl_speak_up
show the full name of the function description for evaluate preconditions/effects
This commit is contained in:
parent
fdc4464fd2
commit
f00a7752d8
@ -1656,6 +1656,7 @@ yl_speak_up.get_fs_edit_option_p_and_e_evaluate = function(
|
|||||||
--data.function_name = e[ id_prefix.."value"]
|
--data.function_name = e[ id_prefix.."value"]
|
||||||
data.function_name = e[ id_prefix.."value"]
|
data.function_name = e[ id_prefix.."value"]
|
||||||
end
|
end
|
||||||
|
local add_description = "Nothing selected."
|
||||||
if(data.function_name) then
|
if(data.function_name) then
|
||||||
-- TODO: create the dropdown
|
-- TODO: create the dropdown
|
||||||
func_data = yl_speak_up["custom_functions_"..id_prefix][data.function_name]
|
func_data = yl_speak_up["custom_functions_"..id_prefix][data.function_name]
|
||||||
@ -1681,9 +1682,9 @@ yl_speak_up.get_fs_edit_option_p_and_e_evaluate = function(
|
|||||||
func_data[paramn.."_desc"] or "?").."]"
|
func_data[paramn.."_desc"] or "?").."]"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
func_selected = table.indexof(fun_list, func_data["description"])
|
||||||
|
add_description = func_data["description"]
|
||||||
end
|
end
|
||||||
func_selected = table.indexof(fun_list,
|
|
||||||
yl_speak_up["custom_functions_"..id_prefix][data.function_name]["description"])
|
|
||||||
end
|
end
|
||||||
local operator_list = {}
|
local operator_list = {}
|
||||||
for i, v in ipairs(check_operator) do
|
for i, v in ipairs(check_operator) do
|
||||||
@ -1704,6 +1705,9 @@ yl_speak_up.get_fs_edit_option_p_and_e_evaluate = function(
|
|||||||
-- the list of available variables needs to be extended with the ones
|
-- the list of available variables needs to be extended with the ones
|
||||||
return formspec..
|
return formspec..
|
||||||
text_operator_and_comparison..
|
text_operator_and_comparison..
|
||||||
|
-- show the description of the function again (the space in the dropdown menu is a bit
|
||||||
|
-- limited)
|
||||||
|
"label[7.5,3.3;"..minetest.formspec_escape(add_description).."]"..
|
||||||
"dropdown[0.2,4.8;6.5,0.6;select_function_name;"..
|
"dropdown[0.2,4.8;6.5,0.6;select_function_name;"..
|
||||||
"- please select -,"..table.concat(fun_list, ",")..";"..
|
"- please select -,"..table.concat(fun_list, ",")..";"..
|
||||||
tostring(func_selected + 1)..";]"
|
tostring(func_selected + 1)..";]"
|
||||||
|
Loading…
Reference in New Issue
Block a user