Quantcast

Initialize frame with movable so stored position can bet set on initial render

Tek Hudson [01-06-20 - 14:34]
Initialize frame with movable so stored position can bet set on initial render
Filename
DruidBar.xml
tash
diff --git a/DruidBar.xml b/DruidBar.xml
index 119813b..a65c630 100644
--- a/DruidBar.xml
+++ b/DruidBar.xml
@@ -7,7 +7,7 @@

 	<GameTooltip name="DBarSpellCatch" frameStrata="TOOLTIP" inherits="GameTooltipTemplate"/>

-	<Frame name="DruidBarFrame" hidden="true" frameStrata="BACKGROUND" enableMouse="true" parent="UIParent">
+	<Frame name="DruidBarFrame" hidden="true" frameStrata="BACKGROUND" enableMouse="true" movable="true" parent="UIParent">
 		<Size>
 			<AbsDimension x="170" y="18"/>
 		</Size>
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)