From 9a260cb6d2b34e2e221bd0fb789e74ade3dd467c Mon Sep 17 00:00:00 2001 From: garret Date: Wed, 23 Nov 2022 20:41:33 +0000 Subject: depctrl global config: add reset button --- macros/garret.depctrl_config.lua | 6 ++++-- 1 file 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) -- cgit v1.2.3-70-g09d2