Quantcast

Final code changes for 0.3

Tek Hudson [08-10-19 - 08:44]
Final code changes for 0.3
Filename
DruidBar.lua
DruidBar.xml
Options.lua
t
diff --git a/DruidBar.lua b/DruidBar.lua
index 0273090..475236d 100644
--- a/DruidBar.lua
+++ b/DruidBar.lua
@@ -3,9 +3,9 @@ local aquaformid, travelformid;

 function DruidBar_OnLoad()
 	DruidBarUpdateFrame:RegisterEvent("UNIT_AURA");
+	DruidBarUpdateFrame:RegisterEvent("ADDON_LOADED");
 	DruidBarUpdateFrame:RegisterEvent("UNIT_MAXPOWER");
 	DruidBarUpdateFrame:RegisterEvent("COMBAT_LOG_EVENT");
-	DruidBarUpdateFrame:RegisterEvent("ADDON_LOADED");
 	DruidBarUpdateFrame:RegisterEvent("UNIT_POWER_UPDATE");
 	DruidBarUpdateFrame:RegisterEvent("INSTANCE_BOOT_STOP");
 	DruidBarUpdateFrame:RegisterEvent("INSTANCE_BOOT_START");
diff --git a/DruidBar.xml b/DruidBar.xml
index abba531..83519a8 100644
--- a/DruidBar.xml
+++ b/DruidBar.xml
@@ -8,7 +8,7 @@

 	<Frame name="DruidBarFrame" hidden="true" frameStrata="BACKGROUND" enableMouse="true" movable="true" parent="UIParent">
 		<Size>
-			<AbsDimension x="160" y="18"/>
+			<AbsDimension x="170" y="18"/>
 		</Size>

 		<Anchors>
diff --git a/Options.lua b/Options.lua
index 1655d32..50be1ad 100644
--- a/Options.lua
+++ b/Options.lua
@@ -13,7 +13,7 @@ end

 function DRUIDBAROptions_CheckWidth(self)
 	if ( DRUIDBAROptionsWidthEditBox:GetText() < "1" ) then
-		DRUIDBAROptionsWidthEditBox:SetText("1");
+		DRUIDBAROptionsWidthEditBox:SetText("170");
 		DruidBarKey.xvar = self:GetNumber();
 		DruidBarKey.tempW = DruidBarKey.xvar;
 	elseif( DRUIDBAROptionsWidthEditBox:GetText() > "9999" ) then
@@ -28,7 +28,7 @@ end

 function DRUIDBAROptions_CheckHeight(self)
 	if ( DRUIDBAROptionsHeightEditBox:GetText() < "1" ) then
-		DRUIDBAROptionsHeightEditBox:SetText("1");
+		DRUIDBAROptionsHeightEditBox:SetText("18");
 		DruidBarKey.yvar = self:GetNumber();
 		DruidBarKey.tempH = DruidBarKey.yvar;
 	elseif( DRUIDBAROptionsHeightEditBox:GetText() > "999" ) then
diff --git a/t b/t
new file mode 100644
index 0000000..c60b135
--- /dev/null
+++ b/t
@@ -0,0 +1,44 @@
+diff --git a/DruidBar.lua b/DruidBar.lua
+index 0273090..1407649 100644
+--- a/DruidBar.lua
++++ b/DruidBar.lua
+@@ -5,7 +5,7 @@ function DruidBar_OnLoad()
+ 	DruidBarUpdateFrame:RegisterEvent("UNIT_AURA");
+ 	DruidBarUpdateFrame:RegisterEvent("UNIT_MAXPOWER");
+ 	DruidBarUpdateFrame:RegisterEvent("COMBAT_LOG_EVENT");
+-	DruidBarUpdateFrame:RegisterEvent("ADDON_LOADED");
++	DruidBarUpdateFrame:RegisterEvent("VARIABLES_LOADED");

+ 	DruidBarUpdateFrame:RegisterEvent("UNIT_POWER_UPDATE");
+ 	DruidBarUpdateFrame:RegisterEvent("INSTANCE_BOOT_STOP");
+ 	DruidBarUpdateFrame:RegisterEvent("INSTANCE_BOOT_START");
+@@ -53,7 +53,7 @@ function DruidBar_OnEvent(self, event,...)
+ 		return;
+ 	end
+ 
+-	if event == "ADDON_LOADED" then
++	if event == "VARIABLES_LOADED" then

+ 		Load_Variables(className);
+ 	elseif className and className == "DRUID" and DruidBarKey.Enabled then
+ 		-- Show DruidBarUpdateFrame if hidden
+diff --git a/Options.lua b/Options.lua
+index 1655d32..09bbb6e 100644
+--- a/Options.lua
++++ b/Options.lua
+@@ -13,7 +13,7 @@ end
+ 
+ function DRUIDBAROptions_CheckWidth(self)
+ 	if ( DRUIDBAROptionsWidthEditBox:GetText() < "1" ) then
+-		DRUIDBAROptionsWidthEditBox:SetText("1");
++		DRUIDBAROptionsWidthEditBox:SetText("150");

+ 		DruidBarKey.xvar = self:GetNumber();
+ 		DruidBarKey.tempW = DruidBarKey.xvar;
+ 	elseif( DRUIDBAROptionsWidthEditBox:GetText() > "9999" ) then
+@@ -28,7 +28,7 @@ end
+ 
+ function DRUIDBAROptions_CheckHeight(self)
+ 	if ( DRUIDBAROptionsHeightEditBox:GetText() < "1" ) then
+-		DRUIDBAROptionsHeightEditBox:SetText("1");
++		DRUIDBAROptionsHeightEditBox:SetText("18");

+ 		DruidBarKey.yvar = self:GetNumber();
+ 		DruidBarKey.tempH = DruidBarKey.yvar;
+ 	elseif( DRUIDBAROptionsHeightEditBox:GetText() > "999" ) then