diff options
author | garret <garret@airmail.cc> | 2022-11-23 20:41:33 +0000 |
---|---|---|
committer | garret <garret@airmail.cc> | 2022-11-23 20:41:33 +0000 |
commit | 9a260cb6d2b34e2e221bd0fb789e74ade3dd467c (patch) | |
tree | 16d0f33394ab3d4796843d382a1c26d58eee1816 /macros/garret.depctrl_config.lua | |
parent | ffcca2c076220f313c4ffb2cd637589c74926a2f (diff) | |
download | aegisub-scripts-9a260cb6d2b34e2e221bd0fb789e74ade3dd467c.tar.gz aegisub-scripts-9a260cb6d2b34e2e221bd0fb789e74ade3dd467c.tar.bz2 aegisub-scripts-9a260cb6d2b34e2e221bd0fb789e74ade3dd467c.zip |
depctrl global config: add reset button
Diffstat (limited to 'macros/garret.depctrl_config.lua')
-rw-r--r-- | macros/garret.depctrl_config.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/macros/garret.depctrl_config.lua b/macros/garret.depctrl_config.lua index cfce03b..5e94a76 100644 --- a/macros/garret.depctrl_config.lua +++ b/macros/garret.depctrl_config.lua @@ -142,9 +142,11 @@ local function get_config(data) value = config.logMaxSize or defaults.logMaxSize }, } - pressed, res = aegisub.dialog.display(dialog) - if pressed == false then + local pressed, res = aegisub.dialog.display(dialog, {"Cancel", "Reset", "OK"}) + if pressed == "Cancel" then aegisub.cancel() + elseif pressed == "Reset" then + return {} end res.traceLevel = tonumber(res.traceLevel:match("^(%d)")) res.updateInterval = human_to_seconds(res.updateInterval) |