Framework update
This commit is contained in:
+3
-1
@@ -1,4 +1,6 @@
|
||||
## Interface: 90207
|
||||
## Interface-Mainline: 90207
|
||||
## Interface-BCC: 20504
|
||||
## Interface-Wrath: 30400
|
||||
## Title: Details! Damage Meter
|
||||
## Notes: Essential tool to impress that chick in your raid.
|
||||
## SavedVariables: _detalhes_global
|
||||
|
||||
+15
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 331
|
||||
local dversion = 332
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
@@ -722,6 +722,20 @@ function DF:SetFontShadow (fontString, r, g, b, a, x, y)
|
||||
fontString:SetShadowOffset (x, y)
|
||||
end
|
||||
|
||||
function DF:SetFontRotation(fontString, degrees)
|
||||
if (type(degrees) == "number") then
|
||||
if (not fontString.__rotationAnimation) then
|
||||
fontString.__rotationAnimation = DF:CreateAnimationHub(fontString)
|
||||
fontString.__rotationAnimation.rotator = DF:CreateAnimation(fontString.__rotationAnimation, "rotation", 1, 0, 0)
|
||||
fontString.__rotationAnimation.rotator:SetEndDelay(math.huge)
|
||||
fontString.__rotationAnimation.rotator:SetSmoothProgress(1)
|
||||
end
|
||||
fontString.__rotationAnimation.rotator:SetDegrees(degrees)
|
||||
fontString.__rotationAnimation:Play()
|
||||
fontString.__rotationAnimation:Pause()
|
||||
end
|
||||
end
|
||||
|
||||
function DF:AddClassColorToText (text, class)
|
||||
if (type (class) ~= "string") then
|
||||
return DF:RemoveRealName (text)
|
||||
|
||||
+16
-1
@@ -182,7 +182,21 @@ local LabelMetaFunctions = _G[DF.GlobalWidgetControlNames ["label"]]
|
||||
local smember_outline = function (_object, _value)
|
||||
DF:SetFontOutline (_object.label, _value)
|
||||
end
|
||||
|
||||
|
||||
local smember_rotation = function(object, rotation)
|
||||
if (type(rotation) == "number") then
|
||||
if (not object.__rotationAnimation) then
|
||||
object.__rotationAnimation = DF:CreateAnimationHub(object.label)
|
||||
object.__rotationAnimation.rotator = DF:CreateAnimation(object.__rotationAnimation, "rotation", 1, 0, 0)
|
||||
object.__rotationAnimation.rotator:SetEndDelay(math.huge)
|
||||
object.__rotationAnimation.rotator:SetSmoothProgress(1)
|
||||
end
|
||||
object.__rotationAnimation.rotator:SetDegrees(rotation)
|
||||
object.__rotationAnimation:Play()
|
||||
object.__rotationAnimation:Pause()
|
||||
end
|
||||
end
|
||||
|
||||
LabelMetaFunctions.SetMembers = LabelMetaFunctions.SetMembers or {}
|
||||
LabelMetaFunctions.SetMembers["show"] = smember_show
|
||||
LabelMetaFunctions.SetMembers["hide"] = smember_hide
|
||||
@@ -200,6 +214,7 @@ local LabelMetaFunctions = _G[DF.GlobalWidgetControlNames ["label"]]
|
||||
LabelMetaFunctions.SetMembers["textsize"] = smember_textsize--alias
|
||||
LabelMetaFunctions.SetMembers["shadow"] = smember_outline
|
||||
LabelMetaFunctions.SetMembers["outline"] = smember_outline--alias
|
||||
LabelMetaFunctions.SetMembers["rotation"] = smember_rotation--alias
|
||||
|
||||
LabelMetaFunctions.__newindex = function (_table, _key, _value)
|
||||
local func = LabelMetaFunctions.SetMembers [_key]
|
||||
|
||||
+6
-3
@@ -5275,7 +5275,7 @@ DF.IconRowFunctions = {
|
||||
end
|
||||
end,
|
||||
|
||||
SetIcon = function (self, spellId, borderColor, startTime, duration, forceTexture, descText, count, debuffType, caster, canStealOrPurge, spellName, isBuff)
|
||||
SetIcon = function (self, spellId, borderColor, startTime, duration, forceTexture, descText, count, debuffType, caster, canStealOrPurge, spellName, isBuff, modRate)
|
||||
|
||||
local actualSpellName, _, spellIcon = GetSpellInfo (spellId)
|
||||
|
||||
@@ -5284,6 +5284,7 @@ DF.IconRowFunctions = {
|
||||
end
|
||||
|
||||
spellName = spellName or actualSpellName or "unknown_aura"
|
||||
modRate = modRate or 1
|
||||
|
||||
if (spellIcon) then
|
||||
local iconFrame = self:GetIcon()
|
||||
@@ -5297,14 +5298,14 @@ DF.IconRowFunctions = {
|
||||
end
|
||||
|
||||
if (startTime) then
|
||||
CooldownFrame_Set (iconFrame.Cooldown, startTime, duration, true, true)
|
||||
CooldownFrame_Set (iconFrame.Cooldown, startTime, duration, true, true, modRate)
|
||||
|
||||
if (self.options.show_text) then
|
||||
iconFrame.CountdownText:Show()
|
||||
|
||||
local now = GetTime()
|
||||
|
||||
iconFrame.timeRemaining = startTime + duration - now
|
||||
iconFrame.timeRemaining = (startTime + duration - now) / modRate
|
||||
iconFrame.expirationTime = startTime + duration
|
||||
|
||||
local formattedTime = (iconFrame.timeRemaining > 0) and self.options.decimal_timer and iconFrame.parentIconRow.FormatCooldownTimeDecimal(iconFrame.timeRemaining) or iconFrame.parentIconRow.FormatCooldownTime(iconFrame.timeRemaining) or ""
|
||||
@@ -5328,6 +5329,7 @@ DF.IconRowFunctions = {
|
||||
end
|
||||
|
||||
iconFrame.Cooldown:SetReverse (self.options.cooldown_reverse)
|
||||
iconFrame.Cooldown:SetDrawSwipe (self.options.cooldown_swipe_enabled)
|
||||
iconFrame.Cooldown:SetHideCountdownNumbers (self.options.surpress_blizzard_cd_timer)
|
||||
else
|
||||
iconFrame.timeRemaining = nil
|
||||
@@ -5620,6 +5622,7 @@ local default_icon_row_options = {
|
||||
on_tick_cooldown_update = true,
|
||||
decimal_timer = false,
|
||||
cooldown_reverse = false,
|
||||
cooldown_swipe = true,
|
||||
}
|
||||
|
||||
function DF:CreateIconRow (parent, name, options)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 10001
|
||||
_detalhes.alpha_build_counter = 10001 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 10008
|
||||
_detalhes.alpha_build_counter = 10008 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.bcc_counter = 41
|
||||
_detalhes.wotlk_counter = 4
|
||||
_detalhes.dont_open_news = true
|
||||
|
||||
@@ -4143,13 +4143,13 @@ function gump:CreateNewLine (instancia, index)
|
||||
icone_classe:SetTexCoord (.75, 1, .75, 1)
|
||||
newLine.icone_classe = icone_classe
|
||||
|
||||
local icon_frame = CreateFrame ("frame", "DetailsBarra_IconFrame_" .. instancia.meu_id .. "_" .. index, newLine.statusbar)
|
||||
icon_frame:SetPoint ("topleft", icone_classe, "topleft")
|
||||
icon_frame:SetPoint ("bottomright", icone_classe, "bottomright")
|
||||
icon_frame:SetFrameLevel (newLine.statusbar:GetFrameLevel()+1)
|
||||
icon_frame.instance_id = instancia.meu_id
|
||||
icon_frame.row = newLine
|
||||
newLine.icon_frame = icon_frame
|
||||
local iconFrame = CreateFrame ("frame", "DetailsBarra_IconFrame_" .. instancia.meu_id .. "_" .. index, newLine.statusbar)
|
||||
iconFrame:SetPoint ("topleft", icone_classe, "topleft")
|
||||
iconFrame:SetPoint ("bottomright", icone_classe, "bottomright")
|
||||
iconFrame:SetFrameLevel (newLine.statusbar:GetFrameLevel()+1)
|
||||
iconFrame.instance_id = instancia.meu_id
|
||||
iconFrame.row = newLine
|
||||
newLine.icon_frame = iconFrame
|
||||
|
||||
icone_classe:SetPoint ("left", newLine, "left")
|
||||
newLine.statusbar:SetPoint ("topleft", icone_classe, "topright")
|
||||
|
||||
Reference in New Issue
Block a user