Skip to content

Commit

Permalink
use new format for checkbuttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuller committed Jul 9, 2016
1 parent 94d9cb0 commit e8d53dd
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions bars/bagBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,18 @@ function BagBar:CreateMenu()
local menu = Addon:NewMenu(self.id)
local L = LibStub('AceLocale-3.0'):GetLocale('Dominos-Config')

local panel = menu:AddLayoutPanel()

-- add option to show only one bag
local oneBag = panel:NewCheckButton(L.OneBag, 'OneBag', 'SetOneBag')
-- oneBag:SetScript('OnShow', function()
-- oneBag:SetChecked(self:OneBag())
-- end)
--
-- oneBag:SetScript('OnClick', function()
-- self:SetOneBag(oneBag:GetChecked())
-- _G[panel:GetName() .. L.Columns]:OnShow()
-- end)
local layoutPanel = menu:NewPanel(L.Layout)

layoutPanel:NewCheckButton{
name = L.OneBag,
get = function() return layoutPanel.owner:OneBag() end,
set = function(_, enable) return layoutPanel.owner:SetOneBag(enable) end,
}

layoutPanel:AddLayoutOptions()

menu:AddAdvancedPanel()

self.menu = menu
end

Expand Down

0 comments on commit e8d53dd

Please sign in to comment.