From dfd67d28030009d69c2f92938fdaabf64054b346 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 16 Jan 2014 20:47:43 -0500 Subject: Added support for multiple entry boxes in inputdialogs. Requires latest gtdialog hg (r67). --- core/ui.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/ui.lua') diff --git a/core/ui.lua b/core/ui.lua index dd0fd522..fa2d5d51 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -105,9 +105,13 @@ ui.dialogs = setmetatable({}, {__index = function(t, k) local files = {} for file in result:gmatch('[^\n]+') do files[#files + 1] = file end return files - elseif k == 'filteredlist' then + elseif k == 'filteredlist' or + k:find('input') and result:match('^[^\n]+\n?(.*)$'):find('\n') then local button, value = result:match('^([^\n]+)\n?(.*)$') if not options.string_output then button = tonumber(button) end + if k:find('input') then + options.string_output, options.select_multiple = true, true + end local items = {} for item in value:gmatch('[^\n]+') do items[#items + 1] = options.string_output and item or tonumber(item) + 1 -- cgit v1.2.3