From 81b56db30a25ff575da6524793a15aede4c813a5 Mon Sep 17 00:00:00 2001 From: Tek Hudson Date: Mon, 6 Jan 2020 06:34:27 -0800 Subject: [PATCH] Initialize frame with movable so stored position can bet set on initial render --- DruidBar.xml | 2 +- tash | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 tash diff --git a/DruidBar.xml b/DruidBar.xml index 119813b..a65c630 100644 --- a/DruidBar.xml +++ b/DruidBar.xml @@ -7,7 +7,7 @@ - + diff --git a/tash b/tash new file mode 100644 index 0000000..aebc65f --- /dev/null +++ b/tash @@ -0,0 +1,45 @@ +diff --git a/DruidBar.lua b/DruidBar.lua +index 1d2e691..d7907ed 100644 +--- a/DruidBar.lua ++++ b/DruidBar.lua +@@ -6,12 +6,27 @@ local timer = 0; + local lowregentimer = 0; + local fullmanatimer = 0; + local DruidBar_Anchored = nil; ++-- local DruidBar_MinimapPos = {  ++-- ["minimapPos"] = 90,  ++-- ["hide"] = false,  ++-- }  ++  ++-- local ldb = LibStub:GetLibrary("LibDataBroker-1.1")  ++  ++-- if not ldb:GetDataObjectByName("DruidBarMinimapIcon") then  ++-- ldb:NewDataObject("DruidBarMinimapIcon", {  ++-- type = "data source",  ++-- text = "Druid Bar Classic",  ++-- icon = "Interface\\Icons\\ABILITY_DRUID_DEMORALIZINGROAR",  ++-- OnClick = function (self, button) if button == "LeftButton" then DRUIDBAROptionsFrame_Toggle(); end end  ++-- });  ++-- end  +  + local minimapIconLDB = LibStub("LibDataBroker-1.1"):NewDataObject("DruidBarMinimapIcon", { +- type = "data source", +- text = "Druid Bar Classic", +- icon = "Interface\\Icons\\ABILITY_DRUID_DEMORALIZINGROAR", +- OnClick = function (self, button) if button == "LeftButton" then DRUIDBAROptionsFrame_Toggle(); end end ++ type = "data source",  ++ text = "Druid Bar Classic",  ++ icon = "Interface\\Icons\\ABILITY_DRUID_DEMORALIZINGROAR",  ++ OnClick = function (self, button) if button == "LeftButton" then DRUIDBAROptionsFrame_Toggle(); end end  + }); +  + local DruidBar_MinimapButton = LibStub("LibDBIcon-1.0"); +@@ -31,7 +46,7 @@ function DruidBar_OnLoad() + DBarSpellCatch:SetOwner(DruidBarUpdateFrame, "ANCHOR_NONE"); +  + -- Creating the minimap config icon +- DruidBar_MinimapButton:Register("DruidBarMinimapIcon", minimapIconLDB, DruidBarKey); ++ DruidBar_MinimapButton:Register("DruidBarMinimapIcon", ldb, DruidBar_MinimapPos);  + end + end + function EventRegistration(event) -- 1.7.9.5