Use wml.tag in helper.get_user_choice
This commit is contained in:
parent
40bf04ec8e
commit
9885932011
1 changed files with 3 additions and 3 deletions
|
@ -141,10 +141,10 @@ function helper.get_user_choice(attr, options)
|
||||||
msg[k] = attr[k]
|
msg[k] = attr[k]
|
||||||
end
|
end
|
||||||
for k,v in ipairs(options) do
|
for k,v in ipairs(options) do
|
||||||
table.insert(msg, { "option", { message = v,
|
table.insert(msg, wml.tag.option, { message = v,
|
||||||
{ "command", { { "lua", {
|
wml.tag.command, { wml.tag.lua, {
|
||||||
code = string.format("wesnoth.__user_choice_helper(%d)", k)
|
code = string.format("wesnoth.__user_choice_helper(%d)", k)
|
||||||
}}}}}})
|
}}})
|
||||||
end
|
end
|
||||||
wml_actions.message(msg)
|
wml_actions.message(msg)
|
||||||
wesnoth.__user_choice_helper = nil
|
wesnoth.__user_choice_helper = nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue