Skip to content

Commit

Permalink
fix autoClose setting not persisting across logouts
Browse files Browse the repository at this point in the history
  • Loading branch information
jsb committed Nov 8, 2015
1 parent e094c43 commit 627e761
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions RingMenuSettings.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
local function toboolean(value)
return not not value
end

function CreateSettingsFrame(config)
local frame = CreateFrame("Frame", config.name, UIParent)
local frameWidth = 360.0
Expand Down Expand Up @@ -231,7 +235,7 @@ end

function RingMenuSettings_AutoClose_OnUpdate()
local checkButton = getglobal("RingMenuSettingsFrameWidgetAutoClose")
RingMenu_settings.autoClose = checkButton:GetChecked()
RingMenu_settings.autoClose = toboolean(checkButton:GetChecked())
end

function RingMenuSettings_NumButtons_OnUpdate()
Expand Down Expand Up @@ -276,7 +280,7 @@ end

function RingMenuSettings_ZoomButtonIcons_OnUpdate()
local checkButton = getglobal("RingMenuSettingsFrameWidgetZoomButtonIcons")
RingMenu_settings.zoomButtonIcons = checkButton:GetChecked()
RingMenu_settings.zoomButtonIcons = toboolean(checkButton:GetChecked())
RingMenuFrame_ConfigureButtons()
end

Expand Down

0 comments on commit 627e761

Please sign in to comment.