Quantcast

updated lib and stuff

Darthpred [06-06-15 - 10:52]
updated lib and stuff
Filename
ElvUI_SLE/core/toolkit.lua
ElvUI_SLE/libs/LibElv-UIButtons-1.0/LibElv-UIButtons-1.0.lua
ElvUI_SLE/modules/uibuttons.lua
diff --git a/ElvUI_SLE/core/toolkit.lua b/ElvUI_SLE/core/toolkit.lua
index eea0366..9220a91 100644
--- a/ElvUI_SLE/core/toolkit.lua
+++ b/ElvUI_SLE/core/toolkit.lua
@@ -65,8 +65,6 @@ local function UpdateAll()
 	end
 	LT:LootShow()
 	LT:Update()
-	UB.Holder.db = E.db.sle.uibuttons
-	UB.Holder:FrameSize()
 	RM:UpdateBar(true)
 	F:UpdateLayout()
 	CH:GMIconUpdate()
diff --git a/ElvUI_SLE/libs/LibElv-UIButtons-1.0/LibElv-UIButtons-1.0.lua b/ElvUI_SLE/libs/LibElv-UIButtons-1.0/LibElv-UIButtons-1.0.lua
index 92d81f7..e230b71 100644
--- a/ElvUI_SLE/libs/LibElv-UIButtons-1.0/LibElv-UIButtons-1.0.lua
+++ b/ElvUI_SLE/libs/LibElv-UIButtons-1.0/LibElv-UIButtons-1.0.lua
@@ -316,7 +316,6 @@ function lib:CreateFrame(name, db, default, style, styleDefault)
 	menu:SetFrameStrata("HIGH")
 	menu:SetFrameLevel(5)
 	menu:SetClampedToScreen(true)
-	menu:Point("LEFT", E.UIParent, "LEFT", -2, 0);
 	menu:Size(17, 17); --Cause the damn thing doesn't want to show up without default size lol
 	menu.myname = UnitName('player')
 	menu:CreateBackdrop()
@@ -402,8 +401,8 @@ local function GenerateTable(menu, coreGroup, groupName, groupTitle)
 					["dropdown"] = L['Dropdown'],
 				},
 				disabled = function() return not menu.db.enable end,
-				get = function(info) return E.private.sle.uiButtonStyle end,
-				set = function(info, value) E.private.sle.uiButtonStyle = value; E:StaticPopup_Show("PRIVATE_RL") end,
+				get = function(info) return menu.style end,
+				set = function(info, value) menu.style = value; E:StaticPopup_Show("PRIVATE_RL") end,
 			},
 			space = {
 				order = 5,
diff --git a/ElvUI_SLE/modules/uibuttons.lua b/ElvUI_SLE/modules/uibuttons.lua
index 3d42c0d..31316bb 100644
--- a/ElvUI_SLE/modules/uibuttons.lua
+++ b/ElvUI_SLE/modules/uibuttons.lua
@@ -115,6 +115,7 @@ end
 function UB:Initialize()
 	UB.Holder = lib:CreateFrame("SLE_UIButtons", E.db.sle.uibuttons, P.sle.uibuttons, E.private.sle.uiButtonStyle, "dropdown")
 	local menu = UB.Holder
+	menu:Point("LEFT", E.UIParent, "LEFT", -2, 0);
 	menu:SetupMover(L["S&L UI Buttons"], "ALL,S&L,S&L MISC,UIButtons")

 	UB:SetupBar(menu)
@@ -126,5 +127,11 @@ function UB:Initialize()

 	UB:RightClicks(menu)

+	hooksecurefunc(E, "UpdateAll", function()
+		UB.Holder.db = E.db.sle.uibuttons
+		UB.Holder:ToggleShow()
+		UB.Holder:FrameSize()
+		collectgarbage('collect');
+	end)
 	-- lib:CreateOptions(menu, true, "slebuttons", "SLE Buttons")
 end
\ No newline at end of file