diff --git a/.luacheckrc b/.luacheckrc index 87a5675..be63bf0 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -30,6 +30,7 @@ read_globals = { -- FrameXML objects 'ColorPickerFrame', 'EventRegistry', + 'Menu', 'MinimalSliderWithSteppersMixin', 'ScrollUtil', 'Settings', @@ -52,6 +53,10 @@ read_globals = { -- FrameXML constants 'DEFAULT_CHAT_FRAME', + -- GlobalStrings + 'HEADER_COLON', + 'SETTINGS_DEFAULTS', + -- namespaces 'C_AddOns', 'C_CVar', diff --git a/modules/settings.lua b/modules/settings.lua index 2a8cdfd..84e341b 100644 --- a/modules/settings.lua +++ b/modules/settings.lua @@ -36,7 +36,7 @@ do local defaults = CreateFrame('Button', nil, header, 'UIPanelButtonTemplate') defaults:SetPoint('TOPRIGHT', -36, -16) defaults:SetSize(96, 22) - defaults:SetText(_G.SETTINGS_DEFAULTS) + defaults:SetText(SETTINGS_DEFAULTS) defaults:Hide() header.DefaultsButton = defaults @@ -242,7 +242,7 @@ local function registerSettings(savedvariable, settings) for _, setting in next, settings do if firstInstall then - info.firstInstall = true + setting.firstInstall = true end registerSetting(category, savedvariable, setting) @@ -596,7 +596,7 @@ do elseif setting.type == 'menu' then local menu = root:CreateButton(setting.title) for _, option in next, setting.options do - local radio = menu:CreateRadio( + menu:CreateRadio( option.label, GenerateClosure(menuGetter, setting), GenerateClosure(menuSetter, setting),