depctrl global config: add reset button

This commit is contained in:
garret 2022-11-23 20:41:33 +00:00
parent ffcca2c076
commit 9a260cb6d2
1 changed files with 4 additions and 2 deletions

View File

@ -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)