diff --git a/fs_edit_general.lua b/fs_edit_general.lua index 2769e33..f1ae1c9 100644 --- a/fs_edit_general.lua +++ b/fs_edit_general.lua @@ -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"] end + local add_description = "Nothing selected." if(data.function_name) then -- TODO: create the dropdown 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 "?").."]" end end + func_selected = table.indexof(fun_list, func_data["description"]) + add_description = func_data["description"] end - func_selected = table.indexof(fun_list, - yl_speak_up["custom_functions_"..id_prefix][data.function_name]["description"]) end local operator_list = {} 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 return formspec.. 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;".. "- please select -,"..table.concat(fun_list, ",")..";".. tostring(func_selected + 1)..";]"