Final code changes for 0.3
Tek Hudson [08-10-19 - 08:44]
Final code changes for 0.3
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 @@
+[1;33mdiff --git a/DruidBar.lua b/DruidBar.lua[m
+[1;33mindex 0273090..1407649 100644[m
+[1;33m--- a/DruidBar.lua[m
+[1;33m+++ b/DruidBar.lua[m
+[1;35m@@ -5,7 +5,7 @@[m [mfunction DruidBar_OnLoad()[m
+ DruidBarUpdateFrame:RegisterEvent("UNIT_AURA");[m
+ DruidBarUpdateFrame:RegisterEvent("UNIT_MAXPOWER");[m
+ DruidBarUpdateFrame:RegisterEvent("COMBAT_LOG_EVENT");[m
+[1;31m- DruidBarUpdateFrame:RegisterEvent("ADDON_LOADED");[m
+[1;32m+[m [1;32mDruidBarUpdateFrame:RegisterEvent("VARIABLES_LOADED");[m[41m
[m
+ DruidBarUpdateFrame:RegisterEvent("UNIT_POWER_UPDATE");[m
+ DruidBarUpdateFrame:RegisterEvent("INSTANCE_BOOT_STOP");[m
+ DruidBarUpdateFrame:RegisterEvent("INSTANCE_BOOT_START");[m
+[1;35m@@ -53,7 +53,7 @@[m [mfunction DruidBar_OnEvent(self, event,...)[m
+ return;[m
+ end[m
+ [m
+[1;31m- if event == "ADDON_LOADED" then[m
+[1;32m+[m [1;32mif event == "VARIABLES_LOADED" then[m[41m
[m
+ Load_Variables(className);[m
+ elseif className and className == "DRUID" and DruidBarKey.Enabled then[m
+ -- Show DruidBarUpdateFrame if hidden[m
+[1;33mdiff --git a/Options.lua b/Options.lua[m
+[1;33mindex 1655d32..09bbb6e 100644[m
+[1;33m--- a/Options.lua[m
+[1;33m+++ b/Options.lua[m
+[1;35m@@ -13,7 +13,7 @@[m [mend[m
+ [m
+ function DRUIDBAROptions_CheckWidth(self)[m
+ if ( DRUIDBAROptionsWidthEditBox:GetText() < "1" ) then[m
+[1;31m- DRUIDBAROptionsWidthEditBox:SetText("1");[m
+[1;32m+[m [1;32mDRUIDBAROptionsWidthEditBox:SetText("150");[m[41m
[m
+ DruidBarKey.xvar = self:GetNumber();[m
+ DruidBarKey.tempW = DruidBarKey.xvar;[m
+ elseif( DRUIDBAROptionsWidthEditBox:GetText() > "9999" ) then[m
+[1;35m@@ -28,7 +28,7 @@[m [mend[m
+ [m
+ function DRUIDBAROptions_CheckHeight(self)[m
+ if ( DRUIDBAROptionsHeightEditBox:GetText() < "1" ) then[m
+[1;31m- DRUIDBAROptionsHeightEditBox:SetText("1");[m
+[1;32m+[m [1;32mDRUIDBAROptionsHeightEditBox:SetText("18");[m[41m
[m
+ DruidBarKey.yvar = self:GetNumber();[m
+ DruidBarKey.tempH = DruidBarKey.yvar;[m
+ elseif( DRUIDBAROptionsHeightEditBox:GetText() > "999" ) then[m