Skip to content

Commit

Permalink
Use wml.tag in helper.get_user_choice
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Mar 11, 2018
1 parent 8ab2185 commit c32c095
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/lua/helper.lua
Expand Up @@ -112,10 +112,10 @@ function helper.get_user_choice(attr, options)
msg[k] = attr[k]
end
for k,v in ipairs(options) do
table.insert(msg, { "option", { message = v,
{ "command", { { "lua", {
table.insert(msg, wml.tag.option, { message = v,
wml.tag.command, { wml.tag.lua, {
code = string.format("wesnoth.__user_choice_helper(%d)", k)
}}}}}})
}}})
end
wml_actions.message(msg)
wesnoth.__user_choice_helper = nil
Expand Down

0 comments on commit c32c095

Please sign in to comment.