Skip to content

Commit

Permalink
BREAKING: Keep menu entries consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Nov 1, 2024
1 parent 2166a08 commit 3b1b50c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ local function registerSetting(category, savedvariable, info)
addon:ArgCheck(info.options, 3, 'table')
local options = function()
local container = Settings.CreateControlTextContainer()
for key, name in next, info.options do
container:Add(key, name)
for _, option in next, info.options do
container:Add(option.value, option.label)
end
return container:GetData()
end
Expand Down Expand Up @@ -286,9 +286,9 @@ namespace:RegisterSettings('MyAddOnDB', {
tooltip = 'Longer description of the menu in a tooltip',
default = 'key1',
options = {
key1 = 'First option',
key2 = 'Second option',
key3 = 'Third option',
{value = key1, label = 'First option'},
{value = key2, label = 'Second option'},
{value = key3, label = 'Third option'},
},
new = false,
},
Expand Down

0 comments on commit 3b1b50c

Please sign in to comment.