Quantcast

Update TOC, get drag working

Tek Hudson [08-10-19 - 07:09]
Update TOC, get drag working
Filename
DruidBar.xml
DruidBarClassic.toc
README.md
localization.lua
diff --git a/DruidBar.xml b/DruidBar.xml
index de0453a..c0e4cdb 100644
--- a/DruidBar.xml
+++ b/DruidBar.xml
@@ -83,9 +83,35 @@
 					<OnLoad>
 						self:SetFrameLevel("1");
 					</OnLoad>
+					<OnMouseDown>
+					  if button == "LeftButton" and not self.isMoving then
+					   self:GetParent():StartMoving();
+					   self.isMoving = true;
+					  end
+					 </OnMouseDown>
+					 <OnMouseUp>
+					  if button == "LeftButton" and self.isMoving then
+					   self:GetParent():StopMovingOrSizing();
+					   self.isMoving = false;
+					  end
+					 </OnMouseUp>
+					 <OnHide>
+					  if ( this.isMoving ) then
+					   self:GetParent():StopMovingOrSizing();
+					   this.isMoving = false;
+					  end
+					 </OnHide>
 				</Scripts>
 			</StatusBar>
 		</Frames>
+
+		<Scripts>
+			<OnLoad>
+				self:RegisterForDrag("LeftButton");
+			</OnLoad>
+			<OnDragStart>self:StartMoving();</OnDragStart>
+			<OnDragStop>self:StopMovingOrSizing();</OnDragStop>
+		</Scripts>
   </Frame>

 	<Frame name="DruidBarUpdateFrame">
diff --git a/DruidBarClassic.toc b/DruidBarClassic.toc
index 48d051b..e276782 100644
--- a/DruidBarClassic.toc
+++ b/DruidBarClassic.toc
@@ -1,7 +1,8 @@
-## Interface: 11300
-## Title: Druid Bar Classic v1.13
+## Interface: 11302
+## Title: Druid Bar Classic
 ## Notes: Shows mana in bear/cat form.
 ## Current Author: Tek (port to WoW Classic Beta)
 ## Original Authors: SkaDemon (GUI: DiabloHu)
 ## SavedVariables: DruidBarKey
+## Version: 0.3
 DruidBar.xml
diff --git a/README.md b/README.md
index 56e32fe..8bff6b3 100644
--- a/README.md
+++ b/README.md
@@ -66,8 +66,10 @@ Discord: https://discord.gg/b5sPQnu

 ## Version History

-#### 1.13
-Prepair for classic release. Update TOC to work with launcher version listed.
+#### 0.3
+Prepair for classic release.
+Update TOC to work with launcher version listed.
+Get drag working.

 #### 0.2
 Remove KMG suport.
diff --git a/localization.lua b/localization.lua
index d840100..ddf0931 100644
--- a/localization.lua
+++ b/localization.lua
@@ -89,7 +89,7 @@ DRUIDBAR_OPTIONS_ColorBack = "Bg Color";
 DRUIDBAR_OPTIONS_ColorBorder = "Border Color";
 DRUIDBAR_OPTIONS_Message_Mana = "Mana Bar";
 DRUIDBAR_OPTIONS_Message_border = "Bar Border";
-DRUIDBAR_OPTIONS_Version = "|cff9d9d9dDruid Bar Classic v0.1\nby Tek|r";
+DRUIDBAR_OPTIONS_Version = "|cff9d9d9dDruid Bar Classic v0.3\nby Tek|r";


 if ( GetLocale() == "frFR" ) then