diff --git a/IceBarElement.lua b/IceBarElement.lua
index b595b59..43e0930 100644
--- a/IceBarElement.lua
+++ b/IceBarElement.lua
@@ -1,4 +1,5 @@
local AceOO = AceLibrary("AceOO-2.0")
+local DogTag = AceLibrary("LibDogTag-2.0")
IceBarElement = AceOO.Class(IceElement)
IceBarElement.virtual = true
@@ -42,7 +43,8 @@ function IceBarElement.prototype:GetDefaultSettings()
settings["barFontSize"] = 12
settings["lockTextAlpha"] = true
settings["textVisible"] = {upper = true, lower = true}
- settings["brackets"] = true
+ settings["upperText"] = ''
+ settings["lowerText"] = ''
return settings
end
@@ -190,19 +192,40 @@ function IceBarElement.prototype:GetOptions()
end,
order = 15
},
- brackets = {
- type = 'toggle',
- name = 'Brackets around lower text',
- desc = 'Toggle brackets visibility',
+
+ upperTextString = {
+ type = 'text',
+ name = 'Upper Text',
+ desc = 'The upper text to display under this bar (accepts LibDogTag formatting)\n\nSee http://www.wowace.com/wiki/LibDogTag-2.0/ for tag info',
get = function()
- return self.moduleSettings.brackets
+ return self.moduleSettings.upperText
end,
set = function(v)
- self.moduleSettings.brackets = v
+ if v ~= '' and v ~= nil then
+ v = DogTag:FixCasing(v)
+ end
+
+ self.moduleSettings.upperText = v
self:Redraw()
end,
- order = 16
},
+
+ lowerTextString = {
+ type = 'text',
+ name = 'Lower Text',
+ desc = 'The lower text to display under this bar (accepts LibDogTag formatting)\n\nSee http://www.wowace.com/wiki/LibDogTag-2.0/ for tag info',
+ get = function()
+ return self.moduleSettings.lowerText
+ end,
+ set = function(v)
+ if v ~= '' and v ~= nil then
+ v = DogTag:FixCasing(v)
+ end
+
+ self.moduleSettings.lowerText = v
+ self:Redraw()
+ end,
+ }
}
}
diff --git a/IceHUD.toc b/IceHUD.toc
index b4de5b5..4b9711c 100644
--- a/IceHUD.toc
+++ b/IceHUD.toc
@@ -5,8 +5,8 @@
## Notes: Another HUD addon
## Version: 1.1 ($Revision$)
## SavedVariables: IceCoreDB
-## OptionalDeps: Ace2, GratuityLib, LibSharedMedia, WaterfallLib, MobHealth, Deformat
-## X-Embeds: Ace2, GratuityLib, LibSharedMedia, WaterfallLib, Deformat
+## OptionalDeps: Ace2, GratuityLib, LibSharedMedia-2.0, WaterfallLib, MobHealth, Deformat-2.0, LibDogTag-2.0
+## X-Embeds: Ace2, GratuityLib, LibSharedMedia-2.0, WaterfallLib, Deformat-2.0, LibDogTag-2.0
## X-Category: UnitFrame
## X-Date: $Date$
## X-Website: http://www.wowace.com/forums/index.php/topic,1705.0.html
diff --git a/embeds.xml b/embeds.xml
index 42d9af9..c3fe48c 100644
--- a/embeds.xml
+++ b/embeds.xml
@@ -8,7 +8,9 @@
+
+
diff --git a/modules/CastBar.lua b/modules/CastBar.lua
index 50738e4..088c440 100644
--- a/modules/CastBar.lua
+++ b/modules/CastBar.lua
@@ -86,6 +86,63 @@ function CastBar.prototype:GetOptions()
order = 42
}
+ opts["textSettings"] =
+ {
+ type = 'group',
+ name = '|c' .. self.configColor .. 'Text Settings|r',
+ desc = 'Settings related to texts',
+ order = 32,
+ disabled = function()
+ return not self.moduleSettings.enabled
+ end,
+ args = {
+ fontsize = {
+ type = 'range',
+ name = 'Bar Font Size',
+ desc = 'Bar Font Size',
+ get = function()
+ return self.moduleSettings.barFontSize
+ end,
+ set = function(v)
+ self.moduleSettings.barFontSize = v
+ self:Redraw()
+ end,
+ min = 8,
+ max = 20,
+ step = 1,
+ order = 11
+ },
+
+ lockFontAlpha = {
+ type = "toggle",
+ name = "Lock Bar Text Alpha",
+ desc = "Locks text alpha to 100%",
+ get = function()
+ return self.moduleSettings.lockTextAlpha
+ end,
+ set = function(v)
+ self.moduleSettings.lockTextAlpha = v
+ self:Redraw()
+ end,
+ order = 13
+ },
+
+ upperTextVisible = {
+ type = 'toggle',
+ name = 'Spell cast text visible',
+ desc = 'Toggle spell cast text visibility',
+ get = function()
+ return self.moduleSettings.textVisible['upper']
+ end,
+ set = function(v)
+ self.moduleSettings.textVisible['upper'] = v
+ self:Redraw()
+ end,
+ order = 14
+ }
+ }
+ }
+
return opts
end
diff --git a/modules/PetHealth.lua b/modules/PetHealth.lua
index a3e1620..a95dcb1 100644
--- a/modules/PetHealth.lua
+++ b/modules/PetHealth.lua
@@ -1,4 +1,5 @@
local AceOO = AceLibrary("AceOO-2.0")
+local DogTag = AceLibrary("LibDogTag-2.0")
local PetHealth = AceOO.Class(IceUnitBar)
@@ -20,9 +21,13 @@ end
-- OVERRIDE
function PetHealth.prototype:GetDefaultSettings()
local settings = PetHealth.super.prototype.GetDefaultSettings(self)
+
settings["side"] = IceCore.Side.Left
settings["offset"] = -1
settings.scale = 0.7
+ settings["upperText"] = ""
+ settings["lowerText"] = "[PercentHP:Round]"
+
return settings
end
@@ -104,7 +109,13 @@ function PetHealth.prototype:Update(unit)
self:UpdateBar(self.health/self.maxHealth, color)
- self:SetBottomText1(self.healthPercentage)
+
+ if self.moduleSettings.upperText ~= nil and self.moduleSettings.upperText ~= '' then
+ self:SetBottomText1(DogTag:Evaluate("pet", self.moduleSettings.upperText))
+ end
+ if self.moduleSettings.lowerText ~= nil and self.moduleSettings.lowerText ~= '' then
+ self:SetBottomText2(DogTag:Evaluate("pet", self.moduleSettings.lowerText))
+ end
end
diff --git a/modules/PetMana.lua b/modules/PetMana.lua
index 672476d..5505216 100644
--- a/modules/PetMana.lua
+++ b/modules/PetMana.lua
@@ -1,4 +1,5 @@
local AceOO = AceLibrary("AceOO-2.0")
+local DogTag = AceLibrary("LibDogTag-2.0")
local PetMana = AceOO.Class(IceUnitBar)
@@ -18,9 +19,13 @@ end
-- OVERRIDE
function PetMana.prototype:GetDefaultSettings()
local settings = PetMana.super.prototype.GetDefaultSettings(self)
+
settings["side"] = IceCore.Side.Right
settings["offset"] = -1
settings.scale = 0.7
+ settings["upperText"] = ""
+ settings["lowerText"] = "[PercentMP:Round]"
+
return settings
end
@@ -115,7 +120,13 @@ function PetMana.prototype:Update(unit)
end
self:UpdateBar(self.mana/self.maxMana, color)
- self:SetBottomText1(self.manaPercentage)
+
+ if self.moduleSettings.upperText ~= nil and self.moduleSettings.upperText ~= '' then
+ self:SetBottomText1(DogTag:Evaluate("player", self.moduleSettings.upperText))
+ end
+ if self.moduleSettings.lowerText ~= nil and self.moduleSettings.lowerText ~= '' then
+ self:SetBottomText2(DogTag:Evaluate("player", self.moduleSettings.lowerText))
+ end
end
diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua
index d7eba00..b3e058c 100644
--- a/modules/PlayerHealth.lua
+++ b/modules/PlayerHealth.lua
@@ -1,4 +1,5 @@
local AceOO = AceLibrary("AceOO-2.0")
+local DogTag = AceLibrary("LibDogTag-2.0")
local PlayerHealth = AceOO.Class(IceUnitBar)
@@ -14,9 +15,13 @@ end
function PlayerHealth.prototype:GetDefaultSettings()
local settings = PlayerHealth.super.prototype.GetDefaultSettings(self)
+
settings["side"] = IceCore.Side.Left
settings["offset"] = 1
settings["hideBlizz"] = true
+ settings["upperText"] = "[PercentHP:Round]"
+ settings["lowerText"] = "[FractionalHP:Color(00ff00):Bracket]"
+
return settings
end
@@ -134,8 +139,13 @@ function PlayerHealth.prototype:Update(unit)
end
self:UpdateBar(self.health/self.maxHealth, color)
- self:SetBottomText1(self.healthPercentage)
- self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), textColor)
+
+ if self.moduleSettings.upperText ~= nil and self.moduleSettings.upperText ~= '' then
+ self:SetBottomText1(DogTag:Evaluate("player", self.moduleSettings.upperText))
+ end
+ if self.moduleSettings.lowerText ~= nil and self.moduleSettings.lowerText ~= '' then
+ self:SetBottomText2(DogTag:Evaluate("player", self.moduleSettings.lowerText))
+ end
end
diff --git a/modules/PlayerMana.lua b/modules/PlayerMana.lua
index 744323f..48672c0 100644
--- a/modules/PlayerMana.lua
+++ b/modules/PlayerMana.lua
@@ -1,4 +1,5 @@
local AceOO = AceLibrary("AceOO-2.0")
+local DogTag = AceLibrary("LibDogTag-2.0")
local PlayerMana = AceOO.Class(IceUnitBar)
@@ -19,10 +20,14 @@ end
-- OVERRIDE
function PlayerMana.prototype:GetDefaultSettings()
local settings = PlayerMana.super.prototype.GetDefaultSettings(self)
+
settings["side"] = IceCore.Side.Right
settings["offset"] = 1
settings["tickerEnabled"] = true
settings["tickerAlpha"] = 0.5
+ settings["upperText"] = "[PercentMP:Round]"
+ settings["lowerText"] = "[FractionalMP:Color(0000ff)]"
+
return settings
end
@@ -181,7 +186,7 @@ function PlayerMana.prototype:Update(unit)
self.tickerFrame:SetStatusBarColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha))
end
-
+--[[
-- extra hack for whiny rogues (are there other kind?)
local displayPercentage = self.manaPercentage
if (self.manaType == 3) then
@@ -197,6 +202,14 @@ function PlayerMana.prototype:Update(unit)
amount = self:GetFormattedText(self.mana)
end
self:SetBottomText2(amount, color)
+]]
+
+ if self.moduleSettings.upperText ~= nil and self.moduleSettings.upperText ~= '' then
+ self:SetBottomText1(DogTag:Evaluate("player", self.moduleSettings.upperText))
+ end
+ if self.moduleSettings.lowerText ~= nil and self.moduleSettings.lowerText ~= '' then
+ self:SetBottomText2(DogTag:Evaluate("player", self.moduleSettings.lowerText))
+ end
end
diff --git a/modules/TargetHealth.lua b/modules/TargetHealth.lua
index c8f2611..9203218 100644
--- a/modules/TargetHealth.lua
+++ b/modules/TargetHealth.lua
@@ -1,4 +1,5 @@
local AceOO = AceLibrary("AceOO-2.0")
+local DogTag = AceLibrary("LibDogTag-2.0")
local TargetHealth = AceOO.Class(IceUnitBar)
@@ -17,11 +18,15 @@ end
function TargetHealth.prototype:GetDefaultSettings()
local settings = TargetHealth.super.prototype.GetDefaultSettings(self)
+
settings["side"] = IceCore.Side.Left
settings["offset"] = 2
settings["mobhealth"] = (MobHealth3 ~= nil)
settings["classColor"] = false
settings["hideBlizz"] = true
+ settings["upperText"] = "[PercentHP:Round]"
+ settings["lowerText"] = "[FractionalHP:Color(00ff00):Bracket]"
+
return settings
end
@@ -163,6 +168,7 @@ function TargetHealth.prototype:Update(unit)
end
self:UpdateBar(self.health/self.maxHealth, self.color)
+--[[
self:SetBottomText1(self.healthPercentage)
@@ -182,6 +188,14 @@ function TargetHealth.prototype:Update(unit)
else
self:SetBottomText2()
end
+]]
+
+ if self.moduleSettings.upperText ~= nil and self.moduleSettings.upperText ~= '' then
+ self:SetBottomText1(DogTag:Evaluate("target", self.moduleSettings.upperText))
+ end
+ if self.moduleSettings.lowerText ~= nil and self.moduleSettings.lowerText ~= '' then
+ self:SetBottomText2(DogTag:Evaluate("target", self.moduleSettings.lowerText))
+ end
end
diff --git a/modules/TargetMana.lua b/modules/TargetMana.lua
index 9c4a748..31b845d 100644
--- a/modules/TargetMana.lua
+++ b/modules/TargetMana.lua
@@ -1,4 +1,5 @@
local AceOO = AceLibrary("AceOO-2.0")
+local DogTag = AceLibrary("LibDogTag-2.0")
local TargetMana = AceOO.Class(IceUnitBar)
@@ -16,8 +17,12 @@ end
function TargetMana.prototype:GetDefaultSettings()
local settings = TargetMana.super.prototype.GetDefaultSettings(self)
+
settings["side"] = IceCore.Side.Right
settings["offset"] = 2
+ settings["upperText"] = "[PercentMP:Round]"
+ settings["lowerText"] = "[FractionalMP:Color(0000ff)]"
+
return settings
end
@@ -74,8 +79,16 @@ function TargetMana.prototype:Update(unit)
end
self:UpdateBar(self.mana/self.maxMana, color)
- self:SetBottomText1(self.manaPercentage)
- self:SetBottomText2(self:GetFormattedText(self.mana, self.maxMana), color)
+
+-- self:SetBottomText1(self.manaPercentage)
+-- self:SetBottomText2(self:GetFormattedText(self.mana, self.maxMana), color)
+
+ if self.moduleSettings.upperText ~= nil and self.moduleSettings.upperText ~= '' then
+ self:SetBottomText1(DogTag:Evaluate("target", self.moduleSettings.upperText))
+ end
+ if self.moduleSettings.lowerText ~= nil and self.moduleSettings.lowerText ~= '' then
+ self:SetBottomText2(DogTag:Evaluate("target", self.moduleSettings.lowerText))
+ end
end