display earlier in edit mode if an option is an automaticly selected one

This commit is contained in:
Sokomine 2022-09-15 23:02:39 +02:00
parent ccf93a8fd3
commit 5a4f137b65

View File

@ -521,14 +521,21 @@ yl_speak_up.get_fs_talkdialog_line_in_edit_mode = function(
"trade of this option.",
(actions and next(actions)))
-- show the actual text for the option
yl_speak_up.add_formspec_element_with_tooltip_if(formspec,
"field", tostring(9.9+offset)..","..h..";"..
tostring(field_length)..",0.9",
"text_option_" .. oid,
";"..minetest.formspec_escape(sb_v.o_text_when_prerequisites_met),
"Edit the text that is displayed on button "..oid..".",
true)
if(sb_v.o_autoanswer) then
table.insert(formspec,
"label["..tostring(9.9+offset+0.2)..","..tostring(h+0.5)..";"..
minetest.formspec_escape("[Automaticly selected if preconditions are met]")..
"]")
else
-- show the actual text for the option
yl_speak_up.add_formspec_element_with_tooltip_if(formspec,
"field", tostring(9.9+offset)..","..h..";"..
tostring(field_length)..",0.9",
"text_option_" .. oid,
";"..minetest.formspec_escape(sb_v.o_text_when_prerequisites_met),
"Edit the text that is displayed on button "..oid..".",
true)
end
return {h = h, formspec = formspec}
end