nightly commit

This commit is contained in:
Torsten Brendgen
2026-04-25 22:49:22 +02:00
parent feaa62309c
commit cf78405148
10 changed files with 368 additions and 226 deletions

View File

@@ -1835,6 +1835,88 @@ function HMGT_Config:Initialize()
end
end,
},
devToolsEnabled = {
type = "toggle",
order = 2,
width = "full",
name = L["OPT_DEVTOOLS_MODE"] or L["OPT_DEBUG_MODE"] or "Debug console",
desc = L["OPT_DEVTOOLS_MODE_DESC"] or L["OPT_DEBUG_MODE_DESC"] or "Enable the debug console.",
get = function()
return HMGT.GetDevToolsSettings and HMGT:GetDevToolsSettings().enabled == true
end,
set = function(_, value)
if not HMGT.GetDevToolsSettings then
return
end
HMGT:GetDevToolsSettings().enabled = value == true
if HMGT.UpdateDevToolsWindowVisibility then
HMGT:UpdateDevToolsWindowVisibility()
end
end,
},
debugLevel = {
type = "select",
order = 3,
width = "full",
name = L["OPT_DEBUG_LEVEL"] or "Debug level",
values = function()
return HMGT.GetDebugLevelOptions and HMGT:GetDebugLevelOptions() or {}
end,
get = function()
return HMGT.GetConfiguredDebugLevel and HMGT:GetConfiguredDebugLevel() or "info"
end,
set = function(_, value)
if HMGT.GetDevToolsSettings then
HMGT:GetDevToolsSettings().level = value or "info"
end
if HMGT.RefreshDevToolsWindow then
HMGT:RefreshDevToolsWindow()
end
end,
},
debugScope = {
type = "select",
order = 4,
width = "full",
name = L["OPT_DEBUG_SCOPE"] or "Module filter",
values = function()
return HMGT.GetDebugScopeOptions and HMGT:GetDebugScopeOptions() or {}
end,
get = function()
local settings = HMGT.GetDevToolsSettings and HMGT:GetDevToolsSettings() or {}
return settings.scope or "ALL"
end,
set = function(_, value)
if HMGT.GetDevToolsSettings then
HMGT:GetDevToolsSettings().scope = value or "ALL"
end
if HMGT.RefreshDevToolsWindow then
HMGT:RefreshDevToolsWindow()
end
end,
},
openDebug = {
type = "execute",
order = 5,
width = "half",
name = L["OPT_DEVTOOLS_OPEN"] or L["OPT_DEBUG_OPEN"] or "Open debug console",
func = function()
if HMGT.OpenDevToolsWindow then
HMGT:OpenDevToolsWindow()
end
end,
},
clearDebug = {
type = "execute",
order = 6,
width = "half",
name = L["OPT_DEVTOOLS_CLEAR"] or L["OPT_DEBUG_CLEAR"] or "Clear debug log",
func = function()
if HMGT.ClearDevToolsLog then
HMGT:ClearDevToolsLog()
end
end,
},
},
},
commands = {
@@ -1850,6 +1932,7 @@ function HMGT_Config:Initialize()
name = table.concat({
"|cffffd100/hmgt|r",
"|cffffd100/hmgt debug|r",
"|cffffd100/hmgt status|r",
"|cffffd100/hmgt version|r",
}, "\n"),
},