From 627e76184b7312ff3043e0c0576eb95022ccfa72 Mon Sep 17 00:00:00 2001 From: Janis Born Date: Sun, 8 Nov 2015 15:27:47 +0100 Subject: [PATCH] fix autoClose setting not persisting across logouts --- RingMenuSettings.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RingMenuSettings.lua b/RingMenuSettings.lua index 197987c..0cd8d44 100644 --- a/RingMenuSettings.lua +++ b/RingMenuSettings.lua @@ -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 @@ -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() @@ -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