Updated LibOpenRaid and DetailsFramework

This commit is contained in:
Tercio Jose
2022-10-09 19:47:56 -03:00
parent 9974a87119
commit 944178f76f
126 changed files with 15502 additions and 15495 deletions
+83 -83
View File
@@ -13,7 +13,7 @@ function _detalhes:PlayGlow (frame)
--PlaySound ("LFG_Rewards", "master")
end
--> WatchFrame copy, got removed on WoD
--WatchFrame copy, got removed on WoD
local function DetailsTutorialAlertFrame_OnFinishSlideIn (frame)
frame.ScrollChild.Shine:Show();
frame.ScrollChild.IconShine:Show();
@@ -85,40 +85,40 @@ function _detalhes.PlayBestDamageOnGuild (damage)
damage = damage or 100000000
--> create the main frame
local DetailsNewDamageRecord = CreateFrame ("frame", "DetailsNewDamageRecordAnimationFrame", UIParent)
DetailsNewDamageRecord:SetPoint ("CENTER", UIParent, "CENTER", 0, -200)
DetailsNewDamageRecord:SetSize (300, 300)
--create the main frame
local DetailsNewDamageRecord = CreateFrame("frame", "DetailsNewDamageRecordAnimationFrame", UIParent)
DetailsNewDamageRecord:SetPoint("CENTER", UIParent, "CENTER", 0, -200)
DetailsNewDamageRecord:SetSize(300, 300)
--> single animation group
--single animation group
local MainAnimationGroup = DetailsNewDamageRecord:CreateAnimationGroup ("DetailsNewDamageRecordAnimationGroup")
MainAnimationGroup:SetLooping ("NONE")
--> widgets:
--widgets:
----------------------------------------------
local BaseTexture = DetailsNewDamageRecord:CreateTexture ("BaseTextureTexture", "ARTWORK")
BaseTexture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Background-Mini]])
local BaseTexture = DetailsNewDamageRecord:CreateTexture("BaseTextureTexture", "ARTWORK")
BaseTexture:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Background-Mini]])
BaseTexture:SetDrawLayer ("ARTWORK", -5)
BaseTexture:SetPoint ("center", DetailsNewDamageRecord, "center", 0, 0)
BaseTexture:SetSize (256, 64)
BaseTexture:SetPoint("center", DetailsNewDamageRecord, "center", 0, 0)
BaseTexture:SetSize(256, 64)
BaseTexture:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
--> animations for BaseTexture
--animations for BaseTexture
BaseTexture.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
BaseTexture.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
BaseTexture.alpha:SetTarget (BaseTexture)
BaseTexture.alpha:SetOrder (1)
BaseTexture.alpha:SetDuration (0.14869952201843)
BaseTexture.alpha:SetDuration(0.14869952201843)
BaseTexture.alpha:SetStartDelay (0)
BaseTexture.alpha:SetEndDelay (0)
BaseTexture.alpha:SetFromAlpha (0)
BaseTexture.alpha:SetToAlpha (1)
BaseTexture.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
BaseTexture.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
BaseTexture.alpha:SetTarget (BaseTexture)
BaseTexture.alpha:SetOrder (2)
BaseTexture.alpha:SetDuration (1)
BaseTexture.alpha:SetDuration(1)
BaseTexture.alpha:SetStartDelay (5)
BaseTexture.alpha:SetEndDelay (0)
BaseTexture.alpha:SetFromAlpha (1)
@@ -126,11 +126,11 @@ function _detalhes.PlayBestDamageOnGuild (damage)
----------------------------------------------
local BigFlash = DetailsNewDamageRecord:CreateTexture ("BigFlashTexture", "OVERLAY")
BigFlash:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
local BigFlash = DetailsNewDamageRecord:CreateTexture("BigFlashTexture", "OVERLAY")
BigFlash:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
BigFlash:SetDrawLayer ("OVERLAY", 0)
BigFlash:SetPoint ("center", DetailsNewDamageRecord, "center", -2, 2)
BigFlash:SetSize (314, 100)
BigFlash:SetPoint("center", DetailsNewDamageRecord, "center", -2, 2)
BigFlash:SetSize(314, 100)
BigFlash:SetDesaturated (false)
BigFlash:SetTexCoord (0.0010000000149012, 0.77400001525879, 0.0010000000149012, 0.65800003051758)
if (0 ~= 0) then
@@ -138,22 +138,22 @@ function _detalhes.PlayBestDamageOnGuild (damage)
end
BigFlash:SetVertexColor (0.96470373868942, 0.98823314905167, 0.99999779462814, 0.99999779462814)
BigFlash:SetAlpha (1)
BigFlash:SetBlendMode ("ADD")
BigFlash:SetBlendMode("ADD")
--> animations for BigFlash
--animations for BigFlash
BigFlash.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
BigFlash.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
BigFlash.alpha:SetTarget (BigFlash)
BigFlash.alpha:SetOrder (1)
BigFlash.alpha:SetDuration (0.11600000411272)
BigFlash.alpha:SetDuration(0.11600000411272)
BigFlash.alpha:SetStartDelay (0)
BigFlash.alpha:SetEndDelay (0)
BigFlash.alpha:SetFromAlpha (0)
BigFlash.alpha:SetToAlpha (1)
BigFlash.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
BigFlash.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
BigFlash.alpha:SetTarget (BigFlash)
BigFlash.alpha:SetOrder (2)
BigFlash.alpha:SetDuration (0.31600001454353)
BigFlash.alpha:SetDuration(0.31600001454353)
BigFlash.alpha:SetStartDelay (0)
BigFlash.alpha:SetEndDelay (0)
BigFlash.alpha:SetFromAlpha (1)
@@ -161,11 +161,11 @@ function _detalhes.PlayBestDamageOnGuild (damage)
----------------------------------------------
local FlashSwipe = DetailsNewDamageRecord:CreateTexture ("FlashSwipeTexture", "OVERLAY")
FlashSwipe:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
local FlashSwipe = DetailsNewDamageRecord:CreateTexture("FlashSwipeTexture", "OVERLAY")
FlashSwipe:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
FlashSwipe:SetDrawLayer ("OVERLAY", 7)
FlashSwipe:SetPoint ("center", DetailsNewDamageRecord, "center", -99, 0)
FlashSwipe:SetSize (100, 57)
FlashSwipe:SetPoint("center", DetailsNewDamageRecord, "center", -99, 0)
FlashSwipe:SetSize(100, 57)
FlashSwipe:SetDesaturated (false)
FlashSwipe:SetTexCoord (0.78199996948242, 0.91900001525879, 0.0010000000149012, 0.2760000038147)
if (0 ~= 0) then
@@ -173,29 +173,29 @@ function _detalhes.PlayBestDamageOnGuild (damage)
end
FlashSwipe:SetVertexColor (0.86666476726532, 0.54117530584335, 0, 0.99999779462814)
FlashSwipe:SetAlpha (1)
FlashSwipe:SetBlendMode ("ADD")
FlashSwipe:SetBlendMode("ADD")
--> animations for FlashSwipe
--animations for FlashSwipe
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
FlashSwipe.alpha:SetTarget (FlashSwipe)
FlashSwipe.alpha:SetOrder (1)
FlashSwipe.alpha:SetDuration (0.31600001454353)
FlashSwipe.alpha:SetDuration(0.31600001454353)
FlashSwipe.alpha:SetStartDelay (0.20000000298023)
FlashSwipe.alpha:SetEndDelay (0)
FlashSwipe.alpha:SetFromAlpha (0)
FlashSwipe.alpha:SetToAlpha (0.501051902771)
FlashSwipe.translation = MainAnimationGroup:CreateAnimation ("TRANSLATION")
FlashSwipe.translation = MainAnimationGroup:CreateAnimation("TRANSLATION")
FlashSwipe.translation:SetTarget (FlashSwipe)
FlashSwipe.translation:SetOrder (1)
FlashSwipe.translation:SetDuration (0.81599998474121)
FlashSwipe.translation:SetDuration(0.81599998474121)
FlashSwipe.translation:SetStartDelay (0.20000000298023)
FlashSwipe.translation:SetEndDelay (0)
FlashSwipe.translation:SetOffset (200, 0)
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
FlashSwipe.alpha:SetTarget (FlashSwipe)
FlashSwipe.alpha:SetOrder (1)
FlashSwipe.alpha:SetDuration (0.31600001454353)
FlashSwipe.alpha:SetDuration(0.31600001454353)
FlashSwipe.alpha:SetStartDelay (0.69999998807907)
FlashSwipe.alpha:SetEndDelay (0)
FlashSwipe.alpha:SetFromAlpha (0.501051902771)
@@ -203,11 +203,11 @@ function _detalhes.PlayBestDamageOnGuild (damage)
----------------------------------------------
local Portrait = DetailsNewDamageRecord:CreateTexture ("PortraitTexture", "OVERLAY")
Portrait:SetTexture ([[Interface\ARCHEOLOGY\ARCH-FLAREEFFECT]])
local Portrait = DetailsNewDamageRecord:CreateTexture("PortraitTexture", "OVERLAY")
Portrait:SetTexture([[Interface\ARCHEOLOGY\ARCH-FLAREEFFECT]])
Portrait:SetDrawLayer ("OVERLAY", -5)
Portrait:SetPoint ("center", DetailsNewDamageRecord, "center", 3, 0)
Portrait:SetSize (246, 44)
Portrait:SetPoint("center", DetailsNewDamageRecord, "center", 3, 0)
Portrait:SetSize(246, 44)
Portrait:SetDesaturated (false)
Portrait:SetTexCoord (0.051753740310669, 0.81701484680176, 0.086334381103516, 0.25102617263794)
if (0 ~= 0) then
@@ -215,22 +215,22 @@ function _detalhes.PlayBestDamageOnGuild (damage)
end
Portrait:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
Portrait:SetAlpha (1)
Portrait:SetBlendMode ("BLEND")
Portrait:SetBlendMode("BLEND")
--> animations for Portrait
--animations for Portrait
Portrait.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
Portrait.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
Portrait.alpha:SetTarget (Portrait)
Portrait.alpha:SetOrder (1)
Portrait.alpha:SetDuration (0.41600000858307)
Portrait.alpha:SetDuration(0.41600000858307)
Portrait.alpha:SetStartDelay (0)
Portrait.alpha:SetEndDelay (0)
Portrait.alpha:SetFromAlpha (0)
Portrait.alpha:SetToAlpha (1)
Portrait.scale = MainAnimationGroup:CreateAnimation ("SCALE")
Portrait.scale = MainAnimationGroup:CreateAnimation("SCALE")
Portrait.scale:SetTarget (Portrait)
Portrait.scale:SetOrder (1)
Portrait.scale:SetDuration (0.21600000560284)
Portrait.scale:SetDuration(0.21600000560284)
Portrait.scale:SetStartDelay (0)
Portrait.scale:SetEndDelay (0)
@@ -243,10 +243,10 @@ function _detalhes.PlayBestDamageOnGuild (damage)
end
Portrait.scale:SetOrigin ("center", 0, 0)
Portrait.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
Portrait.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
Portrait.alpha:SetTarget (Portrait)
Portrait.alpha:SetOrder (2)
Portrait.alpha:SetDuration (1)
Portrait.alpha:SetDuration(1)
Portrait.alpha:SetStartDelay (4.7000002861023)
Portrait.alpha:SetEndDelay (0)
Portrait.alpha:SetFromAlpha (1)
@@ -254,11 +254,11 @@ function _detalhes.PlayBestDamageOnGuild (damage)
----------------------------------------------
local DamageIcon = DetailsNewDamageRecord:CreateTexture ("DamageIconTexture", "OVERLAY")
DamageIcon:SetTexture ([[Interface\LFGFRAME\UI-LFG-ICON-ROLES]])
local DamageIcon = DetailsNewDamageRecord:CreateTexture("DamageIconTexture", "OVERLAY")
DamageIcon:SetTexture([[Interface\LFGFRAME\UI-LFG-ICON-ROLES]])
DamageIcon:SetDrawLayer ("OVERLAY", 2)
DamageIcon:SetPoint ("center", DetailsNewDamageRecord, "center", -97, 1)
DamageIcon:SetSize (32, 32)
DamageIcon:SetPoint("center", DetailsNewDamageRecord, "center", -97, 1)
DamageIcon:SetSize(32, 32)
DamageIcon:SetDesaturated (false)
DamageIcon:SetTexCoord (0.27200000762939, 0.51899997711182, 0.25837841033936, 0.51399997711182)
if (0 ~= 0) then
@@ -266,22 +266,22 @@ function _detalhes.PlayBestDamageOnGuild (damage)
end
DamageIcon:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
DamageIcon:SetAlpha (1)
DamageIcon:SetBlendMode ("BLEND")
DamageIcon:SetBlendMode("BLEND")
--> animations for DamageIcon
--animations for DamageIcon
DamageIcon.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
DamageIcon.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
DamageIcon.alpha:SetTarget (DamageIcon)
DamageIcon.alpha:SetOrder (1)
DamageIcon.alpha:SetDuration (0.51599997282028)
DamageIcon.alpha:SetDuration(0.51599997282028)
DamageIcon.alpha:SetStartDelay (0)
DamageIcon.alpha:SetEndDelay (0)
DamageIcon.alpha:SetFromAlpha (0)
DamageIcon.alpha:SetToAlpha (1)
DamageIcon.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
DamageIcon.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
DamageIcon.alpha:SetTarget (DamageIcon)
DamageIcon.alpha:SetOrder (2)
DamageIcon.alpha:SetDuration (1)
DamageIcon.alpha:SetDuration(1)
DamageIcon.alpha:SetStartDelay (4.5999999046326)
DamageIcon.alpha:SetEndDelay (0)
DamageIcon.alpha:SetFromAlpha (1)
@@ -291,36 +291,36 @@ function _detalhes.PlayBestDamageOnGuild (damage)
local NewDamageRecord = DetailsNewDamageRecord:CreateFontString ("NewDamageRecordFontString", "OVERLAY")
NewDamageRecord:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "OUTLINE")
NewDamageRecord:SetText ("Damage Record!")
NewDamageRecord:SetText("Damage Record!")
NewDamageRecord:SetDrawLayer ("OVERLAY", 0)
NewDamageRecord:SetPoint ("center", DetailsNewDamageRecord, "center", 18, 7)
NewDamageRecord:SetSize (181, 20)
NewDamageRecord:SetPoint("center", DetailsNewDamageRecord, "center", 18, 7)
NewDamageRecord:SetSize(181, 20)
NewDamageRecord:SetTextColor (1, 1, 1)
NewDamageRecord:SetAlpha (1)
NewDamageRecord:SetJustifyH ("CENTER")
NewDamageRecord:SetJustifyH("CENTER")
--> animations for NewDamageRecord
--animations for NewDamageRecord
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
NewDamageRecord.alpha:SetOrder (1)
NewDamageRecord.alpha:SetDuration (0.016000000759959)
NewDamageRecord.alpha:SetDuration(0.016000000759959)
NewDamageRecord.alpha:SetStartDelay (0)
NewDamageRecord.alpha:SetEndDelay (0)
NewDamageRecord.alpha:SetFromAlpha (0)
NewDamageRecord.alpha:SetToAlpha (0)
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
NewDamageRecord.alpha:SetOrder (2)
NewDamageRecord.alpha:SetDuration (0.51599997282028)
NewDamageRecord.alpha:SetDuration(0.51599997282028)
NewDamageRecord.alpha:SetStartDelay (0.40000000596046)
NewDamageRecord.alpha:SetEndDelay (4.0999999046326)
NewDamageRecord.alpha:SetFromAlpha (0)
NewDamageRecord.alpha:SetToAlpha (1)
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
NewDamageRecord.alpha:SetOrder (3)
NewDamageRecord.alpha:SetDuration (1)
NewDamageRecord.alpha:SetDuration(1)
NewDamageRecord.alpha:SetStartDelay (0.10000000149012)
NewDamageRecord.alpha:SetEndDelay (0)
NewDamageRecord.alpha:SetFromAlpha (1)
@@ -330,42 +330,42 @@ function _detalhes.PlayBestDamageOnGuild (damage)
local DamageAmount = DetailsNewDamageRecord:CreateFontString ("DamageAmountFontString", "OVERLAY")
DamageAmount:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "THICKOUTLINE")
DamageAmount:SetText (_detalhes:comma_value (damage))
DamageAmount:SetText(_detalhes:comma_value (damage))
DamageAmount:SetDrawLayer ("OVERLAY", 0)
DamageAmount:SetPoint ("center", DetailsNewDamageRecord, "center", 18, -7)
DamageAmount:SetSize (100, 20)
DamageAmount:SetPoint("center", DetailsNewDamageRecord, "center", 18, -7)
DamageAmount:SetSize(100, 20)
DamageAmount:SetTextColor (1, 1, 1)
DamageAmount:SetAlpha (1)
DamageAmount:SetJustifyH ("CENTER")
DamageAmount:SetJustifyH("CENTER")
--> animations for DamageAmount
--animations for DamageAmount
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
DamageAmount.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
DamageAmount.alpha:SetTarget (DamageAmount)
DamageAmount.alpha:SetOrder (1)
DamageAmount.alpha:SetDuration (0.016000000759959)
DamageAmount.alpha:SetDuration(0.016000000759959)
DamageAmount.alpha:SetStartDelay (0)
DamageAmount.alpha:SetEndDelay (0)
DamageAmount.alpha:SetFromAlpha (0)
DamageAmount.alpha:SetToAlpha (0)
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
DamageAmount.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
DamageAmount.alpha:SetTarget (DamageAmount)
DamageAmount.alpha:SetOrder (2)
DamageAmount.alpha:SetDuration (0.51599997282028)
DamageAmount.alpha:SetDuration(0.51599997282028)
DamageAmount.alpha:SetStartDelay (0.40000000596046)
DamageAmount.alpha:SetEndDelay (0)
DamageAmount.alpha:SetFromAlpha (0)
DamageAmount.alpha:SetToAlpha (1)
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
DamageAmount.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
DamageAmount.alpha:SetTarget (DamageAmount)
DamageAmount.alpha:SetOrder (3)
DamageAmount.alpha:SetDuration (1.0160000324249)
DamageAmount.alpha:SetDuration(1.0160000324249)
DamageAmount.alpha:SetStartDelay (4.2000002861023)
DamageAmount.alpha:SetEndDelay (0)
DamageAmount.alpha:SetFromAlpha (1)
DamageAmount.alpha:SetToAlpha (0)
--> test the animation
--test the animation
MainAnimationGroup:Play()
+110 -110
View File
@@ -21,7 +21,7 @@ function gump:NewLabel2 (parent, container, member, text, font, size, color)
if (member) then
container [member] = newFontString
end
newFontString:SetText (text)
newFontString:SetText(text)
if (size) then
_detalhes:SetFontSize (newFontString, size)
@@ -31,7 +31,7 @@ function gump:NewLabel2 (parent, container, member, text, font, size, color)
newFontString:SetTextColor (unpack (color))
end
newFontString:SetJustifyH ("LEFT")
newFontString:SetJustifyH("LEFT")
return newFontString
end
@@ -48,13 +48,13 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
local new_button
if (ischeck) then
new_button = CreateFrame ("CheckButton", FrameName, parent, inherits)
new_button = CreateFrame("CheckButton", FrameName, parent, inherits)
else
new_button = CreateFrame ("Button", FrameName, parent)
new_button = CreateFrame("Button", FrameName, parent)
end
new_button:SetWidth (w)
new_button:SetHeight (h)
new_button:SetWidth(w)
new_button:SetHeight(h)
if (not pic_down and pic_up) then
pic_down = pic_up
@@ -66,32 +66,32 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
pic_highlight = pic_up
end
new_button:SetNormalTexture (pic_up)
new_button:SetPushedTexture (pic_down)
new_button:SetNormalTexture(pic_up)
new_button:SetPushedTexture(pic_down)
new_button:SetDisabledTexture (pic_disabled)
new_button:SetHighlightTexture (pic_highlight, "ADD")
new_button:SetHighlightTexture(pic_highlight, "ADD")
local new_text = new_button:CreateFontString (nil, "OVERLAY", "GameFontNormal")
new_text:SetPoint ("center", new_button, "center")
new_text:SetPoint("center", new_button, "center")
new_button.text = new_text
new_button.supportFrame = CreateFrame ("frame", nil, new_button)
new_button.supportFrame:SetPoint ("topleft", new_button, "topleft")
new_button.supportFrame:SetPoint ("bottomright", new_button, "bottomright")
new_button.supportFrame = CreateFrame("frame", nil, new_button)
new_button.supportFrame:SetPoint("topleft", new_button, "topleft")
new_button.supportFrame:SetPoint("bottomright", new_button, "bottomright")
new_button.supportFrame:SetFrameLevel (new_button:GetFrameLevel()+1)
new_button.supportFrame.disable_overlay = new_button.supportFrame:CreateTexture (nil, "overlay")
new_button.supportFrame.disable_overlay:SetTexture ("Interface\\AddOns\\Details\\images\\button_disable_overlay")
new_button.supportFrame.disable_overlay:SetPoint ("topleft", new_button.supportFrame, "topleft")
new_button.supportFrame.disable_overlay:SetPoint ("bottomright", new_button.supportFrame, "bottomright")
new_button.supportFrame.disable_overlay = new_button.supportFrame:CreateTexture(nil, "overlay")
new_button.supportFrame.disable_overlay:SetTexture("Interface\\AddOns\\Details\\images\\button_disable_overlay")
new_button.supportFrame.disable_overlay:SetPoint("topleft", new_button.supportFrame, "topleft")
new_button.supportFrame.disable_overlay:SetPoint("bottomright", new_button.supportFrame, "bottomright")
new_button.supportFrame.disable_overlay:Hide()
local rightFunction = options.rightFunc
new_button:SetScript ("OnDisable", function()
new_button:SetScript("OnDisable", function()
new_button.supportFrame.disable_overlay:Show()
end)
new_button:SetScript ("OnEnable", function()
new_button:SetScript("OnEnable", function()
new_button.supportFrame.disable_overlay:Hide()
end)
@@ -106,7 +106,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
new_button.enter = false
new_button:SetScript ("OnMouseDown", function(self, button)
new_button:SetScript("OnMouseDown", function(self, button)
if (not self:IsEnabled()) then
return
end
@@ -140,7 +140,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
end
end)
new_button:SetScript ("OnMouseUp", function(self, button)
new_button:SetScript("OnMouseUp", function(self, button)
if (not self:IsEnabled()) then
return
end
@@ -181,7 +181,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
new_button.tooltip = nil
new_button:SetScript ("OnEnter", function()
new_button:SetScript("OnEnter", function()
new_button.enter = true
@@ -203,7 +203,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
end
end)
new_button:SetScript ("OnLeave", function()
new_button:SetScript("OnLeave", function()
new_button.enter = false
@@ -221,10 +221,10 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
end)
function new_button:ChangeIcon (icon1, icon2, icon3, icon4)
new_button:SetNormalTexture (icon1)
new_button:SetPushedTexture (icon2)
new_button:SetNormalTexture(icon1)
new_button:SetPushedTexture(icon2)
new_button:SetDisabledTexture (icon3)
new_button:SetHighlightTexture (icon4, "ADD")
new_button:SetHighlightTexture(icon4, "ADD")
end
function new_button:InstallCustomTexture (texture, rect)
@@ -233,17 +233,17 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
new_button:SetDisabledTexture("")
new_button:SetHighlightTexture("")
texture = texture or "Interface\\AddOns\\Details\\images\\default_button"
new_button.texture = new_button:CreateTexture (nil, "background")
new_button.texture = new_button:CreateTexture(nil, "background")
if (not rect) then
new_button.texture:SetAllPoints (new_button)
new_button.texture:SetAllPoints(new_button)
else
new_button.texture:SetPoint ("topleft", new_button, "topleft", rect.x1, rect.y1)
new_button.texture:SetPoint ("bottomright", new_button, "bottomright", rect.x2, rect.y2)
new_button.texture:SetPoint("topleft", new_button, "topleft", rect.x1, rect.y1)
new_button.texture:SetPoint("bottomright", new_button, "bottomright", rect.x2, rect.y2)
end
new_button.texture:SetTexCoord (0, 1, 0, 0.24609375)
new_button.texture:SetTexture (texture)
new_button.texture:SetTexture(texture)
end
new_button.textColor = {}
@@ -260,21 +260,21 @@ local EditBoxBackdrop = {
function gump:NewTextBox (parent, container, member, func, param1, param2, w, h, options)
local editbox = CreateFrame ("EditBox", "DetailsEditBox1", parent)
local editbox = CreateFrame("EditBox", "DetailsEditBox1", parent)
container [member] = editbox
options = options or {}
editbox:SetAutoFocus (false)
editbox:SetFontObject (GameFontHighlightSmall)
editbox:SetWidth (w)
editbox:SetHeight (h)
editbox:SetWidth(w)
editbox:SetHeight(h)
editbox:SetJustifyH("CENTER")
editbox:EnableMouse (true)
editbox:SetBackdrop (EditBoxBackdrop)
editbox:SetBackdropColor (0, 0, 0, 0.5)
editbox:SetBackdropBorderColor (0.3, 0.3, 0.30, 0.80)
editbox:SetText ("") --localize-me
editbox:SetBackdrop(EditBoxBackdrop)
editbox:SetBackdropColor(0, 0, 0, 0.5)
editbox:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
editbox:SetText("") --localize-me
editbox.perdeu_foco = nil
@@ -284,15 +284,15 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
editbox.tab_on_enter = options.TabOnEnterPress
editbox.space = options.MySpace
gump:NewLabel (editbox, editbox, nil, "label", "", "GameFontHighlightSmall")
gump:NewLabel(editbox, editbox, nil, "label", "", "GameFontHighlightSmall")
editbox ["label"]: SetPoint ("right", editbox, "left", -2, 0)
editbox.label:SetTextColor (.8, .8, .8, 1)
function editbox:SetPointAndSpace (MyAnchor, SnapTo, HisAnchor, x, y, Width)
if (type (MyAnchor) == "boolean" and MyAnchor and editbox.space) then
if (type(MyAnchor) == "boolean" and MyAnchor and editbox.space) then
local textWidth = editbox ["label"]:GetStringWidth()+2
editbox:SetWidth (editbox.space - textWidth - 15)
editbox:SetWidth(editbox.space - textWidth - 15)
return
elseif (not editbox.space and not Width) then
@@ -304,23 +304,23 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
if (editbox.space) then
editbox ["label"]:ClearAllPoints()
editbox:ClearAllPoints()
editbox ["label"]:SetPoint (MyAnchor, SnapTo, HisAnchor, x, y)
editbox:SetPoint ("left", editbox["label"].widget, "right", 2, 0)
editbox ["label"]:SetPoint(MyAnchor, SnapTo, HisAnchor, x, y)
editbox:SetPoint("left", editbox["label"].widget, "right", 2, 0)
local textWidth = editbox ["label"]:GetStringWidth()+2
editbox:SetWidth (editbox.space - textWidth - 15)
editbox:SetWidth(editbox.space - textWidth - 15)
end
end
function editbox:SetLabelText (text)
if (text) then
editbox ["label"]:SetText (text)
editbox ["label"]:SetText(text)
else
editbox ["label"]:SetText ("")
editbox ["label"]:SetText("")
end
if (editbox.space) then
editbox:SetPointAndSpace (true) --> refresh
editbox:SetPointAndSpace (true) --refresh
end
end
@@ -337,10 +337,10 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
func (param1, param2, texto, editbox, byScript)
end
else
editbox:SetText ("")
editbox:SetText("")
editbox.text = ""
end
editbox.perdeu_foco = true --> isso aqui pra quando estiver editando e clicar em outra caixa
editbox.perdeu_foco = true --isso aqui pra quando estiver editando e clicar em outra caixa
editbox:ClearFocus()
if (editbox.tab_on_enter and editbox.next) then
@@ -352,9 +352,9 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
EnterPress (byScript)
end
editbox:SetScript ("OnEnterPressed", EnterPress)
editbox:SetScript("OnEnterPressed", EnterPress)
editbox:SetScript ("OnEscapePressed", function()
editbox:SetScript("OnEscapePressed", function()
editbox:SetText("")
editbox.text = ""
editbox.perdeu_foco = true
@@ -365,10 +365,10 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end)
editbox:SetScript ("OnEnter", function()
editbox:SetScript("OnEnter", function()
editbox.mouse_over = true
if (editbox:IsEnabled()) then
editbox:SetBackdropBorderColor (0.5, 0.5, 0.5, 1)
editbox:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
end
if (editbox.tooltip) then
GameCooltip:Reset()
@@ -384,7 +384,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end)
editbox:SetScript ("OnLeave", function()
editbox:SetScript("OnLeave", function()
editbox.mouse_over = false
if (editbox:IsEnabled()) then
editbox:SetBackdropBorderColor(0.3, 0.3, 0.3, 0.8)
@@ -408,7 +408,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end)
editbox:SetScript ("OnEditFocusGained", function()
editbox:SetScript("OnEditFocusGained", function()
if (editbox.label) then
editbox.label:SetTextColor (1, 1, 1, 1)
end
@@ -417,7 +417,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end)
editbox:SetScript ("OnEditFocusLost", function()
editbox:SetScript("OnEditFocusLost", function()
if (editbox:IsShown()) then
if (editbox.perdeu_foco == nil) then
@@ -428,7 +428,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
func (param1, param2, texto, editbox, nil)
end
else
editbox:SetText ("")
editbox:SetText("")
end
else
editbox.perdeu_foco = nil
@@ -444,19 +444,19 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end)
editbox:SetScript ("OnChar", function(self, text)
editbox:SetScript("OnChar", function(self, text)
if (editbox.InputHook) then
editbox:InputHook (text)
end
end)
editbox:SetScript ("OnTextChanged", function(self, userChanged)
editbox:SetScript("OnTextChanged", function(self, userChanged)
if (editbox.TextChangeedHook and userChanged) then
editbox:TextChangeedHook (userChanged)
end
end)
editbox:SetScript ("OnTabPressed", function()
editbox:SetScript("OnTabPressed", function()
if (editbox.next) then
EnterPress()
editbox.next:SetFocus()
@@ -491,20 +491,20 @@ end
function gump:NewScrollBar2 (master, slave, x, y)
local slider_gump = CreateFrame ("Slider", master:GetName() and master:GetName() .. "SliderGump" or "DetailsSliderGump" .. math.random (1, 10000000), master)
local slider_gump = CreateFrame("Slider", master:GetName() and master:GetName() .. "SliderGump" or "DetailsSliderGump" .. math.random (1, 10000000), master)
slider_gump.scrollMax = 560 --default - tamanho da janela de fundo
-- ///// SLIDER /////
slider_gump:SetPoint ("TOPLEFT", master, "TOPRIGHT", x, y)
slider_gump:SetPoint("TOPLEFT", master, "TOPRIGHT", x, y)
slider_gump.ativo = true
slider_gump.bg = slider_gump:CreateTexture (nil, "BACKGROUND")
slider_gump.bg:SetAllPoints (true)
slider_gump.bg:SetTexture (0, 0, 0, 0)
slider_gump.bg = slider_gump:CreateTexture(nil, "BACKGROUND")
slider_gump.bg:SetAllPoints(true)
slider_gump.bg:SetTexture(0, 0, 0, 0)
--coisinha do meio
slider_gump.thumb = slider_gump:CreateTexture (nil, "OVERLAY")
slider_gump.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
slider_gump.thumb:SetSize (29, 30)
slider_gump.thumb = slider_gump:CreateTexture(nil, "OVERLAY")
slider_gump.thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
slider_gump.thumb:SetSize(29, 30)
slider_gump:SetThumbTexture (slider_gump.thumb)
slider_gump:SetOrientation ("VERTICAL")
@@ -513,29 +513,29 @@ function gump:NewScrollBar2 (master, slave, x, y)
slider_gump:SetValue(0)
slider_gump.ultimo = 0
local botao_cima = CreateFrame ("Button", slider_gump:GetName() .. "UpButton", master)
local botao_cima = CreateFrame("Button", slider_gump:GetName() .. "UpButton", master)
botao_cima:SetWidth (29)
botao_cima:SetHeight (32)
botao_cima:SetNormalTexture ([[Interface\Buttons\Arrow-Up-Up]])
botao_cima:SetPushedTexture ([[Interface\Buttons\Arrow-Up-Down]])
botao_cima:SetWidth(29)
botao_cima:SetHeight(32)
botao_cima:SetNormalTexture([[Interface\Buttons\Arrow-Up-Up]])
botao_cima:SetPushedTexture([[Interface\Buttons\Arrow-Up-Down]])
botao_cima:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
botao_cima:Show()
botao_cima:Disable()
botao_cima:SetPoint ("BOTTOM", slider_gump, "TOP", 0, -12)
botao_cima:SetPoint("BOTTOM", slider_gump, "TOP", 0, -12)
botao_cima.x = 0
botao_cima.y = -12
local botao_baixo = CreateFrame ("Button", slider_gump:GetName() .. "DownButton", master)
botao_baixo:SetPoint ("TOP", slider_gump, "BOTTOM", 0, 12)
local botao_baixo = CreateFrame("Button", slider_gump:GetName() .. "DownButton", master)
botao_baixo:SetPoint("TOP", slider_gump, "BOTTOM", 0, 12)
botao_baixo.x = 0
botao_baixo.y = 12
botao_baixo:SetWidth (29)
botao_baixo:SetHeight (32)
botao_baixo:SetNormalTexture ([[Interface\Buttons\Arrow-Down-Up]])
botao_baixo:SetPushedTexture ([[Interface\Buttons\Arrow-Down-Down]])
botao_baixo:SetWidth(29)
botao_baixo:SetHeight(32)
botao_baixo:SetNormalTexture([[Interface\Buttons\Arrow-Down-Up]])
botao_baixo:SetPushedTexture([[Interface\Buttons\Arrow-Down-Down]])
botao_baixo:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
botao_baixo:Show()
botao_baixo:Disable()
@@ -544,7 +544,7 @@ function gump:NewScrollBar2 (master, slave, x, y)
master.cima = botao_cima
master.slider = slider_gump
botao_baixo:SetScript ("OnMouseDown", function(self)
botao_baixo:SetScript("OnMouseDown", function(self)
if (not slider_gump:IsEnabled()) then
return
end
@@ -552,70 +552,70 @@ function gump:NewScrollBar2 (master, slave, x, y)
local current = slider_gump:GetValue()
local minValue, maxValue = slider_gump:GetMinMaxValues()
if (current+5 < maxValue) then
slider_gump:SetValue (current+5)
slider_gump:SetValue(current+5)
else
slider_gump:SetValue (maxValue)
slider_gump:SetValue(maxValue)
end
self.precionado = true
self.last_up = -0.3
self:SetScript ("OnUpdate", function(self, elapsed)
self:SetScript("OnUpdate", function(self, elapsed)
self.last_up = self.last_up + elapsed
if (self.last_up > 0.03) then
self.last_up = 0
local current = slider_gump:GetValue()
local minValue, maxValue = slider_gump:GetMinMaxValues()
if (current+2 < maxValue) then
slider_gump:SetValue (current+2)
slider_gump:SetValue(current+2)
else
slider_gump:SetValue (maxValue)
slider_gump:SetValue(maxValue)
end
end
end)
end)
botao_baixo:SetScript ("OnMouseUp", function(self)
botao_baixo:SetScript("OnMouseUp", function(self)
self.precionado = false
self:SetScript ("OnUpdate", nil)
self:SetScript("OnUpdate", nil)
end)
botao_cima:SetScript ("OnMouseDown", function(self)
botao_cima:SetScript("OnMouseDown", function(self)
if (not slider_gump:IsEnabled()) then
return
end
local current = slider_gump:GetValue()
if (current-5 > 0) then
slider_gump:SetValue (current-5)
slider_gump:SetValue(current-5)
else
slider_gump:SetValue (0)
slider_gump:SetValue(0)
end
self.precionado = true
self.last_up = -0.3
self:SetScript ("OnUpdate", function(self, elapsed)
self:SetScript("OnUpdate", function(self, elapsed)
self.last_up = self.last_up + elapsed
if (self.last_up > 0.03) then
self.last_up = 0
local current = slider_gump:GetValue()
if (current-2 > 0) then
slider_gump:SetValue (current-2)
slider_gump:SetValue(current-2)
else
slider_gump:SetValue (0)
slider_gump:SetValue(0)
end
end
end)
end)
botao_cima:SetScript ("OnMouseUp", function(self)
botao_cima:SetScript("OnMouseUp", function(self)
self.precionado = false
self:SetScript ("OnUpdate", nil)
self:SetScript("OnUpdate", nil)
end)
--> isso aqui pra quando o slider ativar, o scroll fica na posio zero
botao_cima:SetScript ("OnEnable", function(self)
--isso aqui pra quando o slider ativar, o scroll fica na posio zero
botao_cima:SetScript("OnEnable", function(self)
local current = slider_gump:GetValue()
if (current == 0) then
botao_cima:Disable()
end
end)
slider_gump:SetScript ("OnValueChanged", function(self)
slider_gump:SetScript("OnValueChanged", function(self)
local current = self:GetValue()
master:SetVerticalScroll (current)
@@ -635,22 +635,22 @@ function gump:NewScrollBar2 (master, slave, x, y)
end)
slider_gump:SetScript ("OnShow", function(self)
slider_gump:SetScript("OnShow", function(self)
botao_cima:Show()
botao_baixo:Show()
end)
slider_gump:SetScript ("OnDisable", function(self)
slider_gump:SetScript("OnDisable", function(self)
botao_cima:Disable()
botao_baixo:Disable()
end)
slider_gump:SetScript ("OnEnable", function(self)
slider_gump:SetScript("OnEnable", function(self)
botao_cima:Enable()
botao_baixo:Enable()
end)
master:SetScript ("OnMouseWheel", function(self, delta)
master:SetScript("OnMouseWheel", function(self, delta)
if (not slider_gump:IsEnabled()) then
return
end
@@ -660,22 +660,22 @@ function gump:NewScrollBar2 (master, slave, x, y)
--baixo
local minValue, maxValue = slider_gump:GetMinMaxValues()
if (current + (master.wheel_jump or 20) < maxValue) then
slider_gump:SetValue (current + (master.wheel_jump or 20))
slider_gump:SetValue(current + (master.wheel_jump or 20))
else
slider_gump:SetValue (maxValue)
slider_gump:SetValue(maxValue)
end
elseif (delta > 0) then
--cima
if (current + (master.wheel_jump or 20) > 0) then
slider_gump:SetValue (current - (master.wheel_jump or 20))
slider_gump:SetValue(current - (master.wheel_jump or 20))
else
slider_gump:SetValue (0)
slider_gump:SetValue(0)
end
end
end)
function slider_gump:Altura (h)
self:SetHeight (h)
self:SetHeight(h)
end
function slider_gump:Update (desativar)
@@ -705,11 +705,11 @@ function gump:NewScrollBar2 (master, slave, x, y)
end
function slider_gump:cimaPoint (x, y)
botao_cima:SetPoint ("BOTTOM", slider_gump, "TOP", x, (y)-12)
botao_cima:SetPoint("BOTTOM", slider_gump, "TOP", x, (y)-12)
end
function slider_gump:baixoPoint (x, y)
botao_baixo:SetPoint ("TOP", slider_gump, "BOTTOM", x, (y)+12)
botao_baixo:SetPoint("TOP", slider_gump, "BOTTOM", x, (y)+12)
end
return slider_gump
+88 -88
View File
@@ -28,7 +28,7 @@ function Details:CreateAPI2Frame()
local Api2Frame = _G.DetailsAPI2Frame
Api2Frame:SetFrameStrata ("FULLSCREEN")
Api2Frame:SetPoint ("center")
Api2Frame:SetPoint("center")
DetailsFramework:ApplyStandardBackdrop (Api2Frame, false, 1.2)
--store
@@ -43,14 +43,14 @@ function Details:CreateAPI2Frame()
local onSelectAPI = function(self)
local apiName = apiFunctionNames [self.index]
if (not apiName) then
Details:Msg ("API name not found:", apiName)
Details:Msg("API name not found:", apiName)
return
end
--fill the box in the right with information about the API
local apiInfo = api [self.index]
if (not apiInfo) then
Details:Msg ("API information for api not found", apiName)
Details:Msg("API information for api not found", apiName)
return
end
@@ -62,7 +62,7 @@ function Details:CreateAPI2Frame()
--update the copy line text box
local parameters = ""
for parameterIndex, parameterInfo in ipairs (apiInfo.parameters) do
for parameterIndex, parameterInfo in ipairs(apiInfo.parameters) do
if (parameterInfo.required) then
parameters = parameters .. parameterInfo.name .. ", "
end
@@ -70,7 +70,7 @@ function Details:CreateAPI2Frame()
parameters = parameters:gsub (", $", "")
local returnValues = "local "
for returnIndex, returnInfo in ipairs (apiInfo.returnValues) do
for returnIndex, returnInfo in ipairs(apiInfo.returnValues) do
returnValues = returnValues .. returnInfo.name .. ", "
end
returnValues = returnValues:gsub (", $", "")
@@ -130,29 +130,29 @@ function Details:CreateAPI2Frame()
local apiName = data [index]
if (apiName) then
local line = self:GetLine (i)
line.text:SetText (apiName)
line.text:SetText(apiName)
line.index = index
if (currentSelected == index) then
line:SetBackdropColor (unpack (backdropColorSelected))
line:SetBackdropColor(unpack (backdropColorSelected))
else
line:SetBackdropColor (unpack (backdropColor))
line:SetBackdropColor(unpack (backdropColor))
end
end
end
end
for apiIndex, apiDesc in ipairs (api) do
for apiIndex, apiDesc in ipairs(api) do
tinsert (apiFunctionNames, apiDesc.name)
end
local api2ScrollMenu = DetailsFramework:CreateScrollBox (Api2Frame, "$parentApi2MenuScroll", apiMenuScrollRefresh, apiFunctionNames, scrollWidth, scrollHeight, lineAmount, lineHeight)
DetailsFramework:ReskinSlider(api2ScrollMenu)
api2ScrollMenu:SetPoint ("topleft", Api2Frame, "topleft", 10, yStart)
api2ScrollMenu:SetPoint("topleft", Api2Frame, "topleft", 10, yStart)
Api2Frame.scrollMenu = api2ScrollMenu
local lineOnEnter = function(self)
self:SetBackdropColor (unpack (backdropColorOnEnter))
self:SetBackdropColor(unpack (backdropColorOnEnter))
local apiName = apiFunctionNames [self.index]
if (not apiName) then
@@ -173,9 +173,9 @@ function Details:CreateAPI2Frame()
local lineOnLeave = function(self)
if (currentSelected == self.index) then
self:SetBackdropColor (unpack (backdropColorSelected))
self:SetBackdropColor(unpack (backdropColorSelected))
else
self:SetBackdropColor (unpack (backdropColor))
self:SetBackdropColor(unpack (backdropColor))
end
GameCooltip2:Hide()
@@ -184,21 +184,21 @@ function Details:CreateAPI2Frame()
--create lines
for i = 1, lineAmount do
api2ScrollMenu:CreateLine (function(self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(lineHeight+1)) - 1)
line:SetSize (scrollWidth - 2, lineHeight)
local line = CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint("topleft", self, "topleft", 1, -((index-1)*(lineHeight+1)) - 1)
line:SetSize(scrollWidth - 2, lineHeight)
line.index = index
line:SetScript ("OnEnter", lineOnEnter)
line:SetScript ("OnLeave", lineOnLeave)
line:SetScript("OnEnter", lineOnEnter)
line:SetScript("OnLeave", lineOnLeave)
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor (unpack (backdropColor))
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor(unpack (backdropColor))
line.text = DetailsFramework:CreateLabel (line)
line.text:SetPoint ("left", line, "left", 2, 0)
line.text = DetailsFramework:CreateLabel(line)
line.text:SetPoint("left", line, "left", 2, 0)
line:SetScript ("OnMouseDown", onSelectAPI)
line:SetScript("OnMouseDown", onSelectAPI)
return line
end)
@@ -207,43 +207,43 @@ function Details:CreateAPI2Frame()
--info box
local infoWidth = panelWidth - xAnchorPoint - 10
--api name
Api2Frame.ApiFunctionName = DetailsFramework:CreateLabel (Api2Frame, "", 14, "orange")
Api2Frame.ApiFunctionName:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, yStart)
Api2Frame.ApiFunctionName = DetailsFramework:CreateLabel(Api2Frame, "", 14, "orange")
Api2Frame.ApiFunctionName:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, yStart)
--api desc
Api2Frame.ApiFunctionDesc = DetailsFramework:CreateLabel (Api2Frame)
Api2Frame.ApiFunctionDesc:SetPoint ("topleft", Api2Frame.ApiFunctionName, "bottomleft", 0, -2)
Api2Frame.ApiFunctionDesc = DetailsFramework:CreateLabel(Api2Frame)
Api2Frame.ApiFunctionDesc:SetPoint("topleft", Api2Frame.ApiFunctionName, "bottomleft", 0, -2)
Api2Frame.ApiFunctionDesc.width = infoWidth
Api2Frame.ApiFunctionDesc.height = 22
Api2Frame.ApiFunctionDesc.valign = "top"
--api func to copy
local apiCopyString = DetailsFramework:CreateLabel (Api2Frame, "Copy String", 12, "orange")
apiCopyString:SetPoint ("topleft", Api2Frame.ApiFunctionDesc, "bottomleft", 0, -20)
local apiCopyString = DetailsFramework:CreateLabel(Api2Frame, "Copy String", 12, "orange")
apiCopyString:SetPoint("topleft", Api2Frame.ApiFunctionDesc, "bottomleft", 0, -20)
Api2Frame.ApiCopy = DetailsFramework:CreateTextEntry (Api2Frame, function() end, infoWidth, 20)
Api2Frame.ApiCopy:SetPoint ("topleft", apiCopyString, "bottomleft", 0, -2)
Api2Frame.ApiCopy:SetPoint("topleft", apiCopyString, "bottomleft", 0, -2)
Api2Frame.ApiCopy:SetTemplate (DetailsFramework:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX"))
--parameters
local parametersYStart = yStart - 110
local parametersString = DetailsFramework:CreateLabel (Api2Frame, "Parameters", 12, "orange")
parametersString:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
local parametersString = DetailsFramework:CreateLabel(Api2Frame, "Parameters", 12, "orange")
parametersString:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
parametersYStart = parametersYStart - 20
local space1, space2, space3 = 150, 300, 450
local parametersHeader = CreateFrame ("frame", nil, Api2Frame, "BackdropTemplate")
parametersHeader:SetSize (infoWidth, 20)
parametersHeader:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
parametersHeader:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
parametersHeader:SetBackdropColor (unpack (backdropColor))
parametersHeader.name = DetailsFramework:CreateLabel (parametersHeader, "Name", 12, "yellow")
parametersHeader.typeData = DetailsFramework:CreateLabel (parametersHeader, "Type", 12, "yellow")
parametersHeader.required = DetailsFramework:CreateLabel (parametersHeader, "Is Required", 12, "yellow")
parametersHeader.default = DetailsFramework:CreateLabel (parametersHeader, "Default Value", 12, "yellow")
parametersHeader.name:SetPoint ("left", parametersHeader, "left", 2, 0)
parametersHeader.typeData:SetPoint ("left", parametersHeader, "left", space1, 0)
parametersHeader.required:SetPoint ("left", parametersHeader, "left", space2, 0)
parametersHeader.default:SetPoint ("left", parametersHeader, "left", space3, 0)
local parametersHeader = CreateFrame("frame", nil, Api2Frame, "BackdropTemplate")
parametersHeader:SetSize(infoWidth, 20)
parametersHeader:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
parametersHeader:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
parametersHeader:SetBackdropColor(unpack (backdropColor))
parametersHeader.name = DetailsFramework:CreateLabel(parametersHeader, "Name", 12, "yellow")
parametersHeader.typeData = DetailsFramework:CreateLabel(parametersHeader, "Type", 12, "yellow")
parametersHeader.required = DetailsFramework:CreateLabel(parametersHeader, "Is Required", 12, "yellow")
parametersHeader.default = DetailsFramework:CreateLabel(parametersHeader, "Default Value", 12, "yellow")
parametersHeader.name:SetPoint("left", parametersHeader, "left", 2, 0)
parametersHeader.typeData:SetPoint("left", parametersHeader, "left", space1, 0)
parametersHeader.required:SetPoint("left", parametersHeader, "left", space2, 0)
parametersHeader.default:SetPoint("left", parametersHeader, "left", space3, 0)
local parameterOnEnter = function(self)
GameCooltip2:Preset(2)
@@ -257,87 +257,87 @@ function Details:CreateAPI2Frame()
GameCooltip2:AddLine (apiInfo.parameters [self.index].desc)
GameCooltip2:ShowCooltip()
self:SetBackdropColor (unpack (backdropColorOnEnter))
self:SetBackdropColor(unpack (backdropColorOnEnter))
end
local parameterOnLeave = function(self)
GameCooltip2:Hide()
self:SetBackdropColor (unpack (backdropColor))
self:SetBackdropColor(unpack (backdropColor))
end
for i = 1, parametersAmount do
local parameterLine = {}
local f = CreateFrame ("frame", nil, Api2Frame, "BackdropTemplate")
f:SetSize (infoWidth, 20)
f:SetScript ("OnEnter", parameterOnEnter)
f:SetScript ("OnLeave", parameterOnLeave)
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor (unpack (backdropColor))
local f = CreateFrame("frame", nil, Api2Frame, "BackdropTemplate")
f:SetSize(infoWidth, 20)
f:SetScript("OnEnter", parameterOnEnter)
f:SetScript("OnLeave", parameterOnLeave)
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor(unpack (backdropColor))
f:Hide()
f.name = DetailsFramework:CreateLabel (f)
f.typeData = DetailsFramework:CreateLabel (f)
f.required = DetailsFramework:CreateLabel (f)
f.default = DetailsFramework:CreateLabel (f)
f.name = DetailsFramework:CreateLabel(f)
f.typeData = DetailsFramework:CreateLabel(f)
f.required = DetailsFramework:CreateLabel(f)
f.default = DetailsFramework:CreateLabel(f)
f:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart + (-i * 20))
f:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart + (-i * 20))
f.name:SetPoint ("left", f, "left", 2, 0)
f.typeData:SetPoint ("left", f, "left", space1, 0)
f.required:SetPoint ("left", f, "left", space2, 0)
f.default:SetPoint ("left", f, "left", space3, 0)
f.name:SetPoint("left", f, "left", 2, 0)
f.typeData:SetPoint("left", f, "left", space1, 0)
f.required:SetPoint("left", f, "left", space2, 0)
f.default:SetPoint("left", f, "left", space3, 0)
tinsert (parametersLines, f)
end
--return value box
local returnYStart = yStart - 260
local returnString = DetailsFramework:CreateLabel (Api2Frame, "Return Values", 12, "orange")
returnString:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
local returnString = DetailsFramework:CreateLabel(Api2Frame, "Return Values", 12, "orange")
returnString:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
returnYStart = returnYStart - 20
local space1 = 200
local returnHeader = CreateFrame ("frame", nil, Api2Frame, "BackdropTemplate")
returnHeader:SetSize (infoWidth, 20)
returnHeader:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
returnHeader:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
returnHeader:SetBackdropColor (unpack (backdropColor))
returnHeader.name = DetailsFramework:CreateLabel (returnHeader, "Name", 12, "yellow")
returnHeader.typeData = DetailsFramework:CreateLabel (returnHeader, "Type", 12, "yellow")
returnHeader.name:SetPoint ("left", returnHeader, "left", 2, 0)
returnHeader.typeData:SetPoint ("left", returnHeader, "left", space1, 0)
local returnHeader = CreateFrame("frame", nil, Api2Frame, "BackdropTemplate")
returnHeader:SetSize(infoWidth, 20)
returnHeader:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
returnHeader:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
returnHeader:SetBackdropColor(unpack (backdropColor))
returnHeader.name = DetailsFramework:CreateLabel(returnHeader, "Name", 12, "yellow")
returnHeader.typeData = DetailsFramework:CreateLabel(returnHeader, "Type", 12, "yellow")
returnHeader.name:SetPoint("left", returnHeader, "left", 2, 0)
returnHeader.typeData:SetPoint("left", returnHeader, "left", space1, 0)
local returnOnEnter = function(self)
self:SetBackdropColor (unpack (backdropColorOnEnter))
self:SetBackdropColor(unpack (backdropColorOnEnter))
end
local returnOnLeave = function(self)
self:SetBackdropColor (unpack (backdropColor))
self:SetBackdropColor(unpack (backdropColor))
end
for i = 1, returnAmount do
local parameterLine = {}
local f = CreateFrame ("frame", nil, Api2Frame, "BackdropTemplate")
f:SetSize (infoWidth, 20)
f:SetScript ("OnEnter", returnOnEnter)
f:SetScript ("OnLeave", returnOnLeave)
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor (unpack (backdropColor))
local f = CreateFrame("frame", nil, Api2Frame, "BackdropTemplate")
f:SetSize(infoWidth, 20)
f:SetScript("OnEnter", returnOnEnter)
f:SetScript("OnLeave", returnOnLeave)
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor(unpack (backdropColor))
f:Hide()
f.name = DetailsFramework:CreateLabel (f)
f.typeData = DetailsFramework:CreateLabel (f)
f.name = DetailsFramework:CreateLabel(f)
f.typeData = DetailsFramework:CreateLabel(f)
f.desc = DetailsFramework:CreateLabel (f, "", 10, "gray")
f.desc = DetailsFramework:CreateLabel(f, "", 10, "gray")
f.desc.width = infoWidth
f.desc.height = 60
f.desc.valign = "top"
f:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart + (-i * 20))
f:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart + (-i * 20))
f.name:SetPoint ("left", f, "left", 2, 0)
f.typeData:SetPoint ("left", f, "left", space1, 0)
f.name:SetPoint("left", f, "left", 2, 0)
f.typeData:SetPoint("left", f, "left", space1, 0)
f.desc:SetPoint ("topleft", f.name, "bottomleft", 0, -5)
f.desc:SetPoint("topleft", f.name, "bottomleft", 0, -5)
tinsert (returnLines, f)
end
+68 -68
View File
@@ -7,7 +7,7 @@ local Details = _G.Details
local DF = _G.DetailsFramework
local libwindow = LibStub("LibWindow-1.1")
--> this function isn't in use
--this function isn't in use
function Details.OpenDpsBenchmark()
--main frame
@@ -16,15 +16,15 @@ local libwindow = LibStub("LibWindow-1.1")
local _ = nil
--declaration
local f = CreateFrame ("frame", "DetailsBenchmark", UIParent,"BackdropTemplate")
f:SetSize (800, 600)
f:SetPoint ("left", UIParent, "left")
local f = CreateFrame("frame", "DetailsBenchmark", UIParent,"BackdropTemplate")
f:SetSize(800, 600)
f:SetPoint("left", UIParent, "left")
f:SetFrameStrata ("LOW")
f:EnableMouse (true)
f:SetMovable (true)
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor (0, 0, 0, 0.9)
f:SetBackdropBorderColor (0, 0, 0, 1)
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor(0, 0, 0, 0.9)
f:SetBackdropBorderColor(0, 0, 0, 1)
--register to libwindow
local LibWindow = LibStub ("LibWindow-1.1")
@@ -34,32 +34,32 @@ local libwindow = LibStub("LibWindow-1.1")
LibWindow.SavePosition (f)
--titlebar
f.TitleBar = CreateFrame ("frame", "$parentTitleBar", f,"BackdropTemplate")
f.TitleBar:SetPoint ("topleft", f, "topleft", 2, -3)
f.TitleBar:SetPoint ("topright", f, "topright", -2, -3)
f.TitleBar:SetHeight (20)
f.TitleBar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f.TitleBar:SetBackdropColor (.2, .2, .2, 1)
f.TitleBar:SetBackdropBorderColor (0, 0, 0, 1)
f.TitleBar = CreateFrame("frame", "$parentTitleBar", f,"BackdropTemplate")
f.TitleBar:SetPoint("topleft", f, "topleft", 2, -3)
f.TitleBar:SetPoint("topright", f, "topright", -2, -3)
f.TitleBar:SetHeight(20)
f.TitleBar:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f.TitleBar:SetBackdropColor(.2, .2, .2, 1)
f.TitleBar:SetBackdropBorderColor(0, 0, 0, 1)
--close button
f.Close = CreateFrame ("button", "$parentCloseButton", f,"BackdropTemplate")
f.Close:SetPoint ("right", f.TitleBar, "right", -2, 0)
f.Close:SetSize (16, 16)
f.Close:SetNormalTexture (_detalhes.gump.folder .. "icons")
f.Close:SetHighlightTexture (_detalhes.gump.folder .. "icons")
f.Close:SetPushedTexture (_detalhes.gump.folder .. "icons")
f.Close = CreateFrame("button", "$parentCloseButton", f,"BackdropTemplate")
f.Close:SetPoint("right", f.TitleBar, "right", -2, 0)
f.Close:SetSize(16, 16)
f.Close:SetNormalTexture(_detalhes.gump.folder .. "icons")
f.Close:SetHighlightTexture(_detalhes.gump.folder .. "icons")
f.Close:SetPushedTexture(_detalhes.gump.folder .. "icons")
f.Close:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:SetAlpha (0.7)
f.Close:SetScript ("OnClick", function() f:Hide() end)
f.Close:SetScript("OnClick", function() f:Hide() end)
--title
f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
f.Title:SetPoint ("center", f.TitleBar, "center")
f.Title:SetPoint("center", f.TitleBar, "center")
f.Title:SetTextColor (.8, .8, .8, 1)
f.Title:SetText ("Details! Benchmark")
f.Title:SetText("Details! Benchmark")
DF:InstallTemplate ("font", "DETAILS_BENCHMARK_NORMAL", {color = "white", size = 10, font = "Friz Quadrata TT"})
@@ -89,14 +89,14 @@ local libwindow = LibStub("LibWindow-1.1")
end
end
function f.StartUpdateOnTick()
f:SetScript ("OnUpdate", f.UpdateOnTick)
f:SetScript("OnUpdate", f.UpdateOnTick)
end
--events
f:RegisterEvent ("PLAYER_REGEN_DISABLED")
f:RegisterEvent ("PLAYER_REGEN_ENABLED")
f:SetScript ("OnEvent", function(self, event, ...)
f:SetScript("OnEvent", function(self, event, ...)
if (event == "PLAYER_REGEN_DISABLED") then
f.StartNewBenchmark()
@@ -126,12 +126,12 @@ local libwindow = LibStub("LibWindow-1.1")
--summary block
--declaration
local summaryFrame = CreateFrame ("frame", "$parentSummaryFrame", f,"BackdropTemplate")
summaryFrame:SetPoint ("topleft", f, "topleft", unpack (f.FrameLocations.summary))
summaryFrame:SetSize (unpack (f.FrameSizes.default))
summaryFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
summaryFrame:SetBackdropColor (0, 0, 0, 0.9)
summaryFrame:SetBackdropBorderColor (0, 0, 0, 1)
local summaryFrame = CreateFrame("frame", "$parentSummaryFrame", f,"BackdropTemplate")
summaryFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.summary))
summaryFrame:SetSize(unpack (f.FrameSizes.default))
summaryFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
summaryFrame:SetBackdropColor(0, 0, 0, 0.9)
summaryFrame:SetBackdropBorderColor(0, 0, 0, 1)
--time to test string and dropdown
local build_time_list = function()
@@ -146,18 +146,18 @@ local libwindow = LibStub("LibWindow-1.1")
return t
end
summaryFrame.TimeToTestLabel = DF:CreateLabel (summaryFrame, "Amount of Time", normal_text_template)
summaryFrame.TimeToTestLabel = DF:CreateLabel(summaryFrame, "Amount of Time", normal_text_template)
summaryFrame.TimeToTestDropdown = DF:CreateDropDown (summaryFrame, build_time_list, default, 150, 20, _, _, options_dropdown_template)
--description string and text entry
summaryFrame.DescriptionLabel = DF:CreateLabel (summaryFrame, "Description", normal_text_template)
summaryFrame.DescriptionLabel = DF:CreateLabel(summaryFrame, "Description", normal_text_template)
summaryFrame.DescriptionEntry = DF:CreateTextEntry (summaryFrame, function()end, 120, 20, nil, _, nil, options_dropdown_template)
--DPS Amount string
summaryFrame.DPSLabel = DF:CreateLabel (summaryFrame, "100K", normal_text_template)
summaryFrame.DPSLabel = DF:CreateLabel(summaryFrame, "100K", normal_text_template)
--TIME ELAPSED string
summaryFrame.TimeElapsedLabel = DF:CreateLabel (summaryFrame, "01:00", normal_text_template)
summaryFrame.TimeElapsedLabel = DF:CreateLabel(summaryFrame, "01:00", normal_text_template)
--boss simulation string and dropdown
local build_bosssimulation_list, default = function()
@@ -166,40 +166,40 @@ local libwindow = LibStub("LibWindow-1.1")
}
return t
end
summaryFrame.BossSimulationLabel = DF:CreateLabel (summaryFrame, "Boss Simulation", normal_text_template)
summaryFrame.BossSimulationLabel = DF:CreateLabel(summaryFrame, "Boss Simulation", normal_text_template)
summaryFrame.BossSimulationDropdown = DF:CreateDropDown (summaryFrame, build_bosssimulation_list, default, 150, 20, _, _, options_dropdown_template)
--boss records line with a tooltip importing data from the storage
summaryFrame.BossRecordsFrame = CreateFrame ("frame", nil, summaryFrame,"BackdropTemplate")
summaryFrame.BossRecordsFrame:SetSize (f.FrameSizes.default[1]-20, 20)
summaryFrame.BossRecordsFrame:SetBackdropColor (0, 0, 0, 0.3)
summaryFrame.BossRecordsFrame:SetScript ("OnEnter", function()
summaryFrame.BossRecordsFrame = CreateFrame("frame", nil, summaryFrame,"BackdropTemplate")
summaryFrame.BossRecordsFrame:SetSize(f.FrameSizes.default[1]-20, 20)
summaryFrame.BossRecordsFrame:SetBackdropColor(0, 0, 0, 0.3)
summaryFrame.BossRecordsFrame:SetScript("OnEnter", function()
end)
summaryFrame.BossRecordsFrame:SetScript ("OnLeave", function()
summaryFrame.BossRecordsFrame:SetScript("OnLeave", function()
end)
--set the points
do
local x, y = 10, -10
summaryFrame.TimeToTestLabel:SetPoint ("topleft", summaryFrame, "topleft", x, y)
summaryFrame.TimeToTestDropdown:SetPoint ("topleft", summaryFrame.TimeToTestLabel, "bottomleft", 0, -2)
summaryFrame.TimeToTestLabel:SetPoint("topleft", summaryFrame, "topleft", x, y)
summaryFrame.TimeToTestDropdown:SetPoint("topleft", summaryFrame.TimeToTestLabel, "bottomleft", 0, -2)
--y = y - 40
summaryFrame.DescriptionLabel:SetPoint ("topleft", summaryFrame, "topleft", x+160, y)
summaryFrame.DescriptionEntry:SetPoint ("topleft", summaryFrame.DescriptionLabel, "bottomleft", 0, -2)
summaryFrame.DescriptionLabel:SetPoint("topleft", summaryFrame, "topleft", x+160, y)
summaryFrame.DescriptionEntry:SetPoint("topleft", summaryFrame.DescriptionLabel, "bottomleft", 0, -2)
y = y - 40
summaryFrame.DPSLabel:SetPoint ("topleft", summaryFrame, "topleft", x, y)
summaryFrame.TimeElapsedLabel:SetPoint ("topleft", summaryFrame, "topleft", x + 100, y)
summaryFrame.DPSLabel:SetPoint("topleft", summaryFrame, "topleft", x, y)
summaryFrame.TimeElapsedLabel:SetPoint("topleft", summaryFrame, "topleft", x + 100, y)
y = y - 40
summaryFrame.BossSimulationLabel:SetPoint ("topleft", summaryFrame, "topleft", x, y)
summaryFrame.BossSimulationDropdown:SetPoint ("topleft", summaryFrame.BossSimulationLabel, "bottomleft", 0, -2)
summaryFrame.BossSimulationLabel:SetPoint("topleft", summaryFrame, "topleft", x, y)
summaryFrame.BossSimulationDropdown:SetPoint("topleft", summaryFrame.BossSimulationLabel, "bottomleft", 0, -2)
y = y - 40
summaryFrame.BossRecordsFrame:SetPoint ("topleft", summaryFrame, "topleft", 0, 0)
summaryFrame.BossRecordsFrame:SetPoint("topleft", summaryFrame, "topleft", 0, 0)
end
@@ -208,12 +208,12 @@ local libwindow = LibStub("LibWindow-1.1")
--spells block
--declaration
local spellsFrame = CreateFrame ("frame", "$parentSpellsFrame", f,"BackdropTemplate")
spellsFrame:SetPoint ("topleft", f, "topleft", unpack (f.FrameLocations.spells))
spellsFrame:SetSize (unpack (f.FrameSizes.default))
spellsFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
spellsFrame:SetBackdropColor (0, 0, 0, 0.9)
spellsFrame:SetBackdropBorderColor (0, 0, 0, 1)
local spellsFrame = CreateFrame("frame", "$parentSpellsFrame", f,"BackdropTemplate")
spellsFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.spells))
spellsFrame:SetSize(unpack (f.FrameSizes.default))
spellsFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
spellsFrame:SetBackdropColor(0, 0, 0, 0.9)
spellsFrame:SetBackdropBorderColor(0, 0, 0, 1)
--header with the string titles:
--Spell Icon | DPS | Damage | Casts | Criticals | Highest Damage
@@ -227,12 +227,12 @@ local libwindow = LibStub("LibWindow-1.1")
--auras block
--declaration
local aurasFrame = CreateFrame ("frame", "$parentAurasFrame", f,"BackdropTemplate")
aurasFrame:SetPoint ("topleft", f, "topleft", unpack (f.FrameLocations.auras))
aurasFrame:SetSize (unpack (f.FrameSizes.default))
aurasFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
aurasFrame:SetBackdropColor (0, 0, 0, 0.9)
aurasFrame:SetBackdropBorderColor (0, 0, 0, 1)
local aurasFrame = CreateFrame("frame", "$parentAurasFrame", f,"BackdropTemplate")
aurasFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.auras))
aurasFrame:SetSize(unpack (f.FrameSizes.default))
aurasFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
aurasFrame:SetBackdropColor(0, 0, 0, 0.9)
aurasFrame:SetBackdropBorderColor(0, 0, 0, 1)
--will be 9 blocks?
@@ -244,12 +244,12 @@ local libwindow = LibStub("LibWindow-1.1")
--history block
--declaration
local historyFrame = CreateFrame ("frame", "$parentHistoryFrame", f,"BackdropTemplate")
historyFrame:SetPoint ("topleft", f, "topleft", unpack (f.FrameLocations.history))
historyFrame:SetSize (unpack (f.FrameSizes.default))
historyFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
historyFrame:SetBackdropColor (0, 0, 0, 0.9)
historyFrame:SetBackdropBorderColor (0, 0, 0, 1)
local historyFrame = CreateFrame("frame", "$parentHistoryFrame", f,"BackdropTemplate")
historyFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.history))
historyFrame:SetSize(unpack (f.FrameSizes.default))
historyFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
historyFrame:SetBackdropColor(0, 0, 0, 0.9)
historyFrame:SetBackdropBorderColor(0, 0, 0, 1)
--header with the string titles:
--Spec | ILevel | DPS | Time | Talents | Crit | Haste | Versatility | Mastery | Int | Description
+22 -22
View File
@@ -4,7 +4,7 @@ local Details = _G.Details
local DF = _G.DetailsFramework
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
--> config bookmarks
--config bookmarks
function Details:OpenBookmarkConfig()
if (not _G.DetailsBookmarkManager) then
@@ -42,10 +42,10 @@ function Details:OpenBookmarkConfig()
Details:MontaAtributosOption (Details:GetInstance(1), select_attribute)
GameCooltip:SetColor (1, cooltip_color)
GameCooltip:SetColor (2, cooltip_color)
GameCooltip:SetOption ("HeightAnchorMod", -7)
GameCooltip:SetOption ("TextSize", Details.font_sizes.menus)
GameCooltip:SetBackdrop (1, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
GameCooltip:SetBackdrop (2, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
GameCooltip:SetOption("HeightAnchorMod", -7)
GameCooltip:SetOption("TextSize", Details.font_sizes.menus)
GameCooltip:SetBackdrop(1, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
GameCooltip:SetBackdrop(2, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
GameCooltip:ShowCooltip()
end
@@ -53,32 +53,32 @@ function Details:OpenBookmarkConfig()
local button_backdrop = {bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 64, insets = {left=0, right=0, top=0, bottom=0}}
local set_onenter = function(self, capsule)
self:SetBackdropColor (1, 1, 1, 0.9)
capsule.icon:SetBlendMode ("ADD")
self:SetBackdropColor(1, 1, 1, 0.9)
capsule.icon:SetBlendMode("ADD")
end
local set_onleave = function(self, capsule)
self:SetBackdropColor (0, 0, 0, 0.5)
capsule.icon:SetBlendMode ("BLEND")
self:SetBackdropColor(0, 0, 0, 0.5)
capsule.icon:SetBlendMode("BLEND")
end
for i = 1, 40 do
local clear = DF:CreateButton (panel, clear_func, 16, 16, nil, i, nil, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]])
if (i%2 ~= 0) then
--impar
clear:SetPoint (15, (( i*10 ) * -1) - 35) --left
clear:SetPoint(15, (( i*10 ) * -1) - 35) --left
else
--par
local o = i-1
clear:SetPoint (250, (( o*10 ) * -1) - 35) --right
clear:SetPoint(250, (( o*10 ) * -1) - 35) --right
end
local set = DF:CreateButton (panel, set_att, 16, 16, nil, i)
set:SetPoint ("left", clear, "right")
set:SetPoint ("right", clear, "right", 180, 0)
set:SetBackdrop (button_backdrop)
set:SetBackdropColor (0, 0, 0, 0.5)
set:SetHook ("OnEnter", set_onenter)
set:SetHook ("OnLeave", set_onleave)
set:SetPoint("left", clear, "right")
set:SetPoint("right", clear, "right", 180, 0)
set:SetBackdrop(button_backdrop)
set:SetBackdropColor(0, 0, 0, 0.5)
set:SetHook("OnEnter", set_onenter)
set:SetHook("OnLeave", set_onleave)
--set:InstallCustomTexture (nil, nil, nil, nil, true)
set:SetTemplate (DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
@@ -88,10 +88,10 @@ function Details:OpenBookmarkConfig()
set.bg = bg_texture
local icon = DF:CreateImage (set, nil, 16, 16, nil, nil, "icon")
icon:SetPoint ("left", clear, "right", 4, 0)
icon:SetPoint("left", clear, "right", 4, 0)
local label = DF:CreateLabel (set, "")
label:SetPoint ("left", icon, "right", 2, 0)
local label = DF:CreateLabel(set, "")
label:SetPoint("left", icon, "right", 2, 0)
tinsert (panel.blocks, {icon = icon, label = label, bg = set.bg, button = set})
end
@@ -106,9 +106,9 @@ function Details:OpenBookmarkConfig()
local bookmark = bookmarks [i]
local this_block = panel.blocks [i]
if (bookmark and bookmark.atributo and bookmark.sub_atributo) then
if (bookmark.atributo == 5) then --> custom
if (bookmark.atributo == 5) then --custom
local CustomObject = Details.custom [bookmark.sub_atributo]
if (not CustomObject) then --> ele j foi deletado
if (not CustomObject) then --ele j foi deletado
this_block.label.text = "-- x -- x --"
this_block.icon.texture = "Interface\\ICONS\\Ability_DualWield"
this_block.icon.texcoord = normal_coords
+14 -14
View File
@@ -18,18 +18,18 @@ function Details:OpenBrokerTextEditor()
local titleBar = DF:CreateTitleBar (panel, "Broker Text Editor")
local textentry = DF:NewSpecialLuaEditorEntry (panel, 650, 270, "editbox", "$parentEntry", true)
textentry:SetPoint ("topleft", panel, "topleft", 2, -25)
textentry:SetPoint("topleft", panel, "topleft", 2, -25)
DF:ApplyStandardBackdrop(textentry)
DF:ReskinSlider(textentry.scroll)
textentry.editbox:SetScript ("OnTextChanged", function()
textentry.editbox:SetScript("OnTextChanged", function()
local text = panel.editbox:GetText()
Details.data_broker_text = text
Details:BrokerTick()
if (_G.DetailsOptionsWindow) then
local dataBrokerString = _G["DetailsOptionsWindowTab" .. tabIndex].widget_list_by_type.textentry[1]
dataBrokerString:SetText (Details.data_broker_text)
dataBrokerString:SetText(Details.data_broker_text)
end
end)
@@ -55,7 +55,7 @@ function Details:OpenBrokerTextEditor()
end
local d = DF:NewDropDown (panel, _, "$parentTextOptionsDropdown", "TextOptionsDropdown", 150, 20, buildAddMenu, 1)
d:SetPoint ("topright", panel, "topright", -12, -25)
d:SetPoint("topright", panel, "topright", -12, -25)
d:SetTemplate(DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local optiontable = {"{dmg}", "{dps}", "{dpos}", "{ddiff}", "{heal}", "{hps}", "{hpos}", "{hdiff}", "{time}"}
@@ -64,7 +64,7 @@ function Details:OpenBrokerTextEditor()
textentry.editbox:Insert (optiontable [option_selected])
end,
nil, nil, nil, "<-")
add_button:SetPoint ("right", d, "left", -2, 0)
add_button:SetPoint("right", d, "left", -2, 0)
add_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
@@ -178,8 +178,8 @@ function Details:OpenBrokerTextEditor()
end
local color_button = DF:NewColorPickButton (panel, "$parentButton5", nil, color_func)
color_button:SetSize (80, 20)
color_button:SetPoint ("topright", panel, "topright", -12, -102)
color_button:SetSize(80, 20)
color_button:SetPoint("topright", panel, "topright", -12, -102)
color_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_COLOR_TOOLTIP"]
color_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
@@ -188,7 +188,7 @@ function Details:OpenBrokerTextEditor()
Details.data_broker_text = text
if (_G.DetailsOptionsWindow) then
local dataBrokerString = _G["DetailsOptionsWindowTab" .. tabIndex].widget_list_by_type.textentry[1]
dataBrokerString:SetText (Details.data_broker_text)
dataBrokerString:SetText(Details.data_broker_text)
end
Details:BrokerTick()
panel:Hide()
@@ -196,17 +196,17 @@ function Details:OpenBrokerTextEditor()
local ok_button = DF:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1)
ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"]
ok_button:SetPoint ("topright", panel, "topright", -12, -174)
ok_button:SetPoint("topright", panel, "topright", -12, -174)
ok_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText ("") end, nil, nil, nil, "Reset", 1)
local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText("") end, nil, nil, nil, "Reset", 1)
reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"]
reset_button:SetPoint ("topright", panel, "topright", -100, -152)
reset_button:SetPoint("topright", panel, "topright", -100, -152)
reset_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText (panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"]
cancel_button:SetPoint ("topright", panel, "topright", -100, -174)
cancel_button:SetPoint("topright", panel, "topright", -100, -174)
cancel_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
@@ -215,7 +215,7 @@ function Details:OpenBrokerTextEditor()
local text = Details.data_broker_text:gsub ("||", "|")
panel.default_text = text
panel.editbox:SetText (text)
panel.editbox:SetText(text)
panel:Show()
end
+5 -5
View File
@@ -42,7 +42,7 @@ function Details.CooldownTracking.DisableTracker()
end
--> Library Open Raid Callbacks
--Library Open Raid Callbacks
--callback on the event 'CooldownListUpdate', this is triggered when a player in the group sent the list of cooldowns
--@unitId: which unit got updated
--@unitCooldows: a table with [spellId] = cooldownInfo
@@ -100,10 +100,10 @@ end
end
--> Frames
--Frames
--hide all bars created
function Details.CooldownTracking.HideAllBars()
for _, bar in ipairs (DetailsOnlineCDTrackerScreenPanel.bars) do
for _, bar in ipairs(DetailsOnlineCDTrackerScreenPanel.bars) do
bar:ClearAllPoints()
bar:Hide()
@@ -210,7 +210,7 @@ end
end
end
--> update cooldown frames based on the amount of players in the group or raid
--update cooldown frames based on the amount of players in the group or raid
function Details.CooldownTracking.RefreshCooldownFrames()
local screenPanel = DetailsOnlineCDTrackerScreenPanel
@@ -333,7 +333,7 @@ end
end
--> Options panel
--Options panel
--initialize the cooldown options window and embed it to Details! options panel
function Details:InitializeCDTrackerWindow()
+7 -7
View File
@@ -4,7 +4,7 @@ local Details = _G.Details
local DF = _G.DetailsFramework
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
--> config class colors
--config class colors
function Details:OpenClassColorsConfig()
if (not _G.DetailsClassColorManager) then
DF:CreateSimplePanel (UIParent, 300, 425, Loc ["STRING_OPTIONS_CLASSCOLOR_MODIFY"], "DetailsClassColorManager")
@@ -13,8 +13,8 @@ function Details:OpenClassColorsConfig()
DF:ApplyStandardBackdrop(panel)
panel:SetBackdropColor(.1, .1, .1, .9)
local upper_panel = CreateFrame ("frame", nil, panel,"BackdropTemplate")
upper_panel:SetAllPoints (panel)
local upper_panel = CreateFrame("frame", nil, panel,"BackdropTemplate")
upper_panel:SetAllPoints(panel)
upper_panel:SetFrameLevel (panel:GetFrameLevel()+3)
local y = -50
@@ -24,7 +24,7 @@ function Details:OpenClassColorsConfig()
Details.class_colors [self.MyObject.my_class][1] = r
Details.class_colors [self.MyObject.my_class][2] = g
Details.class_colors [self.MyObject.my_class][3] = b
Details:RefreshMainWindow (-1, true)
Details:RefreshMainWindow(-1, true)
end
local set_color = function(self, button, class, index)
@@ -40,7 +40,7 @@ function Details:OpenClassColorsConfig()
Details.class_colors [self.MyObject.my_class][1] = r
Details.class_colors [self.MyObject.my_class][2] = g
Details.class_colors [self.MyObject.my_class][3] = b
Details:RefreshMainWindow (-1, true)
Details:RefreshMainWindow(-1, true)
end
local on_enter = function(self, capsule)
@@ -86,8 +86,8 @@ function Details:OpenClassColorsConfig()
button.my_icon = icon
button.my_texture = backgroundTexture
button.my_class = className
button:SetHook ("OnEnter", on_enter)
button:SetHook ("OnLeave", on_leave)
button:SetHook("OnEnter", on_enter)
button:SetHook("OnLeave", on_leave)
button:SetClickFunction (reset_color, nil, nil, "RightClick")
panel.buttons [className] = button
end
+15 -15
View File
@@ -3,19 +3,19 @@ do
local _detalhes = _G._detalhes
local DetailsFrameWork = _detalhes.gump
local _
--> panel
--panel
function _detalhes:CreateCopyPasteWindow()
local panel = CreateFrame ("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate")
panel:SetSize (512, 148)
local panel = CreateFrame("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate")
panel:SetSize(512, 148)
tinsert (UISpecialFrames, "DetailsCopy")
panel:SetFrameStrata ("TOOLTIP")
panel:SetPoint ("center", UIParent, "center")
panel:SetPoint("center", UIParent, "center")
panel.locked = false
panel:SetToplevel (true)
panel:SetMovable (true)
panel:SetScript ("OnMouseDown", function(self, button)
panel:SetScript("OnMouseDown", function(self, button)
if (self.isMoving) then
return
end
@@ -26,7 +26,7 @@ do
self.isMoving = true
end
end)
panel:SetScript ("OnMouseUp", function(self, button)
panel:SetScript("OnMouseUp", function(self, button)
if (self.isMoving and button == "LeftButton") then
self:StopMovingOrSizing()
self.isMoving = nil
@@ -34,19 +34,19 @@ do
end)
DetailsFrameWork:NewImage (panel, "Interface\\AddOns\\Details\\images\\copy", 512, 128, "overlay", nil, "background", "$parentBackGround")
panel.background:SetPoint (0, -25)
panel.background:SetPoint(0, -25)
--> title
--panel.TitleText:SetText ("Paste & Copy") --10.0 fuck
--panel.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
--title
--panel.TitleText:SetText("Paste & Copy") --10.0 fuck
--panel.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
DetailsFrameWork:NewTextEntry (panel, _, "$parentTextEntry", "text", 476, 14)
panel.text:SetPoint (20, -127)
panel.text:SetHook ("OnEditFocusLost", function() panel:Hide() end)
panel.text:SetHook ("OnChar", function() panel:Hide() end)
panel.text:SetPoint(20, -127)
panel.text:SetHook("OnEditFocusLost", function() panel:Hide() end)
panel.text:SetHook("OnChar", function() panel:Hide() end)
DetailsFrameWork:NewLabel (panel, _, _, "desc", "paste on your web browser address bar", "OptionsFontHighlightSmall", 12)
panel.desc:SetPoint (340, -78)
DetailsFrameWork:NewLabel(panel, _, _, "desc", "paste on your web browser address bar", "OptionsFontHighlightSmall", 12)
panel.desc:SetPoint(340, -78)
panel.desc.width = 150
panel.desc.height = 25
panel.desc.align = "|"
+101 -101
View File
@@ -17,9 +17,9 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
local DF = _detalhes.gump
local f = DF:CreateSimplePanel (UIParent, 700, 400, "Details! Arena Damage Bar Options", "DetailsCurrentRealDPSOptions")
f:SetPoint ("center", UIParent, "center")
f:SetScript ("OnMouseDown", nil)
f:SetScript ("OnMouseUp", nil)
f:SetPoint("center", UIParent, "center")
f:SetScript("OnMouseDown", nil)
f:SetScript("OnMouseUp", nil)
--scale bar
local scaleBar = DF:CreateScaleBar(f, _detalhes.realtime_dps_meter.options_frame)
@@ -51,7 +51,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
local testUsing = "arena" --mythicdungeon
--> frame strata options
--frame strata options
local set_frame_strata = function(_, _, strata)
Details.realtime_dps_meter.frame_settings.strata = strata
Details:UpdateTheRealCurrentDPSFrame(testUsing)
@@ -63,7 +63,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
strataTable [4] = {value = "HIGH", label = "HIGH", onclick = set_frame_strata}
strataTable [5] = {value = "DIALOG", label = "DIALOG", onclick = set_frame_strata}
--> font options
--font options
local set_font_shadow= function(_, _, shadow)
Details.realtime_dps_meter.font_shadow = shadow
Details:UpdateTheRealCurrentDPSFrame(testUsing)
@@ -91,7 +91,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
end
end
--> options table
--options table
local options = {
{type = "label", get = function() return "Frame Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
@@ -289,17 +289,17 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
DF:BuildMenu (f, options, 7, -50, 500, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
f:SetScript ("OnHide" , function()
f:SetScript("OnHide" , function()
if (DetailsCurrentDpsMeter) then
--> check if can hide the main frame as well
--> we force show the main frame for the user see the frame while editing the options
--check if can hide the main frame as well
--we force show the main frame for the user see the frame while editing the options
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
if ((instanceType ~= "party" and difficultyID ~= 8) and instanceType ~= "arena") then
DetailsCurrentDpsMeter:Hide()
end
end
--> reopen the options panel
--reopen the options panel
if (f.FromOptionsPanel) then
C_Timer.After (0.2, function()
Details:OpenOptionsWindow(Details:GetInstance(1))
@@ -310,17 +310,17 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
C_Timer.After(1, lockCallback)
end
--> check if the frame was been created
--check if the frame was been created
if (not DetailsCurrentDpsMeter) then
Details:CreateCurrentDpsFrame(UIParent, "DetailsCurrentDpsMeter")
end
--> show the options
--show the options
DetailsCurrentRealDPSOptions:Show()
DetailsCurrentRealDPSOptions:RefreshOptions()
DetailsCurrentRealDPSOptions.FromOptionsPanel = from_options_panel
--> start the frame for viewing while editing the options
--start the frame for viewing while editing the options
DetailsCurrentDpsMeter:StartForArenaMatch()
end
@@ -333,17 +333,17 @@ function Details:CreateCurrentDpsFrame(parent, name)
green_team_color = Details.class_colors.ARENA_GREEN --{.5, 1, .5, 1}
yellow_team_color = Details.class_colors.ARENA_YELLOW --{1, 1, .5, 1}
--> some constants
--some constants
local header_size = 12 --title bar size
local spacing_vertical = -6 --vertical space between the group anchor and the group dps
--> main farame
local f = CreateFrame ("frame", name, parent or UIParent, "BackdropTemplate")
f:SetPoint ("top", UIParent, "top", 0, -110)
f:SetSize (_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
--main farame
local f = CreateFrame("frame", name, parent or UIParent, "BackdropTemplate")
f:SetPoint("top", UIParent, "top", 0, -110)
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropColor (unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropColor(unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
f:EnableMouse (true)
f:SetMovable (true)
f:SetClampedToScreen (true)
@@ -404,7 +404,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
end
end)
--> arena dps bars
--arena dps bars
--code for the dps bars shown in arenas
--frame to support the two bars, one for the dps and another for heal
@@ -463,26 +463,26 @@ function Details:CreateCurrentDpsFrame(parent, name)
rightOrnamentTexture:SetSize(32, 32)
rightOrnamentTexture:SetAlpha(0.6)
--> title bar
--title bar
local TitleString = f:CreateFontString (nil, "overlay", "GameFontNormal")
TitleString:SetPoint ("top", f, "top", 0, -5)
TitleString:SetText ("Details! Arena Real Time DPS Tracker")
TitleString:SetPoint("top", f, "top", 0, -5)
TitleString:SetText("Details! Arena Real Time DPS Tracker")
DF:SetFontSize (TitleString, 9)
local TitleBackground = f:CreateTexture (nil, "artwork")
TitleBackground:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
local TitleBackground = f:CreateTexture(nil, "artwork")
TitleBackground:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
TitleBackground:SetVertexColor (.1, .1, .1, .9)
TitleBackground:SetVertexColor (.1, .1, .1, 0)
TitleBackground:SetPoint ("topleft", f, "topleft")
TitleBackground:SetPoint ("topright", f, "topright")
TitleBackground:SetHeight (header_size)
TitleBackground:SetPoint("topleft", f, "topleft")
TitleBackground:SetPoint("topright", f, "topright")
TitleBackground:SetHeight(header_size)
--> labels for arena
--labels for arena
local labelPlayerTeam_DPS = barFrame.splitBar:CreateFontString(nil, "overlay", "GameFontNormal")
local labelYellowTeam_DPS = barFrame.splitBar:CreateFontString(nil, "overlay", "GameFontNormal")
labelPlayerTeam_DPS:SetText ("0")
labelYellowTeam_DPS:SetText ("0")
labelPlayerTeam_DPS:SetPoint ("left", barFrame.splitBar.widget, "left", 4, 0)
labelYellowTeam_DPS:SetPoint ("right", barFrame.splitBar.widget, "right", -4, 0)
labelPlayerTeam_DPS:SetText("0")
labelYellowTeam_DPS:SetText("0")
labelPlayerTeam_DPS:SetPoint("left", barFrame.splitBar.widget, "left", 4, 0)
labelYellowTeam_DPS:SetPoint("right", barFrame.splitBar.widget, "right", -4, 0)
function f.SwapArenaTeamColors()
green_team_color = Details.class_colors.ARENA_GREEN
@@ -497,27 +497,27 @@ function Details:CreateCurrentDpsFrame(parent, name)
end
end
--> labels for mythic dungeon / group party
--labels for mythic dungeon / group party
local labelGroupDamage = f:CreateFontString (nil, "overlay", "GameFontNormal")
labelGroupDamage:SetText ("Real Time Group DPS")
labelGroupDamage:SetText("Real Time Group DPS")
DF:SetFontSize (labelGroupDamage, 14)
DF:SetFontOutline (labelGroupDamage, "NONE")
local labelGroupDamage_DPS = f:CreateFontString (nil, "overlay", "GameFontNormal")
labelGroupDamage_DPS:SetText ("0")
labelGroupDamage_DPS:SetText("0")
labelGroupDamage:SetPoint ("center", f, "center", 0, 10)
labelGroupDamage_DPS:SetPoint ("center", labelGroupDamage, "center")
labelGroupDamage_DPS:SetPoint ("top", labelGroupDamage, "bottom", 0, spacing_vertical)
labelGroupDamage:SetPoint("center", f, "center", 0, 10)
labelGroupDamage_DPS:SetPoint("center", labelGroupDamage, "center")
labelGroupDamage_DPS:SetPoint("top", labelGroupDamage, "bottom", 0, spacing_vertical)
--> frame update function
--frame update function
--> update
--update
local time_fraction = 100/1000 --one tick per 100ms
f.NextUpdate = time_fraction --when the next tick occur
f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval --when the labels on the frame receive update
--> arena
--arena
f.PlayerTeamBuffer = {}
f.YellowTeamBuffer = {}
f.PlayerTeamDamage = 0
@@ -525,18 +525,18 @@ function Details:CreateCurrentDpsFrame(parent, name)
f.LastPlayerTeamDamage = 0
f.LastYellowDamage = 0
--> mythic dungeon / party group
--mythic dungeon / party group
f.GroupBuffer = {}
f.GroupTotalDamage = 0
f.LastTickGroupDamage = 0
--> general
--general
f.SampleSize = _detalhes.realtime_dps_meter.sample_size
f.MaxBufferIndex = 1
f.ShowingArena = false
function _detalhes:UpdateTheRealCurrentDPSFrame(scenario)
--> don't run if the featured hasn't loaded
--don't run if the featured hasn't loaded
if (not f) then
return
end
@@ -553,7 +553,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
return
end
--> where the player are
--where the player are
if (scenario == "arena") then
f.SampleSize = _detalhes.realtime_dps_meter.sample_size
@@ -561,26 +561,26 @@ function Details:CreateCurrentDpsFrame(parent, name)
labelPlayerTeam_DPS:Show()
labelYellowTeam_DPS:Show()
--> update arena labels
DF:SetFontColor (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_color)
--update arena labels
DF:SetFontColor(labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_color)
DF:SetFontFace (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_face)
DF:SetFontSize (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_size)
DF:SetFontOutline (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_shadow)
DF:SetFontColor (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_color)
DF:SetFontColor(labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_color)
DF:SetFontFace (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_face)
DF:SetFontSize (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_size)
DF:SetFontOutline (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_shadow)
--> wipe current data for arena
--wipe current data for arena
wipe (f.PlayerTeamBuffer)
wipe (f.YellowTeamBuffer)
--> reset damage
--reset damage
f.PlayerTeamDamage = 0
f.YellowDamage = 0
--> reset last tick damage
--reset last tick damage
f.LastPlayerTeamDamage = 0
f.LastYellowDamage = 0
@@ -606,18 +606,18 @@ function Details:CreateCurrentDpsFrame(parent, name)
labelGroupDamage:Show()
labelGroupDamage_DPS:Show()
DF:SetFontColor (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_color)
DF:SetFontColor(labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_color)
DF:SetFontFace (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_face)
DF:SetFontSize (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_size)
DF:SetFontOutline (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_shadow)
--> wipe current data for mythic dungeon
--wipe current data for mythic dungeon
f.GroupBuffer = {}
--> reset damage
--reset damage
f.GroupTotalDamage = 0
--> reset last tick damage
--reset last tick damage
f.LastTickGroupDamage = 0
--show the frame
@@ -630,25 +630,25 @@ function Details:CreateCurrentDpsFrame(parent, name)
labelYellowTeam_DPS:Hide()
end
--> frame position
f:SetSize (_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
--frame position
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
LibWindow.RegisterConfig (f, _detalhes.realtime_dps_meter.frame_settings)
LibWindow.RestorePosition (f)
--> backdrop color
f:SetBackdropColor (unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
--backdrop color
f:SetBackdropColor(unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
--> set frame size
f:SetSize (_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
--set frame size
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
--> frame is locked
--frame is locked
if (_detalhes.realtime_dps_meter.frame_settings.locked) then
f:EnableMouse (false)
else
f:EnableMouse (true)
end
--> frame can show title
--frame can show title
if (_detalhes.realtime_dps_meter.frame_settings.show_title) then
TitleString:Show()
TitleBackground:Show()
@@ -657,13 +657,13 @@ function Details:CreateCurrentDpsFrame(parent, name)
TitleBackground:Hide()
end
--> frame strata
--frame strata
f:SetFrameStrata (_detalhes.realtime_dps_meter.frame_settings.strata)
--> calcule buffer size
--calcule buffer size
f.MaxBufferIndex = f.SampleSize * time_fraction * 100 --sample size in seconds * fraction * tick milliseconds
--> interval to update the frame
--interval to update the frame
f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval
@@ -677,13 +677,13 @@ function Details:CreateCurrentDpsFrame(parent, name)
self.NextUpdate = self.NextUpdate - deltaTime
if (self.NextUpdate <= 0) then
--> update string
--update string
local currentCombat = _detalhes:GetCombat()
local damageContainer = currentCombat:GetContainer (DETAILS_ATTRIBUTE_DAMAGE)
--> show the current dps during an arena match
--show the current dps during an arena match
if (self.ShowingArena) then
--> the team damage done at this tick
--the team damage done at this tick
local thisTickPlayerTeamDamage = 0
local thisTickYellowDamage = 0
@@ -699,7 +699,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
end
if (actor.nome == _detalhes.playername) then
--> if player isn't in green team > swap colors
--if player isn't in green team > swap colors
if (f.PlayerTeam ~= actor.arena_team) then
f.SwapArenaTeamColors()
f.PlayerTeam = actor.arena_team
@@ -708,41 +708,41 @@ function Details:CreateCurrentDpsFrame(parent, name)
end
end
--> calculate how much damage the team made on this tick
--calculate how much damage the team made on this tick
local playerTeamDamageDone = thisTickPlayerTeamDamage - f.LastPlayerTeamDamage
local yellowDamageDone = thisTickYellowDamage - f.LastYellowDamage
--> add the damage to buffer
--add the damage to buffer
tinsert (f.PlayerTeamBuffer, 1, playerTeamDamageDone)
tinsert (f.YellowTeamBuffer, 1, yellowDamageDone)
--> save the current damage amount
--save the current damage amount
f.LastPlayerTeamDamage = thisTickPlayerTeamDamage
f.LastYellowDamage = thisTickYellowDamage
--> add the damage to current total damage
--add the damage to current total damage
f.PlayerTeamDamage = f.PlayerTeamDamage + playerTeamDamageDone
f.YellowDamage = f.YellowDamage + yellowDamageDone
--> remove player team damage
--remove player team damage
local removedDamage = tremove (f.PlayerTeamBuffer, f.MaxBufferIndex+1)
if (removedDamage) then
f.PlayerTeamDamage = f.PlayerTeamDamage - removedDamage
--> be save
--be save
f.PlayerTeamDamage = max (0, f.PlayerTeamDamage)
end
--> remove yellow damage
--remove yellow damage
local removedDamage = tremove (f.YellowTeamBuffer, f.MaxBufferIndex+1)
if (removedDamage) then
f.YellowDamage = f.YellowDamage - removedDamage
--> be save
--be save
f.YellowDamage = max (0, f.YellowDamage)
end
self.NextScreenUpdate = self.NextScreenUpdate - time_fraction --always 0.1
--> update double bar
--update double bar
local teamGreenDps = self.PlayerTeamDamage / self.SampleSize
local teamYellowDps = self.YellowDamage / self.SampleSize
local totalDamage = teamGreenDps + teamYellowDps
@@ -784,11 +784,11 @@ function Details:CreateCurrentDpsFrame(parent, name)
if (self.NextScreenUpdate <= 0) then
if (f.PlayerTeam == 0) then
labelPlayerTeam_DPS:SetText (_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize))
labelYellowTeam_DPS:SetText (_detalhes:ToK2 (self.YellowDamage / self.SampleSize))
labelPlayerTeam_DPS:SetText(_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize))
labelYellowTeam_DPS:SetText(_detalhes:ToK2 (self.YellowDamage / self.SampleSize))
else
labelPlayerTeam_DPS:SetText (_detalhes:ToK2 (self.YellowDamage / self.SampleSize))
labelYellowTeam_DPS:SetText (_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize))
labelPlayerTeam_DPS:SetText(_detalhes:ToK2 (self.YellowDamage / self.SampleSize))
labelYellowTeam_DPS:SetText(_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize))
end
f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval
end
@@ -798,7 +798,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
--iniciava um novo combate e tinha o buffer do combate anterior
--ento dava o total de dano do combate recente menos o que tinha no buffer do round anterior
--> the party damage done at this tick
--the party damage done at this tick
local thisTickGroupDamage = 0
for i, actor in damageContainer:ListActors() do
@@ -807,44 +807,44 @@ function Details:CreateCurrentDpsFrame(parent, name)
end
end
--> calculate how much damage the team made on this tick
--calculate how much damage the team made on this tick
local groupDamageDoneOnThisTick = thisTickGroupDamage - f.LastTickGroupDamage
--> add the damage to buffer
--add the damage to buffer
tinsert (f.GroupBuffer, 1, groupDamageDoneOnThisTick)
--> save the current damage amount
--save the current damage amount
f.LastTickGroupDamage = thisTickGroupDamage
--> add the damage to current total damage
--add the damage to current total damage
f.GroupTotalDamage = f.GroupTotalDamage + groupDamageDoneOnThisTick
--> cicle buffer removing the last index and subtract its damage
--cicle buffer removing the last index and subtract its damage
local removedDamage = tremove (f.GroupBuffer, f.MaxBufferIndex+1)
if (removedDamage) then
--> remove the value from the total damage
--remove the value from the total damage
f.GroupTotalDamage = f.GroupTotalDamage - removedDamage
--> be save
--be save
f.GroupTotalDamage = max (0, f.GroupTotalDamage)
end
self.NextScreenUpdate = self.NextScreenUpdate - time_fraction
if (self.NextScreenUpdate <= 0) then
labelGroupDamage_DPS:SetText (_detalhes:ToK2 (f.GroupTotalDamage / self.SampleSize))
labelGroupDamage_DPS:SetText(_detalhes:ToK2 (f.GroupTotalDamage / self.SampleSize))
f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval
end
end
--> set next update time
--set next update time
self.NextUpdate = time_fraction
end
end
f:SetScript ("OnHide", function()
f:SetScript("OnHide", function()
f.ShowingArena = false
f.ShowingMythicDungeon = false
f:SetScript ("OnUpdate", nil)
f:SetScript("OnUpdate", nil)
end)
function f:StartForArenaMatch()
@@ -853,14 +853,14 @@ function Details:CreateCurrentDpsFrame(parent, name)
Details:UpdateTheRealCurrentDPSFrame("arena")
f.ShowingArena = true
f:SetScript ("OnUpdate", on_tick)
f:SetScript("OnUpdate", on_tick)
end
end
function f:StartForMythicDungeon()
if (not f.ShowingMythicDungeon) then
f.ShowingMythicDungeon = true
f:SetScript ("OnUpdate", on_tick)
f:SetScript("OnUpdate", on_tick)
end
end
@@ -915,7 +915,7 @@ end
function DetailsTestSplitBar()
--> create the frame
--create the frame
local f = CreateFrame("frame", "DetailsTestSplitBarFrame", UIParent)
f:SetSize(400, 200)
f:SetPoint("center")
@@ -939,7 +939,7 @@ function DetailsTestSplitBar()
barFrame.splitBar:SetLeftColor(unpack (green_team_color))
barFrame.splitBar:SetRightColor(unpack (yellow_team_color))
--> test the splitbar
--test the splitbar
local loopTime = 0.1
f:SetScript("OnUpdate", function(self, deltaTime)
loopTime = loopTime - deltaTime
+338 -338
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -57,7 +57,7 @@ DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", {
backdropbordercolor = {0, 0, 0, 1},
})
DF:NewColor ("DETAILS_CUSTOMDISPLAY_ICON", .7, .6, .5, 1)
DF:NewColor("DETAILS_CUSTOMDISPLAY_ICON", .7, .6, .5, 1)
local CONST_CODETEXTENTRY_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX")
local CONST_CODETEXTENTRYEXPANDED_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED")
+27 -27
View File
@@ -5,7 +5,7 @@ local DetailsFramework = _G.DetailsFramework
local C_Timer = _G.C_Timer
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> dump table frame
--dump table frame
function Details:DumpTable (t)
return Details:Dump (t)
@@ -20,24 +20,24 @@ end
function Details:Dump (...)
if (not DetailsDumpFrame) then
DetailsDumpFrame = DetailsFramework:CreateSimplePanel (_G.UIParent)
DetailsDumpFrame:SetSize (700, 600)
DetailsDumpFrame:SetSize(700, 600)
DetailsDumpFrame:SetTitle ("Details! Dump Table [|cFFFF3333Ready Only|r]")
local text_editor = DetailsFramework:NewSpecialLuaEditorEntry (DetailsDumpFrame, 680, 560, "Editbox", "$parentEntry", true)
text_editor:SetPoint ("topleft", DetailsDumpFrame, "topleft", 10, -30)
text_editor:SetPoint("topleft", DetailsDumpFrame, "topleft", 10, -30)
text_editor.scroll:SetBackdrop (nil)
text_editor.editbox:SetBackdrop (nil)
text_editor:SetBackdrop (nil)
text_editor.scroll:SetBackdrop(nil)
text_editor.editbox:SetBackdrop(nil)
text_editor:SetBackdrop(nil)
DetailsFramework:ReskinSlider(text_editor.scroll)
if (not text_editor.__background) then
text_editor.__background = text_editor:CreateTexture (nil, "background")
text_editor.__background = text_editor:CreateTexture(nil, "background")
end
text_editor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
text_editor:SetBackdropBorderColor (0, 0, 0, 1)
text_editor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
text_editor:SetBackdropBorderColor(0, 0, 0, 1)
text_editor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
text_editor.__background:SetVertexColor (0.27, 0.27, 0.27)
@@ -69,7 +69,7 @@ end
---------------------------------------------------------------------------------------------------------------------------------------
--> import export window
--import export window
--show a window with a big text editor and 2 buttons: okay and cancel.
--cancel button always closes the window and okay calls the comfirm function passed in the argument
--default text is the text shown show the window is show()
@@ -82,27 +82,27 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
if (not _G.DetailsExportWindow) then
local importWindow = DetailsFramework:CreateSimplePanel (_G.UIParent, 800, 610, "Details! Dump String", "DetailsExportWindow")
importWindow:SetFrameStrata ("FULLSCREEN")
importWindow:SetPoint ("center")
importWindow:SetPoint("center")
DetailsFramework:ApplyStandardBackdrop (importWindow, false, 1.2)
local importTextEditor = DetailsFramework:NewSpecialLuaEditorEntry (importWindow, 780, 540, "ImportEditor", "$parentEditor", true)
importTextEditor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
importTextEditor:SetBackdropColor (.2, .2, .2, .5)
importTextEditor:SetBackdropBorderColor (0, 0, 0, 1)
importTextEditor:SetPoint ("topleft", importWindow, "topleft", 10, -30)
importTextEditor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
importTextEditor:SetBackdropColor(.2, .2, .2, .5)
importTextEditor:SetBackdropBorderColor(0, 0, 0, 1)
importTextEditor:SetPoint("topleft", importWindow, "topleft", 10, -30)
importTextEditor.scroll:SetBackdrop (nil)
importTextEditor.editbox:SetBackdrop (nil)
importTextEditor:SetBackdrop (nil)
importTextEditor.scroll:SetBackdrop(nil)
importTextEditor.editbox:SetBackdrop(nil)
importTextEditor:SetBackdrop(nil)
DetailsFramework:ReskinSlider(importTextEditor.scroll)
if (not importTextEditor.__background) then
importTextEditor.__background = importTextEditor:CreateTexture (nil, "background")
importTextEditor.__background = importTextEditor:CreateTexture(nil, "background")
end
importTextEditor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
importTextEditor:SetBackdropBorderColor (0, 0, 0, 1)
importTextEditor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
importTextEditor:SetBackdropBorderColor(0, 0, 0, 1)
importTextEditor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
importTextEditor.__background:SetVertexColor (0.27, 0.27, 0.27)
@@ -118,25 +118,25 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
end
importWindow:Hide()
end
local okayButton = DetailsFramework:CreateButton (importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --> localize-me
local okayButton = DetailsFramework:CreateButton (importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --localize-me
okayButton:SetIcon ([[Interface\BUTTONS\UI-Panel-BiggerButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
importTextEditor.OkayButton = okayButton
--cancel button
local cancelButton = DetailsFramework:CreateButton (importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --> localize-me
local cancelButton = DetailsFramework:CreateButton (importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --localize-me
cancelButton:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
okayButton:SetPoint ("topright", importTextEditor, "bottomright", 0, -10)
cancelButton:SetPoint ("right", okayButton, "left", -20, 0)
okayButton:SetPoint("topright", importTextEditor, "bottomright", 0, -10)
cancelButton:SetPoint("right", okayButton, "left", -20, 0)
end
_G.DetailsExportWindow.ConfirmFunction = confirmFunc
_G.DetailsExportWindow.ImportEditor:SetText (defaultText or "")
_G.DetailsExportWindow.ImportEditor:SetText(defaultText or "")
_G.DetailsExportWindow:Show()
titleText = titleText or "Details! Dump String"
_G.DetailsExportWindow.Title:SetText (titleText)
_G.DetailsExportWindow.Title:SetText(titleText)
C_Timer.After (.2, function()
_G.DetailsExportWindow.ImportEditor:SetFocus (true)
+136 -136
View File
@@ -11,9 +11,9 @@ function Details:OpenEventTrackerOptions (from_options_panel)
local DF = _detalhes.gump
local f = DF:CreateSimplePanel (_G.UIParent, 700, 400, "Details! Event Tracker Options", "DetailsEventTrackerOptions")
f:SetPoint ("center", _G.UIParent, "center")
f:SetScript ("OnMouseDown", nil)
f:SetScript ("OnMouseUp", nil)
f:SetPoint("center", _G.UIParent, "center")
f:SetScript("OnMouseDown", nil)
f:SetScript("OnMouseUp", nil)
local LibWindow = _G.LibStub("LibWindow-1.1")
LibWindow.RegisterConfig (f, _detalhes.event_tracker.options_frame)
LibWindow.MakeDraggable (f)
@@ -25,7 +25,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
--> frame strata options
--frame strata options
local set_frame_strata = function(_, _, strata)
Details.event_tracker.frame.strata = strata
Details:UpdateEventTrackerFrame()
@@ -37,7 +37,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
strataTable [4] = {value = "HIGH", label = "HIGH", onclick = set_frame_strata}
strataTable [5] = {value = "DIALOG", label = "DIALOG", onclick = set_frame_strata}
--> font options
--font options
local set_font_shadow= function(_, _, shadow)
Details.event_tracker.font_shadow = shadow
Details:UpdateEventTrackerFrame()
@@ -52,7 +52,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
Details:UpdateEventTrackerFrame()
end
--> texture options
--texture options
local set_bar_texture = function(_, _, value)
Details.event_tracker.line_texture = value
Details:UpdateEventTrackerFrame()
@@ -66,7 +66,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
end
table.sort (texTable, function(t1, t2) return t1.label < t2.label end)
--> options table
--options table
local options = {
{type = "label", get = function() return "Frame Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
@@ -214,8 +214,8 @@ function Details:OpenEventTrackerOptions (from_options_panel)
DF:BuildMenu (f, options, 7, -30, 500, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
f:SetScript ("OnHide", function()
--> reopen the options panel
f:SetScript("OnHide", function()
--reopen the options panel
if (f.FromOptionsPanel) then
C_Timer.After (0.2, function()
Details:OpenOptionsWindow(Details:GetInstance(1))
@@ -235,9 +235,9 @@ function Details:CreateEventTrackerFrame(parent, name)
local DF = _detalhes.gump
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
--> main farame
local f = CreateFrame ("frame", name, parent or UIParent,"BackdropTemplate")
f:SetPoint ("center", UIParent, "center")
--main farame
local f = CreateFrame("frame", name, parent or UIParent,"BackdropTemplate")
f:SetPoint("center", UIParent, "center")
if (not DetailsFramework.IsDragonflight()) then
f:SetMinResize (150, 40)
@@ -246,13 +246,13 @@ function Details:CreateEventTrackerFrame(parent, name)
--f:SetResizeBounds(150, 40, 800, 1024)
end
f:SetSize (_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
f:SetSize(_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropColor (unpack (_detalhes.event_tracker.frame.backdrop_color))
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropColor(unpack (_detalhes.event_tracker.frame.backdrop_color))
f:EnableMouse (true)
f:SetMovable (true)
f:SetResizable (true)
f:SetResizable(true)
f:SetClampedToScreen (true)
local LibWindow = LibStub ("LibWindow-1.1")
@@ -260,17 +260,17 @@ function Details:CreateEventTrackerFrame(parent, name)
LibWindow.MakeDraggable (f)
LibWindow.RestorePosition (f)
--> two resizers
--two resizers
local left_resize, right_resize = DF:CreateResizeGrips (f)
left_resize:SetScript ("OnMouseDown", function(self)
left_resize:SetScript("OnMouseDown", function(self)
if (not f.resizing and not _detalhes.event_tracker.frame.locked) then
f.resizing = true
f:StartSizing ("bottomleft")
end
end)
left_resize:SetScript ("OnMouseUp", function(self)
left_resize:SetScript("OnMouseUp", function(self)
if (f.resizing) then
f.resizing = false
f:StopMovingOrSizing()
@@ -278,13 +278,13 @@ function Details:CreateEventTrackerFrame(parent, name)
_detalhes.event_tracker.frame.height = f:GetHeight()
end
end)
right_resize:SetScript ("OnMouseDown", function(self)
right_resize:SetScript("OnMouseDown", function(self)
if (not f.resizing and not _detalhes.event_tracker.frame.locked) then
f.resizing = true
f:StartSizing ("bottomright")
end
end)
right_resize:SetScript ("OnMouseUp", function(self)
right_resize:SetScript("OnMouseUp", function(self)
if (f.resizing) then
f.resizing = false
f:StopMovingOrSizing()
@@ -293,33 +293,33 @@ function Details:CreateEventTrackerFrame(parent, name)
end
end)
f:SetScript ("OnSizeChanged", function(self)
f:SetScript("OnSizeChanged", function(self)
end)
--> scroll frame
--scroll frame
--> frame config
--frame config
local scroll_line_amount = 1
local scroll_width = 195
local header_size = 20
--> on tick script
--on tick script
local lineOnTick = function(self, deltaTime)
--> when this event occured on combat log
--when this event occured on combat log
local gameTime = self.GameTime
--> calculate how much time elapsed since the event got triggered
--calculate how much time elapsed since the event got triggered
local elapsedTime = GetTime() - gameTime
--> set the bar animation:
--set the bar animation:
local animationPercent = min (elapsedTime, 1)
self.Statusbar:SetValue (animationPercent)
self.Statusbar:SetValue(animationPercent)
--> set the spark location
--set the spark location
if (animationPercent < 1) then
self.Spark:SetPoint ("left", self, "left", (self:GetWidth() * animationPercent) - 10, 0)
self.Spark:SetPoint("left", self, "left", (self:GetWidth() * animationPercent) - 10, 0)
if (not self.Spark:IsShown()) then
self.Spark:Show()
end
@@ -330,53 +330,53 @@ function Details:CreateEventTrackerFrame(parent, name)
end
end
--> create a line on the scroll frame
--create a line on the scroll frame
local scroll_createline = function(self, index)
local line = CreateFrame ("frame", "$parentLine" .. index, self,"BackdropTemplate")
local line = CreateFrame("frame", "$parentLine" .. index, self,"BackdropTemplate")
line:EnableMouse (false)
line.Index = index --> hack to not trigger error on UpdateWorldTrackerLines since Index is set after this function is ran
line.Index = index --hack to not trigger error on UpdateWorldTrackerLines since Index is set after this function is ran
--> set its backdrop
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
--line:SetBackdropColor (1, 1, 1, 0.75)
--set its backdrop
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
--line:SetBackdropColor(1, 1, 1, 0.75)
--> statusbar
local statusbar = CreateFrame ("statusbar", "$parentStatusBar", line,"BackdropTemplate")
--statusbar
local statusbar = CreateFrame("statusbar", "$parentStatusBar", line,"BackdropTemplate")
statusbar:SetAllPoints()
local statusbartexture = statusbar:CreateTexture (nil, "border")
local statusbartexture = statusbar:CreateTexture(nil, "border")
statusbar:SetStatusBarTexture (statusbartexture)
statusbar:SetMinMaxValues (0, 1)
statusbar:SetValue (0)
statusbar:SetValue(0)
local statusbarspark = statusbar:CreateTexture (nil, "artwork")
statusbarspark:SetTexture ([[Interface\CastingBar\UI-CastingBar-Spark]])
statusbarspark:SetSize (16, 30)
statusbarspark:SetBlendMode ("ADD")
local statusbarspark = statusbar:CreateTexture(nil, "artwork")
statusbarspark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
statusbarspark:SetSize(16, 30)
statusbarspark:SetBlendMode("ADD")
statusbarspark:Hide()
--> create the icon textures and texts - they are all statusbar childs
local lefticon = statusbar:CreateTexture ("$parentLeftIcon", "overlay")
lefticon:SetPoint ("left", line, "left", 0, 0)
--create the icon textures and texts - they are all statusbar childs
local lefticon = statusbar:CreateTexture("$parentLeftIcon", "overlay")
lefticon:SetPoint("left", line, "left", 0, 0)
local righticon = statusbar:CreateTexture ("$parentRightIcon", "overlay")
righticon:SetPoint ("right", line, "right", 0, 0)
local righticon = statusbar:CreateTexture("$parentRightIcon", "overlay")
righticon:SetPoint("right", line, "right", 0, 0)
local lefttext = statusbar:CreateFontString ("$parentLeftText", "overlay", "GameFontNormal")
DF:SetFontSize (lefttext, 9)
lefttext:SetPoint ("left", lefticon, "right", 2, 0)
lefttext:SetPoint("left", lefticon, "right", 2, 0)
local righttext = statusbar:CreateFontString ("$parentRightText", "overlay", "GameFontNormal")
DF:SetFontSize (righttext, 9)
righttext:SetPoint ("right", righticon, "left", -2, 0)
righttext:SetPoint("right", righticon, "left", -2, 0)
lefttext:SetJustifyH ("left")
righttext:SetJustifyH ("right")
lefttext:SetJustifyH("left")
righttext:SetJustifyH("right")
local actionicon = statusbar:CreateTexture ("$parentRightIcon", "overlay")
actionicon:SetPoint ("center", line, "center")
local actionicon = statusbar:CreateTexture("$parentRightIcon", "overlay")
actionicon:SetPoint("center", line, "center")
--> set members
--set members
line.LeftIcon = lefticon
line.RightIcon = righticon
line.LeftText = lefttext
@@ -386,16 +386,16 @@ function Details:CreateEventTrackerFrame(parent, name)
line.Spark = statusbarspark
line.ActionIcon = actionicon
--> set some parameters
--set some parameters
_detalhes:UpdateWorldTrackerLines (line)
--> set scripts
line:SetScript ("OnUpdate", lineOnTick)
--set scripts
line:SetScript("OnUpdate", lineOnTick)
return line
end
--> some consts to help work with indexes
--some consts to help work with indexes
local SPELLTYPE_COOLDOWN = "cooldown"
local SPELLTYPE_INTERRUPT = "interrupt"
local SPELLTYPE_OFFENSIVE = "offensive"
@@ -442,11 +442,11 @@ function Details:CreateEventTrackerFrame(parent, name)
local add_role_and_class_color = function(player_name, player_serial)
--> get the actor object
--get the actor object
local actor = _detalhes.tabela_vigente[1]:GetActor (player_name)
if (actor) then
--> remove realm name
--remove realm name
player_name = _detalhes:GetOnlyName (player_name)
local class, spec, role = actor.classe, actor.spec, actor.role
@@ -454,15 +454,15 @@ function Details:CreateEventTrackerFrame(parent, name)
spec, class = get_spec_or_class (player_serial, player_name)
end
--> add the class color
--add the class color
if (_detalhes.player_class [class]) then
--> is a player, add the class color
--is a player, add the class color
player_name = _detalhes:AddColorString (player_name, class)
end
--add the role icon
if (role ~= "NONE") then
--> have a role
--have a role
player_name = _detalhes:AddRoleIcon (player_name, role, _detalhes.event_tracker.line_height)
end
@@ -471,9 +471,9 @@ function Details:CreateEventTrackerFrame(parent, name)
player_name = _detalhes:GetOnlyName (player_name)
if (class) then
--> add the class color
--add the class color
if (_detalhes.player_class [class]) then
--> is a player, add the class color
--is a player, add the class color
player_name = _detalhes:AddColorString (player_name, class)
end
end
@@ -497,7 +497,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local loops = 20
while (fontstring:GetStringWidth() > size and loops > 0) do
text = strsub (text, 1, #text-1)
fontstring:SetText (text)
fontstring:SetText(text)
loops = loops - 1
end
@@ -518,19 +518,19 @@ function Details:CreateEventTrackerFrame(parent, name)
local spec, class = get_spec_or_class (ability [ABILITYTABLE_CASTERSERIAL], ability [ABILITYTABLE_CASTERNAME])
local texture, L, R, T, B = get_player_icon (spec, class)
line.LeftIcon:SetTexture (texture)
line.LeftIcon:SetTexture(texture)
line.LeftIcon:SetTexCoord (L, R, T, B)
line.LeftText:SetText (_detalhes:GetOnlyName (ability [ABILITYTABLE_CASTERNAME]))
line.LeftText:SetText(_detalhes:GetOnlyName (ability [ABILITYTABLE_CASTERNAME]))
if (ability [ABILITYTABLE_ISENEMY]) then
line:SetBackdropColor (1, .3, .3, 0.5)
line:SetBackdropColor(1, .3, .3, 0.5)
else
line:SetBackdropColor (1, 1, 1, 0.5)
line:SetBackdropColor(1, 1, 1, 0.5)
end
if (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_COOLDOWN) then
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexture(spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
local targetName = ability [ABILITYTABLE_TARGETNAME]
@@ -539,32 +539,32 @@ function Details:CreateEventTrackerFrame(parent, name)
targetName = add_role_and_class_color (targetName, targetSerial)
end
line.RightText:SetText (targetName or spellName)
line.RightText:SetText(targetName or spellName)
line.ActionIcon:SetTexture ([[Interface\AddOns\Details\images\event_tracker_icons]])
line.ActionIcon:SetTexture([[Interface\AddOns\Details\images\event_tracker_icons]])
line.ActionIcon:SetTexCoord (0, 0.125, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_OFFENSIVE) then
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexture(spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
line.RightText:SetText (spellName)
line.RightText:SetText(spellName)
line.ActionIcon:SetTexture ([[Interface\AddOns\Details\images\event_tracker_icons]])
line.ActionIcon:SetTexture([[Interface\AddOns\Details\images\event_tracker_icons]])
line.ActionIcon:SetTexCoord (0.127, 0.25, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_INTERRUPT) then
local spellNameInterrupted, _, spellIconInterrupted = GetSpellInfo(ability [ABILITYTABLE_EXTRASPELLID])
line.RightIcon:SetTexture (spellIconInterrupted)
line.RightIcon:SetTexture(spellIconInterrupted)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
line.RightText:SetText (spellNameInterrupted)
line.RightText:SetText(spellNameInterrupted)
line.ActionIcon:SetTexture ([[Interface\AddOns\Details\images\event_tracker_icons]])
line.ActionIcon:SetTexture([[Interface\AddOns\Details\images\event_tracker_icons]])
line.ActionIcon:SetTexCoord (0.251, 0.375, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_CROWDCONTROL) then
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexture(spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
local targetName = ability [ABILITYTABLE_TARGETNAME]
@@ -573,9 +573,9 @@ function Details:CreateEventTrackerFrame(parent, name)
targetName = add_role_and_class_color (targetName, targetSerial)
end
line.RightText:SetText (targetName or "unknown target")
line.RightText:SetText(targetName or "unknown target")
line.ActionIcon:SetTexture ([[Interface\AddOns\Details\images\event_tracker_icons]])
line.ActionIcon:SetTexture([[Interface\AddOns\Details\images\event_tracker_icons]])
line.ActionIcon:SetTexCoord (0.376, 0.5, 0, 1)
end
@@ -583,7 +583,7 @@ function Details:CreateEventTrackerFrame(parent, name)
shrink_string (line.LeftText, textSize)
shrink_string (line.RightText, textSize)
--> set when the ability was registered on combat log
--set when the ability was registered on combat log
line.GameTime = ability [ABILITYTABLE_GAMETIME]
line:Show()
end
@@ -592,59 +592,59 @@ function Details:CreateEventTrackerFrame(parent, name)
--title text
local TitleString = f:CreateFontString (nil, "overlay", "GameFontNormal")
TitleString:SetPoint ("top", f, "top", 0, -3)
TitleString:SetText ("Details!: Event Tracker")
local TitleBackground = f:CreateTexture (nil, "artwork")
TitleBackground:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
TitleString:SetPoint("top", f, "top", 0, -3)
TitleString:SetText("Details!: Event Tracker")
local TitleBackground = f:CreateTexture(nil, "artwork")
TitleBackground:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
TitleBackground:SetVertexColor (.1, .1, .1, .9)
TitleBackground:SetPoint ("topleft", f, "topleft")
TitleBackground:SetPoint ("topright", f, "topright")
TitleBackground:SetHeight (header_size)
TitleBackground:SetPoint("topleft", f, "topleft")
TitleBackground:SetPoint("topright", f, "topright")
TitleBackground:SetHeight(header_size)
--> table with spells showing on the scroll frame
--table with spells showing on the scroll frame
local CurrentShowing = {}
--> scrollframe
--scrollframe
local scrollframe = DF:CreateScrollBox (f, "$parentScrollFrame", scroll_refresh, CurrentShowing, scroll_width, 400, scroll_line_amount, _detalhes.event_tracker.line_height, scroll_createline, true, true)
scrollframe:SetPoint ("topleft", f, "topleft", 0, -header_size)
scrollframe:SetPoint ("topright", f, "topright", 0, -header_size)
scrollframe:SetPoint ("bottomleft", f, "bottomleft", 0, 0)
scrollframe:SetPoint ("bottomright", f, "bottomright", 0, 0)
scrollframe:SetPoint("topleft", f, "topleft", 0, -header_size)
scrollframe:SetPoint("topright", f, "topright", 0, -header_size)
scrollframe:SetPoint("bottomleft", f, "bottomleft", 0, 0)
scrollframe:SetPoint("bottomright", f, "bottomright", 0, 0)
--> update line - used by 'UpdateWorldTrackerLines' function
--update line - used by 'UpdateWorldTrackerLines' function
local update_line = function(line)
--> get the line index
--get the line index
local index = line.Index
--> update left text
DF:SetFontColor (line.LeftText, _detalhes.event_tracker.font_color)
--update left text
DF:SetFontColor(line.LeftText, _detalhes.event_tracker.font_color)
DF:SetFontFace (line.LeftText, _detalhes.event_tracker.font_face)
DF:SetFontSize (line.LeftText, _detalhes.event_tracker.font_size)
DF:SetFontOutline (line.LeftText, _detalhes.event_tracker.font_shadow)
--> update right text
DF:SetFontColor (line.RightText, _detalhes.event_tracker.font_color)
--update right text
DF:SetFontColor(line.RightText, _detalhes.event_tracker.font_color)
DF:SetFontFace (line.RightText, _detalhes.event_tracker.font_face)
DF:SetFontSize (line.RightText, _detalhes.event_tracker.font_size)
DF:SetFontOutline (line.RightText, _detalhes.event_tracker.font_shadow)
--> adjust where the line is anchored
line:SetPoint ("topleft", line:GetParent(), "topleft", 0, -((index-1)*(_detalhes.event_tracker.line_height+1)))
line:SetPoint ("topright", line:GetParent(), "topright", 0, -((index-1)*(_detalhes.event_tracker.line_height+1)))
--adjust where the line is anchored
line:SetPoint("topleft", line:GetParent(), "topleft", 0, -((index-1)*(_detalhes.event_tracker.line_height+1)))
line:SetPoint("topright", line:GetParent(), "topright", 0, -((index-1)*(_detalhes.event_tracker.line_height+1)))
--> set its height
line:SetHeight (_detalhes.event_tracker.line_height)
--set its height
line:SetHeight(_detalhes.event_tracker.line_height)
--> set texture
--set texture
local texture = SharedMedia:Fetch ("statusbar", _detalhes.event_tracker.line_texture)
line.StatusbarTexture:SetTexture (texture)
line.StatusbarTexture:SetTexture(texture)
line.StatusbarTexture:SetVertexColor (unpack (_detalhes.event_tracker.line_color))
--> set icon size
line.LeftIcon:SetSize (_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
line.RightIcon:SetSize (_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
line.ActionIcon:SetSize (_detalhes.event_tracker.line_height-4, _detalhes.event_tracker.line_height-4)
--set icon size
line.LeftIcon:SetSize(_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
line.RightIcon:SetSize(_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
line.ActionIcon:SetSize(_detalhes.event_tracker.line_height-4, _detalhes.event_tracker.line_height-4)
line.ActionIcon:SetAlpha (0.65)
end
@@ -652,7 +652,7 @@ function Details:CreateEventTrackerFrame(parent, name)
-- /run _detalhes:UpdateWorldTrackerLines()
function _detalhes:UpdateWorldTrackerLines (line)
--> don't run if the featured hasn't loaded
--don't run if the featured hasn't loaded
if (not f) then
return
end
@@ -660,8 +660,8 @@ function Details:CreateEventTrackerFrame(parent, name)
if (line) then
update_line (line)
else
--> update all lines
for index, line in ipairs (scrollframe:GetFrames()) do
--update all lines
for index, line in ipairs(scrollframe:GetFrames()) do
update_line (line)
end
scrollframe:SetFramesHeight (_detalhes.event_tracker.line_height)
@@ -670,12 +670,12 @@ function Details:CreateEventTrackerFrame(parent, name)
end
function _detalhes:UpdateEventTrackerFrame()
--> don't run if the featured hasn't loaded
--don't run if the featured hasn't loaded
if (not f) then
return
end
f:SetSize (_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
f:SetSize(_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
LibWindow.RegisterConfig (f, _detalhes.event_tracker.frame)
LibWindow.RestorePosition (f)
scrollframe:OnSizeChanged()
@@ -693,16 +693,16 @@ function Details:CreateEventTrackerFrame(parent, name)
if (_detalhes.event_tracker.frame.show_title) then
TitleString:Show()
TitleBackground:Show()
scrollframe:SetPoint ("topleft", f, "topleft", 0, -header_size)
scrollframe:SetPoint ("topright", f, "topright", 0, -header_size)
scrollframe:SetPoint("topleft", f, "topleft", 0, -header_size)
scrollframe:SetPoint("topright", f, "topright", 0, -header_size)
else
TitleString:Hide()
TitleBackground:Hide()
scrollframe:SetPoint ("topleft", f, "topleft", 0, 0)
scrollframe:SetPoint ("topright", f, "topright", 0, 0)
scrollframe:SetPoint("topleft", f, "topleft", 0, 0)
scrollframe:SetPoint("topright", f, "topright", 0, 0)
end
f:SetBackdropColor (unpack (_detalhes.event_tracker.frame.backdrop_color))
f:SetBackdropColor(unpack (_detalhes.event_tracker.frame.backdrop_color))
scrollframe.__background:SetVertexColor (unpack (_detalhes.event_tracker.frame.backdrop_color))
f:SetFrameStrata (_detalhes.event_tracker.frame.strata)
@@ -716,20 +716,20 @@ function Details:CreateEventTrackerFrame(parent, name)
scrollframe:CreateLine (scroll_createline)
end
f.scrollframe = scrollframe
scrollframe:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
scrollframe:SetBackdropColor (0, 0, 0, 0)
scrollframe:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
scrollframe:SetBackdropColor(0, 0, 0, 0)
--> get tables used inside the combat parser
--get tables used inside the combat parser
local cooldownListFromFramework = DetailsFramework.CooldownsAllDeffensive
local attackCooldownsFromFramework = DetailsFramework.CooldownsAttack
local crowdControlFromFramework = DetailsFramework.CrowdControlSpells
local combatLog = CreateFrame ("frame")
local combatLog = CreateFrame("frame")
combatLog:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
local OBJECT_TYPE_PLAYER = 0x00000400
local OBJECT_TYPE_ENEMY = 0x00000040
--> combat parser
--combat parser
local is_player = function(flag)
if (not flag) then
return false
@@ -743,22 +743,22 @@ function Details:CreateEventTrackerFrame(parent, name)
return bit.band (flag, OBJECT_TYPE_ENEMY) ~= 0
end
combatLog:SetScript ("OnEvent", function(self, event)
combatLog:SetScript("OnEvent", function(self, event)
local time, token, hidding, caster_serial, caster_name, caster_flags, caster_flags2, target_serial, target_name, target_flags, target_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool = CombatLogGetCurrentEventInfo()
local added = false
--> defensive cooldown
--defensive cooldown
if (token == "SPELL_CAST_SUCCESS" and (cooldownListFromFramework [spellid]) and is_player (caster_flags)) then
tinsert (CurrentShowing, 1, {SPELLTYPE_COOLDOWN, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
added = true
--> offensive cooldown
--offensive cooldown
elseif (token == "SPELL_CAST_SUCCESS" and (attackCooldownsFromFramework [spellid]) and is_player (caster_flags)) then
tinsert (CurrentShowing, 1, {SPELLTYPE_OFFENSIVE, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
added = true
--> crowd control
--crowd control
elseif (token == "SPELL_AURA_APPLIED" and (crowdControlFromFramework [spellid])) then
--check if isnt a pet
if (target_flags and is_player (target_flags)) then
@@ -766,7 +766,7 @@ function Details:CreateEventTrackerFrame(parent, name)
added = true
end
--> spell interrupt
--spell interrupt
elseif (token == "SPELL_INTERRUPT") then
tinsert (CurrentShowing, 1, {SPELLTYPE_INTERRUPT, spellid, caster_name, target_name, time, extraSpellID, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
added = true
+135 -135
View File
@@ -2,7 +2,7 @@
local Details = _G.Details
local L = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
--> default weaktable
--default weaktable
Details.weaktable = {__mode = "v"}
Details:GetFramework():InstallTemplate("button", "DETAILS_FORGE_TEXTENTRY_TEMPLATE", {
@@ -45,7 +45,7 @@ function Details:OpenForge()
--main frame
local f = DetailsForgePanel or Details.gump:CreateSimplePanel (UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel")
f:SetPoint ("center", UIParent, "center")
f:SetPoint("center", UIParent, "center")
f:SetFrameStrata ("HIGH")
f:SetToplevel (true)
f:SetMovable (true)
@@ -62,39 +62,39 @@ function Details:OpenForge()
if (not have_plugins_enabled and false) then
local nopluginLabel = f:CreateFontString (nil, "overlay", "GameFontNormal")
local nopluginIcon = f:CreateTexture (nil, "overlay")
nopluginIcon:SetPoint ("bottomleft", f, "bottomleft", 10, 10)
nopluginIcon:SetSize (16, 16)
nopluginIcon:SetTexture ([[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]])
nopluginLabel:SetPoint ("left", nopluginIcon, "right", 5, 0)
nopluginLabel:SetText (L["STRING_FORGE_ENABLEPLUGINS"])
local nopluginIcon = f:CreateTexture(nil, "overlay")
nopluginIcon:SetPoint("bottomleft", f, "bottomleft", 10, 10)
nopluginIcon:SetSize(16, 16)
nopluginIcon:SetTexture([[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]])
nopluginLabel:SetPoint("left", nopluginIcon, "right", 5, 0)
nopluginLabel:SetText(L["STRING_FORGE_ENABLEPLUGINS"])
end
if (not Details:GetTutorialCVar ("FORGE_TUTORIAL") and false) then
local tutorialFrame = CreateFrame ("frame", "$parentTutorialFrame", f,"BackdropTemplate")
tutorialFrame:SetPoint ("center", f, "center")
local tutorialFrame = CreateFrame("frame", "$parentTutorialFrame", f,"BackdropTemplate")
tutorialFrame:SetPoint("center", f, "center")
tutorialFrame:SetFrameStrata ("DIALOG")
tutorialFrame:SetSize (400, 300)
tutorialFrame:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
tutorialFrame:SetSize(400, 300)
tutorialFrame:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1})
tutorialFrame:SetBackdropColor (0, 0, 0, 1)
tutorialFrame:SetBackdropColor(0, 0, 0, 1)
tutorialFrame.Title = Details.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_TITLE"], 12, "orange")
tutorialFrame.Desc = Details.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_DESC"], 12)
tutorialFrame.Title = Details.gump:CreateLabel(tutorialFrame, L["STRING_FORGE_TUTORIAL_TITLE"], 12, "orange")
tutorialFrame.Desc = Details.gump:CreateLabel(tutorialFrame, L["STRING_FORGE_TUTORIAL_DESC"], 12)
tutorialFrame.Desc.width = 370
tutorialFrame.Example = Details.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_VIDEO"], 12)
tutorialFrame.Example = Details.gump:CreateLabel(tutorialFrame, L["STRING_FORGE_TUTORIAL_VIDEO"], 12)
tutorialFrame.Title:SetPoint ("top", tutorialFrame, "top", 0, -5)
tutorialFrame.Desc:SetPoint ("topleft", tutorialFrame, "topleft", 10, -45)
tutorialFrame.Example:SetPoint ("topleft", tutorialFrame, "topleft", 10, -110)
tutorialFrame.Title:SetPoint("top", tutorialFrame, "top", 0, -5)
tutorialFrame.Desc:SetPoint("topleft", tutorialFrame, "topleft", 10, -45)
tutorialFrame.Example:SetPoint("topleft", tutorialFrame, "topleft", 10, -110)
local editBox = Details.gump:CreateTextEntry (tutorialFrame, function()end, 375, 20, nil, nil, nil, entry_template, label_template)
editBox:SetPoint ("topleft", tutorialFrame.Example, "bottomleft", 0, -10)
editBox:SetText ([[https://www.youtube.com/watch?v=om0k1Yj2pEw]])
editBox:SetPoint("topleft", tutorialFrame.Example, "bottomleft", 0, -10)
editBox:SetText([[https://www.youtube.com/watch?v=om0k1Yj2pEw]])
editBox:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
local closeButton = Details.gump:CreateButton (tutorialFrame, function() Details:SetTutorialCVar ("FORGE_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, L["STRING_OPTIONS_CHART_CLOSE"])
closeButton:SetPoint ("bottom", tutorialFrame, "bottom", 0, 10)
closeButton:SetPoint("bottom", tutorialFrame, "bottom", 0, 10)
closeButton:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
@@ -102,8 +102,8 @@ function Details:OpenForge()
local all_modules = {}
local spell_already_added = {}
f:SetScript ("OnHide", function()
for _, module in ipairs (all_modules) do
f:SetScript("OnHide", function()
for _, module in ipairs(all_modules) do
if (module.data) then
wipe (module.data)
end
@@ -111,37 +111,37 @@ function Details:OpenForge()
wipe (spell_already_added)
end)
f.bg1 = f:CreateTexture (nil, "background")
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.7)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetSize (790, 454)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor (.5, .5, .5, .5)
f:SetBackdropBorderColor (0, 0, 0, 1)
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor(.5, .5, .5, .5)
f:SetBackdropBorderColor(0, 0, 0, 1)
--[=[
--scroll gradient
local blackdiv = f:CreateTexture (nil, "artwork")
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
local blackdiv = f:CreateTexture(nil, "artwork")
blackdiv:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
blackdiv:SetAlpha (1)
blackdiv:SetPoint ("topleft", f, "topleft", 170, -100)
blackdiv:SetHeight (461)
blackdiv:SetWidth (200)
blackdiv:SetPoint("topleft", f, "topleft", 170, -100)
blackdiv:SetHeight(461)
blackdiv:SetWidth(200)
--big gradient
local blackdiv = f:CreateTexture (nil, "artwork")
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
local blackdiv = f:CreateTexture(nil, "artwork")
blackdiv:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
blackdiv:SetAlpha (0.7)
blackdiv:SetPoint ("topleft", f, "topleft", 0, 0)
blackdiv:SetPoint ("bottomleft", f, "bottomleft", 0, 0)
blackdiv:SetWidth (200)
blackdiv:SetPoint("topleft", f, "topleft", 0, 0)
blackdiv:SetPoint("bottomleft", f, "bottomleft", 0, 0)
blackdiv:SetWidth(200)
--]=]
local no_func = function()end
@@ -160,16 +160,16 @@ function Details:OpenForge()
desc = L["STRING_FORGE_BUTTON_PLAYERS_DESC"],
filters_widgets = function()
if (not DetailsForgeAllPlayersFilterPanel) then
local w = CreateFrame ("frame", "DetailsForgeAllPlayersFilterPanel", f, "BackdropTemplate")
w:SetSize (600, 20)
w:SetPoint ("topleft", f, "topleft", 164, -40)
local w = CreateFrame("frame", "DetailsForgeAllPlayersFilterPanel", f, "BackdropTemplate")
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_PLAYERNAME"] .. ": ")
label:SetPoint ("left", w, "left", 5, 0)
label:SetText(L["STRING_FORGE_FILTER_PLAYERNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPlayersNameFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeAllPlayersFilterPanel
@@ -177,7 +177,7 @@ function Details:OpenForge()
search = function()
local t = {}
local filter = DetailsForgeAllPlayersNameFilter:GetText()
for _, actor in ipairs (Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
for _, actor in ipairs(Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
if (actor:IsGroupPlayer()) then
if (filter ~= "") then
filter = lower (filter)
@@ -224,24 +224,24 @@ function Details:OpenForge()
desc = L["STRING_FORGE_BUTTON_PETS_DESC"],
filters_widgets = function()
if (not DetailsForgeAllPetsFilterPanel) then
local w = CreateFrame ("frame", "DetailsForgeAllPetsFilterPanel", f, "BackdropTemplate")
w:SetSize (600, 20)
w:SetPoint ("topleft", f, "topleft", 164, -40)
local w = CreateFrame("frame", "DetailsForgeAllPetsFilterPanel", f, "BackdropTemplate")
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_PETNAME"] .. ": ")
label:SetPoint ("left", w, "left", 5, 0)
label:SetText(L["STRING_FORGE_FILTER_PETNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPetsNameFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_OWNERNAME"] .. ": ")
label:SetPoint ("left", entry.widget, "right", 20, 0)
label:SetText(L["STRING_FORGE_FILTER_OWNERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPetsOwnerFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeAllPetsFilterPanel
@@ -250,7 +250,7 @@ function Details:OpenForge()
local t = {}
local filter_petname = DetailsForgeAllPetsNameFilter:GetText()
local filter_ownername = DetailsForgeAllPetsOwnerFilter:GetText()
for _, actor in ipairs (Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
for _, actor in ipairs(Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
if (actor.owner) then
local can_add = true
if (filter_petname ~= "") then
@@ -311,16 +311,16 @@ function Details:OpenForge()
desc = L["STRING_FORGE_BUTTON_ENEMIES_DESC"],
filters_widgets = function()
if (not DetailsForgeAllEnemiesFilterPanel) then
local w = CreateFrame ("frame", "DetailsForgeAllEnemiesFilterPanel", f, "BackdropTemplate")
w:SetSize (600, 20)
w:SetPoint ("topleft", f, "topleft", 164, -40)
local w = CreateFrame("frame", "DetailsForgeAllEnemiesFilterPanel", f, "BackdropTemplate")
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_ENEMYNAME"] .. ": ")
label:SetPoint ("left", w, "left", 5, 0)
label:SetText(L["STRING_FORGE_FILTER_ENEMYNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllEnemiesNameFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeAllEnemiesFilterPanel
@@ -328,7 +328,7 @@ function Details:OpenForge()
search = function()
local t = {}
local filter = DetailsForgeAllEnemiesNameFilter:GetText()
for _, actor in ipairs (Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
for _, actor in ipairs(Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
if (actor:IsNeutralOrEnemy()) then
if (filter ~= "") then
filter = lower (filter)
@@ -408,24 +408,24 @@ function Details:OpenForge()
desc = L["STRING_FORGE_BUTTON_ALLSPELLS_DESC"],
filters_widgets = function()
if (not DetailsForgeAllSpellsFilterPanel) then
local w = CreateFrame ("frame", "DetailsForgeAllSpellsFilterPanel", f, "BackdropTemplate")
w:SetSize (600, 20)
w:SetPoint ("topleft", f, "topleft", 164, -40)
local w = CreateFrame("frame", "DetailsForgeAllSpellsFilterPanel", f, "BackdropTemplate")
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
label:SetPoint ("left", w, "left", 5, 0)
label:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllSpellsNameFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
label:SetPoint ("left", entry.widget, "right", 20, 0)
label:SetText(L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllSpellsCasterFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeAllSpellsFilterPanel
@@ -441,14 +441,14 @@ function Details:OpenForge()
local SpellPoll = Details.spell_pool
for spellID, className in pairs (SpellPoll) do
if (type (spellID) == "number" and spellID > 12) then
if (type(spellID) == "number" and spellID > 12) then
local can_add = true
if (lower_FilterCaster ~= "") then
--class name are stored as numbers for players and string for non-player characters
local classNameOriginal = className
if (type (className) == "number") then
if (type(className) == "number") then
className = Details.classid_to_classstring [className]
className = lower (className)
else
@@ -538,32 +538,32 @@ function Details:OpenForge()
filters_widgets = function()
if (not DetailsForgeEncounterBossSpellsFilterPanel) then
local w = CreateFrame ("frame", "DetailsForgeEncounterBossSpellsFilterPanel", f, "BackdropTemplate")
w:SetSize (600, 20)
w:SetPoint ("topleft", f, "topleft", 164, -40)
local w = CreateFrame("frame", "DetailsForgeEncounterBossSpellsFilterPanel", f, "BackdropTemplate")
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
label:SetPoint ("left", w, "left", 5, 0)
label:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsNameFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
label:SetPoint ("left", entry.widget, "right", 20, 0)
label:SetText(L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsCasterFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint ("left", entry.widget, "right", 20, 0)
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsEncounterFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeEncounterBossSpellsFilterPanel
@@ -698,13 +698,13 @@ function Details:OpenForge()
filters_widgets = function()
if (not DetailsForgeEncounterNpcIDsFilterPanel) then
local npcIdFrame = CreateFrame ("frame", "DetailsForgeEncounterNpcIDsFilterPanel", f, "BackdropTemplate")
npcIdFrame:SetSize (600, 20)
npcIdFrame:SetPoint ("topleft", f, "topleft", 164, -40)
local npcIdFrame = CreateFrame("frame", "DetailsForgeEncounterNpcIDsFilterPanel", f, "BackdropTemplate")
npcIdFrame:SetSize(600, 20)
npcIdFrame:SetPoint("topleft", f, "topleft", 164, -40)
local filterSpellNameLabel = npcIdFrame:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
filterSpellNameLabel:SetText (L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
filterSpellNameLabel:SetPoint ("left", npcIdFrame, "left", 5, 0)
filterSpellNameLabel:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
filterSpellNameLabel:SetPoint("left", npcIdFrame, "left", 5, 0)
local searchEntry = fw:CreateTextEntry(npcIdFrame, nil, 120, 20, "entry", "DetailsForgeEncounterNpcIDsFilter")
searchEntry:SetHook("OnTextChanged", function() f:refresh() end)
@@ -772,7 +772,7 @@ function Details:OpenForge()
local data = all_modules [4].data [row]
local spellname, spellicon, _
if (type (data [7]) == "number") then
if (type(data [7]) == "number") then
spellname, _, spellicon = GetSpellInfo(data [7])
else
if (data [7]) then
@@ -793,24 +793,24 @@ function Details:OpenForge()
desc = L["STRING_FORGE_BUTTON_DBMTIMERS_DESC"],
filters_widgets = function()
if (not DetailsForgeDBMBarsFilterPanel) then
local w = CreateFrame ("frame", "DetailsForgeDBMBarsFilterPanel", f, "BackdropTemplate")
w:SetSize (600, 20)
w:SetPoint ("topleft", f, "topleft", 164, -40)
local w = CreateFrame("frame", "DetailsForgeDBMBarsFilterPanel", f, "BackdropTemplate")
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
label:SetPoint ("left", w, "left", 5, 0)
label:SetText(L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsTextFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint ("left", entry.widget, "right", 20, 0)
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsEncounterFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeDBMBarsFilterPanel
@@ -904,7 +904,7 @@ function Details:OpenForge()
local spellname, spellicon, _
local spellid = tonumber (data [2])
if (type (spellid) == "number") then
if (type(spellid) == "number") then
if (spellid < 0) then
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = DetailsFramework.EncounterJournal.EJ_GetSectionInfo (abs (spellid))
spellname, spellicon = title, abilityIcon
@@ -913,8 +913,8 @@ function Details:OpenForge()
end
Details:OpenAuraPanel (data [2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = data [2], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
elseif (type (data [2]) == "string") then
--> "Xhul'horac" Imps
elseif (type(data [2]) == "string") then
--"Xhul'horac" Imps
Details:OpenAuraPanel (data [2], data[3], data[5], data.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = data [2], text = "Next " .. (data[3] or "") .. " In", text_size = 72, icon = data[5]})
end
end
@@ -924,24 +924,24 @@ function Details:OpenForge()
desc = L["STRING_FORGE_BUTTON_BWTIMERS_DESC"],
filters_widgets = function()
if (not DetailsForgeBigWigsBarsFilterPanel) then
local w = CreateFrame ("frame", "DetailsForgeBigWigsBarsFilterPanel", f, "BackdropTemplate")
w:SetSize (600, 20)
w:SetPoint ("topleft", f, "topleft", 164, -40)
local w = CreateFrame("frame", "DetailsForgeBigWigsBarsFilterPanel", f, "BackdropTemplate")
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
label:SetPoint ("left", w, "left", 5, 0)
label:SetText(L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBigWigsBarsTextFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText (L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint ("left", entry.widget, "right", 20, 0)
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBWBarsEncounterFilter")
entry:SetHook ("OnTextChanged", function() f:refresh() end)
entry:SetPoint ("left", label, "right", 2, 0)
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
--
end
@@ -1041,7 +1041,7 @@ function Details:OpenForge()
end
end
for index, button in ipairs (buttons) do
for index, button in ipairs(buttons) do
button:SetTemplate (CONST_BUTTON_TEMPLATE)
end
buttons[module_number]:SetTemplate (CONST_BUTTONSELECTED_TEMPLATE)
@@ -1053,10 +1053,10 @@ function Details:OpenForge()
local fillpanel = module.fill_panel
if (not fillpanel) then
fillpanel = fw:NewFillPanel (f, module.header, module.fill_name, nil, 740, 481, module.fill_gettotal, module.fill_fillrows, false)
fillpanel:SetPoint (170, -80)
fillpanel:SetPoint(170, -80)
fillpanel.module = module
local background = fillpanel:CreateTexture (nil, "background")
local background = fillpanel:CreateTexture(nil, "background")
background:SetAllPoints()
background:SetColorTexture (0, 0, 0, 0.2)
@@ -1074,7 +1074,7 @@ function Details:OpenForge()
for o = 1, #fillpanel.scrollframe.lines do
for i = 1, #fillpanel.scrollframe.lines [o].entry_inuse do
--> text entry
--text entry
fillpanel.scrollframe.lines [o].entry_inuse [i]:SetTemplate (fw:GetTemplate ("button", "DETAILS_FORGE_TEXTENTRY_TEMPLATE"))
end
end
@@ -1114,16 +1114,16 @@ function Details:OpenForge()
b:SetTemplate (CONST_BUTTON_TEMPLATE)
b:SetIcon ([[Interface\BUTTONS\UI-GuildButton-PublicNote-Up]], nil, nil, nil, nil, {1, 1, 1, 0.7})
b:SetWidth (140)
b:SetWidth(140)
if (lastButton) then
if (brackets[i]) then
b:SetPoint ("topleft", lastButton, "bottomleft", 0, -23)
b:SetPoint("topleft", lastButton, "bottomleft", 0, -23)
else
b:SetPoint ("topleft", lastButton, "bottomleft", 0, -8)
b:SetPoint("topleft", lastButton, "bottomleft", 0, -8)
end
else
b:SetPoint ("topleft", f, "topleft", 10, (i*16*-1) - 67)
b:SetPoint("topleft", f, "topleft", 10, (i*16*-1) - 67)
end
lastButton = b
+31 -31
View File
@@ -35,32 +35,32 @@ function Details.OpenMacrosWindow()
local scrollbox_line_height = 79.5
local scrollbox_size = {890, 563}
f.bg1 = f:CreateTexture (nil, "background")
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.8)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetSize (790, 454)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor (.5, .5, .5, .7)
f:SetBackdropBorderColor (0, 0, 0, 1)
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor(.5, .5, .5, .7)
f:SetBackdropBorderColor(0, 0, 0, 1)
local macrosAvailable = Details.MacroList
local OnEnterMacroButton = function(self)
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color_onenter))
self:SetBackdropColor(unpack (scrollbox_line_backdrop_color_onenter))
end
local onLeaveMacroButton = function(self)
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color))
self:SetBackdropColor(unpack (scrollbox_line_backdrop_color))
end
local updateMacroLine = function(self, index, title, desc, macroText)
self.Title:SetText (title)
self.Desc:SetText (desc)
self.MacroTextEntry:SetText (macroText)
self.Title:SetText(title)
self.Desc:SetText(desc)
self.MacroTextEntry:SetText(macroText)
end
local textEntryOnFocusGained = function(self)
@@ -84,21 +84,21 @@ function Details.OpenMacrosWindow()
local macroListCreateLine = function(self, index)
--create a new line
local line = CreateFrame ("button", "$parentLine" .. index, self,"BackdropTemplate")
local line = CreateFrame("button", "$parentLine" .. index, self,"BackdropTemplate")
--set its parameters
line:SetPoint ("topleft", self, "topleft", 0, -((index-1) * (scrollbox_line_height+1)))
line:SetSize (scrollbox_size[1], scrollbox_line_height)
line:SetScript ("OnEnter", OnEnterMacroButton)
line:SetScript ("OnLeave", onLeaveMacroButton)
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
line:SetBackdropColor (unpack (scrollbox_line_backdrop_color))
line:SetBackdropBorderColor (0, 0, 0, 0.3)
line:SetPoint("topleft", self, "topleft", 0, -((index-1) * (scrollbox_line_height+1)))
line:SetSize(scrollbox_size[1], scrollbox_line_height)
line:SetScript("OnEnter", OnEnterMacroButton)
line:SetScript("OnLeave", onLeaveMacroButton)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
line:SetBackdropColor(unpack (scrollbox_line_backdrop_color))
line:SetBackdropBorderColor(0, 0, 0, 0.3)
local titleLabel = DF:CreateLabel (line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local titleLabel = DF:CreateLabel(line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
titleLabel.textsize = 14
titleLabel.textcolor = "yellow"
local descLabel = DF:CreateLabel (line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local descLabel = DF:CreateLabel(line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
descLabel.textsize = 12
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
@@ -107,14 +107,14 @@ function Details.OpenMacrosWindow()
options_dropdown_template.onenterbordercolor = {.51, .51, .51, .2}
local textEntry = DF:CreateTextEntry (line, function()end, scrollbox_size[1] - 10, 40, "MacroTextEntry", _, _, options_dropdown_template)
textEntry:SetHook ("OnEditFocusGained", textEntryOnFocusGained)
textEntry:SetHook ("OnEditFocusLost", textEntryOnFocusLost)
textEntry:SetJustifyH ("left")
textEntry:SetHook("OnEditFocusGained", textEntryOnFocusGained)
textEntry:SetHook("OnEditFocusLost", textEntryOnFocusLost)
textEntry:SetJustifyH("left")
textEntry:SetTextInsets (8, 8, 0, 0)
titleLabel:SetPoint ("topleft", line, "topleft", 5, -5)
descLabel:SetPoint ("topleft", titleLabel, "bottomleft", 0, -2)
textEntry:SetPoint ("topleft", descLabel, "bottomleft", 0, -4)
titleLabel:SetPoint("topleft", line, "topleft", 5, -5)
descLabel:SetPoint("topleft", titleLabel, "bottomleft", 0, -2)
textEntry:SetPoint("topleft", descLabel, "bottomleft", 0, -4)
line.Title = titleLabel
line.Desc = descLabel
@@ -127,10 +127,10 @@ function Details.OpenMacrosWindow()
end
local macroScrollbox = DF:CreateScrollBox (f, "$parentMacroScrollbox", refreshMacroScrollbox, macrosAvailable, scrollbox_size[1], scrollbox_size[2], scrollbox_lines, scrollbox_line_height)
macroScrollbox:SetPoint ("topleft", f, "topleft", 5, -30)
macroScrollbox:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
macroScrollbox:SetBackdropColor (0, 0, 0, 0)
macroScrollbox:SetBackdropBorderColor (0, 0, 0, 1)
macroScrollbox:SetPoint("topleft", f, "topleft", 5, -30)
macroScrollbox:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
macroScrollbox:SetBackdropColor(0, 0, 0, 0)
macroScrollbox:SetBackdropBorderColor(0, 0, 0, 1)
f.MacroScrollbox = macroScrollbox
DF:ReskinSlider(macroScrollbox)
+2156 -2160
View File
File diff suppressed because it is too large Load Diff
+19 -19
View File
@@ -35,7 +35,7 @@ function Details:OpenNewsWindow(textToShow, dumpValues, keeptext)
newsFrame:Text((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. returnString)
else
if (dumpValues) then
newsFrame.DumpTableFrame:SetText (returnString)
newsFrame.DumpTableFrame:SetText(returnString)
else
newsFrame:Text (returnString)
end
@@ -94,30 +94,30 @@ function Details:CreateOrOpenNewsWindow()
local frameUpper = CreateFrame("scrollframe", nil, frame, "BackdropTemplate")
local frameLower = CreateFrame("frame", "DetailsNewsWindowLower", frameUpper, "BackdropTemplate")
frameLower:SetSize (450, 2000)
frameUpper:SetPoint ("topleft", frame, "topleft", 10, -30)
frameLower:SetSize(450, 2000)
frameUpper:SetPoint("topleft", frame, "topleft", 10, -30)
frameUpper:SetWidth(445)
frameUpper:SetHeight(500)
frameUpper:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
tile = true, tileSize = 16,
insets = {left = 1, right = 1, top = 0, bottom = 1},})
frameUpper:SetBackdropColor (.1, .1, .1, .3)
frameUpper:SetBackdropColor(.1, .1, .1, .3)
frameUpper:SetScrollChild (frameLower)
local slider = CreateFrame ("slider", "DetailsNewsWindowSlider", frame, "BackdropTemplate")
slider.bg = slider:CreateTexture (nil, "background")
slider.bg:SetAllPoints (true)
slider.bg:SetTexture (0, 0, 0, 0.5)
local slider = CreateFrame("slider", "DetailsNewsWindowSlider", frame, "BackdropTemplate")
slider.bg = slider:CreateTexture(nil, "background")
slider.bg:SetAllPoints(true)
slider.bg:SetTexture(0, 0, 0, 0.5)
slider.thumb = slider:CreateTexture (nil, "OVERLAY")
slider.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
slider.thumb:SetSize (25, 25)
slider.thumb = slider:CreateTexture(nil, "OVERLAY")
slider.thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
slider.thumb:SetSize(25, 25)
slider:SetThumbTexture (slider.thumb)
slider:SetOrientation ("vertical");
slider:SetSize (16, 499)
slider:SetPoint ("topleft", frameUpper, "topright")
slider:SetSize(16, 499)
slider:SetPoint("topleft", frameUpper, "topright")
slider:SetMinMaxValues (0, 2000)
slider:SetValue(0)
slider:SetScript("OnValueChanged", function(self)
@@ -130,15 +130,15 @@ function Details:CreateOrOpenNewsWindow()
if (IsShiftKeyDown() and (delta > 0)) then
slider:SetValue(0)
elseif (IsShiftKeyDown() and (delta < 0)) then
slider:SetValue (2000)
slider:SetValue(2000)
elseif ((delta < 0) and (current < 2000)) then
slider:SetValue (current + 20)
slider:SetValue(current + 20)
elseif ((delta > 0) and (current > 1)) then
slider:SetValue (current - 20)
slider:SetValue(current - 20)
end
end)
--> text box
--text box
local texto = frameLower:CreateFontString("DetailsNewsWindowText", "overlay", "GameFontNormal")
texto:SetPoint("topleft", frameLower, "topleft")
texto:SetJustifyH("left")
@@ -165,7 +165,7 @@ function Details:CreateOrOpenNewsWindow()
DetailsFramework:ApplyStandardBackdrop(statusBar)
statusBar:SetAlpha (0.8)
DetailsFramework:BuildStatusbarAuthorInfo(statusBar, "", "")
statusBar.authorName:SetPoint ("left", statusBar, "left", 207, 0)
statusBar.authorName:SetPoint("left", statusBar, "left", 207, 0)
function frame:Title (title)
@@ -173,7 +173,7 @@ function Details:CreateOrOpenNewsWindow()
end
function frame:Text (text)
texto:SetText (text or "")
texto:SetText(text or "")
end
frame:Hide()
+6 -6
View File
@@ -174,8 +174,8 @@ function Details.options.InitializeOptionsWindow(instance)
editingGroupCheckBox:SetPoint("left", editingGroupLabel, "right", 2, 0)
formatFooterText(editingGroupLabel)
--> create test bars
DF:NewColor ("C_OptionsButtonOrange", 0.9999, 0.8196, 0, 1)
--create test bars
DF:NewColor("C_OptionsButtonOrange", 0.9999, 0.8196, 0, 1)
local create_test_bars_func = function()
_detalhes.CreateTestBars()
if (not _detalhes.test_bar_update) then
@@ -185,17 +185,17 @@ function Details.options.InitializeOptionsWindow(instance)
end
end
local fillbars = DF:NewButton(footerFrame, _, "$parentCreateExampleBarsButton", nil, 140, 20, create_test_bars_func, nil, nil, nil, Loc ["STRING_OPTIONS_TESTBARS"], 1)
fillbars:SetPoint ("bottomleft", f.widget, "bottomleft", 10, 10)
fillbars:SetPoint("bottomleft", f.widget, "bottomleft", 10, 10)
fillbars:SetTemplate(options_button_template)
fillbars:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {323/512, 365/512, 42/512, 78/512}, {1, 1, 1, 0.6}, 4, 2)
--> change log
--change log
local changelog = DF:NewButton(footerFrame, _, "$parentOpenChangeLogButton", nil, 140, 20, _detalhes.OpenNewsWindow, "change_log", nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"], 1)
changelog:SetPoint ("left", fillbars, "right", 10, 0)
changelog:SetPoint("left", fillbars, "right", 10, 0)
changelog:SetTemplate (options_button_template)
changelog:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {367/512, 399/512, 43/512, 76/512}, {1, 1, 1, 0.8}, 4, 2)
--> search field
--search field
local searchBox = DF:CreateTextEntry(footerFrame, function()end, 140, 20, _, _, _, options_dropdown_template)
searchBox:SetPoint("left", changelog, "right", 10, 0)
File diff suppressed because it is too large Load Diff
+46 -46
View File
@@ -28,19 +28,19 @@ function Details.OpenPlaterIntegrationWindow()
local f = DetailsPlaterIntegrationPanel or DF:CreateSimplePanel (UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
--background
f.bg1 = f:CreateTexture (nil, "background")
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.8)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetSize (790, 454)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor (.5, .5, .5, .7)
f:SetBackdropBorderColor (0, 0, 0, 1)
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor(.5, .5, .5, .7)
f:SetBackdropBorderColor(0, 0, 0, 1)
--> anchor text function
--anchor text function
local anchor_names = {"Top Left", "Left", "Bottom Left", "Bottom", "Bottom Right", "Right", "Top Right", "Top", "Center", "Inner Left", "Inner Right", "Inner Top", "Inner Bottom"}
local build_anchor_side_table = function(member)
local t = {}
@@ -63,7 +63,7 @@ function Details.OpenPlaterIntegrationWindow()
{type = "label", get = function() return "Add Real Time DPS Info in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
--> real time dps from all sources
--real time dps from all sources
{
type = "toggle",
get = function() return Details.plater.realtime_dps_enabled end,
@@ -73,7 +73,7 @@ function Details.OpenPlaterIntegrationWindow()
Details:RefreshPlaterIntegration()
if (not value) then
Details:Msg ("a /reload might be needed to disable this setting.")
Details:Msg("a /reload might be needed to disable this setting.")
else
if (Plater) then
Plater.RefreshDBUpvalues()
@@ -83,7 +83,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Show Real Time Dps",
desc = "Show Real Time DPS on the nameplate.\n\nReal time DPS is how much damage has been inflicted to the unit in the last 5 seconds.",
},
--> text size
--text size
{
type = "range",
get = function() return Details.plater.realtime_dps_size end,
@@ -99,7 +99,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Size",
desc = "Text Size",
},
--> text color
--text color
{
type = "color",
get = function()
@@ -117,7 +117,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Color",
text_template = options_text_template,
},
--> text shadow
--text shadow
{
type = "toggle",
get = function() return Details.plater.realtime_dps_shadow end,
@@ -130,7 +130,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Shadow",
desc = "Text Shadow",
},
--> text anchor
--text anchor
--anchor location
{
type = "select",
@@ -175,7 +175,7 @@ function Details.OpenPlaterIntegrationWindow()
{type = "breakline"},
{type = "label", get = function() return "Add Real Time DPS Info Only From You in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
--> real time dps from the player only
--real time dps from the player only
{
type = "toggle",
get = function() return Details.plater.realtime_dps_player_enabled end,
@@ -185,7 +185,7 @@ function Details.OpenPlaterIntegrationWindow()
Details:RefreshPlaterIntegration()
if (not value) then
Details:Msg ("a /reload might be needed to disable this setting.")
Details:Msg("a /reload might be needed to disable this setting.")
else
if (Plater) then
Plater.RefreshDBUpvalues()
@@ -195,7 +195,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Show Real Time Dps (From You)",
desc = "Show Real Time DPS you are currently applying in the unit.\n\nReal time DPS is how much damage has been inflicted to the unit in the last 5 seconds.",
},
--> text size
--text size
{
type = "range",
get = function() return Details.plater.realtime_dps_player_size end,
@@ -211,7 +211,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Size",
desc = "Text Size",
},
--> text color
--text color
{
type = "color",
get = function()
@@ -229,7 +229,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Color",
text_template = options_text_template,
},
--> text shadow
--text shadow
{
type = "toggle",
get = function() return Details.plater.realtime_dps_player_shadow end,
@@ -242,7 +242,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Shadow",
desc = "Text Shadow",
},
--> text anchor
--text anchor
--anchor location
{
type = "select",
@@ -287,7 +287,7 @@ function Details.OpenPlaterIntegrationWindow()
{type = "breakline"},
{type = "label", get = function() return "Add Total Damage Taken in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
--> total damage taken from all sources
--total damage taken from all sources
{
type = "toggle",
get = function() return Details.plater.damage_taken_enabled end,
@@ -297,7 +297,7 @@ function Details.OpenPlaterIntegrationWindow()
Details:RefreshPlaterIntegration()
if (not value) then
Details:Msg ("a /reload might be needed to disable this setting.")
Details:Msg("a /reload might be needed to disable this setting.")
else
if (Plater) then
Plater.RefreshDBUpvalues()
@@ -307,7 +307,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Show Total Damage Taken",
desc = "Show the total damage taken by the unit",
},
--> text size
--text size
{
type = "range",
get = function() return Details.plater.damage_taken_size end,
@@ -323,7 +323,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Size",
desc = "Text Size",
},
--> text color
--text color
{
type = "color",
get = function()
@@ -341,7 +341,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Color",
text_template = options_text_template,
},
--> text shadow
--text shadow
{
type = "toggle",
get = function() return Details.plater.damage_taken_shadow end,
@@ -354,7 +354,7 @@ function Details.OpenPlaterIntegrationWindow()
name = "Text Shadow",
desc = "Text Shadow",
},
--> text anchor
--text anchor
--anchor location
{
type = "select",
@@ -403,46 +403,46 @@ function Details.OpenPlaterIntegrationWindow()
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local titleBackground = CreateFrame ("frame", nil, f,"BackdropTemplate")
titleBackground:SetPoint ("topleft", f, "topleft", 10, -30)
titleBackground:SetPoint ("topright", f, "topright", -10, -30)
titleBackground:SetHeight (80)
local titleBackground = CreateFrame("frame", nil, f,"BackdropTemplate")
titleBackground:SetPoint("topleft", f, "topleft", 10, -30)
titleBackground:SetPoint("topright", f, "topright", -10, -30)
titleBackground:SetHeight(80)
--background
titleBackground.bg1 = titleBackground:CreateTexture (nil, "background")
titleBackground.bg1:SetTexture ([[Interface\AddOns\Details\images\background]])
titleBackground.bg1 = titleBackground:CreateTexture(nil, "background")
titleBackground.bg1:SetTexture([[Interface\AddOns\Details\images\background]])
titleBackground.bg1:SetAlpha (0.8)
titleBackground.bg1:SetVertexColor (0.27, 0.27, 0.27)
titleBackground.bg1:SetVertTile (true)
titleBackground.bg1:SetHorizTile (true)
titleBackground.bg1:SetSize (790, 454)
titleBackground.bg1:SetSize(790, 454)
titleBackground.bg1:SetAllPoints()
titleBackground:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
titleBackground:SetBackdropColor (.5, .5, .5, .7)
titleBackground:SetBackdropBorderColor (0, 0, 0, 1)
titleBackground:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
titleBackground:SetBackdropColor(.5, .5, .5, .7)
titleBackground:SetBackdropBorderColor(0, 0, 0, 1)
local platerTitle = DF:CreateLabel (titleBackground, "Plater Nameplates Integration", 16, "white")
local platerDesc1 = DF:CreateLabel (titleBackground, "Add DPS and Damage information directly into the nameplate", 11, "silver")
local platerDesc2 = DF:CreateLabel (titleBackground, "See how much damage the enemy is taking in real time!", 11, "silver")
local platerTitle = DF:CreateLabel(titleBackground, "Plater Nameplates Integration", 16, "white")
local platerDesc1 = DF:CreateLabel(titleBackground, "Add DPS and Damage information directly into the nameplate", 11, "silver")
local platerDesc2 = DF:CreateLabel(titleBackground, "See how much damage the enemy is taking in real time!", 11, "silver")
local platerImage = DF:CreateImage (titleBackground, "Interface\\AddOns\\Details\\images\\plater_image")
platerImage:SetSize (256, 64)
platerImage:SetSize(256, 64)
platerImage:SetPoint ("topright", f, "topright", -150, -35)
platerTitle:SetPoint (10, -15)
platerDesc1:SetPoint (10, -35)
platerDesc2:SetPoint (10, -47)
platerImage:SetPoint("topright", f, "topright", -150, -35)
platerTitle:SetPoint(10, -15)
platerDesc1:SetPoint(10, -35)
platerDesc2:SetPoint(10, -47)
DF:BuildMenu (f, menu_table, 10, -140, 460, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
if (not Plater) then
for _, widget in ipairs (f.widget_list) do
for _, widget in ipairs(f.widget_list) do
if (widget.Disable) then
widget:Disable()
end
end
local PlaterDisabled1 = DF:CreateLabel (f, "Plater isn't installed! you may download it from the Curseforge app.", 16, "red")
PlaterDisabled1:SetPoint (10, -330)
local PlaterDisabled1 = DF:CreateLabel(f, "Plater isn't installed! you may download it from the Curseforge app.", 16, "red")
PlaterDisabled1:SetPoint(10, -330)
end
end
File diff suppressed because it is too large Load Diff
+18 -18
View File
@@ -4,7 +4,7 @@ local L = _G.LibStub ("AceLocale-3.0"):GetLocale( "Details" )
function Details:OpenProfiler()
--> isn't first run, so just quit
--isn't first run, so just quit
if (not Details.character_first_run) then
return
@@ -15,7 +15,7 @@ function Details:OpenProfiler()
return
else
--> check is this is the first run of the addon (after being installed)
--check is this is the first run of the addon (after being installed)
local amount = 0
for name, profile in pairs (_detalhes_global.__profiles) do
amount = amount + 1
@@ -26,26 +26,26 @@ function Details:OpenProfiler()
end
local f = Details:CreateWelcomePanel (nil, nil, 250, 300, true)
f:SetPoint ("right", UIParent, "right", -5, 0)
f:SetPoint("right", UIParent, "right", -5, 0)
local logo = f:CreateTexture (nil, "artwork")
logo:SetTexture ([[Interface\AddOns\Details\images\logotipo]])
logo:SetSize (256*0.8, 128*0.8)
logo:SetPoint ("center", f, "center", 0, 0)
logo:SetPoint ("top", f, "top", 20, 20)
local logo = f:CreateTexture(nil, "artwork")
logo:SetTexture([[Interface\AddOns\Details\images\logotipo]])
logo:SetSize(256*0.8, 128*0.8)
logo:SetPoint("center", f, "center", 0, 0)
logo:SetPoint("top", f, "top", 20, 20)
local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal")
string_profiler:SetPoint ("top", logo, "bottom", -20, 10)
string_profiler:SetText ("Profiler!")
string_profiler:SetPoint("top", logo, "bottom", -20, 10)
string_profiler:SetText("Profiler!")
local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal")
string_profiler:SetPoint ("topleft", f, "topleft", 10, -130)
string_profiler:SetText (L["STRING_OPTIONS_PROFILE_SELECTEXISTING"])
string_profiler:SetWidth (230)
string_profiler:SetPoint("topleft", f, "topleft", 10, -130)
string_profiler:SetText(L["STRING_OPTIONS_PROFILE_SELECTEXISTING"])
string_profiler:SetWidth(230)
Details:SetFontSize (string_profiler, 11)
Details:SetFontColor (string_profiler, "white")
Details:SetFontColor(string_profiler, "white")
--> get the new profile name
--get the new profile name
local current_profile = Details:GetCurrentProfileName()
local on_select_profile = function(_, _, profilename)
@@ -63,7 +63,7 @@ function Details:OpenProfiler()
local t = {
{value = current_profile, label = L["STRING_OPTIONS_PROFILE_USENEW"], onclick = on_select_profile, icon = [[Interface\FriendsFrame\UI-Toast-FriendRequestIcon]], texcoord = {4/32, 30/32, 4/32, 28/32}, iconcolor = "orange"}
}
for _, profilename in ipairs (Details:GetProfileList()) do
for _, profilename in ipairs(Details:GetProfileList()) do
if (profilename ~= current_profile) then
t[#t+1] = {value = profilename, label = profilename, onclick = on_select_profile, icon = [[Interface\FriendsFrame\UI-Toast-FriendOnlineIcon]], texcoord = texcoord, iconcolor = "yellow"}
end
@@ -72,7 +72,7 @@ function Details:OpenProfiler()
end
local dropdown = Details.gump:NewDropDown (f, f, "DetailsProfilerProfileSelectorDropdown", "dropdown", 220, 20, fill_dropdown, 1)
dropdown:SetPoint (15, -190)
dropdown:SetPoint(15, -190)
local confirm_func = function()
if (current_profile ~= Details:GetCurrentProfileName()) then
@@ -81,6 +81,6 @@ function Details:OpenProfiler()
f:Hide()
end
local confirm = Details.gump:NewButton (f, f, "DetailsProfilerProfileConfirmButton", "button", 150, 20, confirm_func, nil, nil, nil, "Okey!")
confirm:SetPoint (50, -250)
confirm:SetPoint(50, -250)
confirm:InstallCustomTexture()
end
+12 -12
View File
@@ -5,7 +5,7 @@ local Details = _G._detalhes
local gump = Details.gump
local _
--> details API functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--details API functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function Details:FastReportWindow(window)
if (not DetailsReportWindow) then
@@ -154,7 +154,7 @@ local _
Details.copypasteframe.EditBox:SetFocus(true)
end
--> internal details report functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--internal details report functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function Details:Reportar(param2, options, arg3, id)
GameCooltip2:Hide()
@@ -305,10 +305,10 @@ local createDropdown = function(thisFrame)
end
end
local channels = {GetChannelList()} --> coloca o resultado em uma tabela .. {id1, canal1, id2, canal2}
local channels = {GetChannelList()} --coloca o resultado em uma tabela .. {id1, canal1, id2, canal2}
--09/august/2018: GetChannelList passed to return 3 values for each channel instead of 2
for i = 1, #channels, 3 do --> total de canais
for i = 1, #channels, 3 do --total de canais
reportChannelsTable[#reportChannelsTable + 1] = {iconsize = iconsize, value = "CHANNEL|" .. channels[i+1], label = channels[i] .. ". " .. channels[i+1], onclick = onClick, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], texcoord = {0.3046875, 0.4453125, 0.109375, 0.390625}, iconcolor = {149/255, 112/255, 112/255}}
end
@@ -484,7 +484,7 @@ local createDropdown = function(thisFrame)
editbox:SetText("")
end
editbox.perdeu_foco = true --> isso aqui pra quando estiver editando e clicar em outra caixa
editbox.perdeu_foco = true --isso aqui pra quando estiver editando e clicar em outra caixa
editbox:ClearFocus()
end)
@@ -608,7 +608,7 @@ local createDropdown = function(thisFrame)
window.dropdown:SetPoint("topleft", window, "topleft", anchorX, -30)
window.dropdown:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile=true,
tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}})
window.dropdown:SetBackdropBorderColor (0, 0, 0, 0.5)
window.dropdown:SetBackdropBorderColor(0, 0, 0, 0.5)
window.dropdown:SetBackdropColor(0, 0, 0, 0.1)
window.wisp_who:ClearAllPoints()
@@ -619,7 +619,7 @@ local createDropdown = function(thisFrame)
window.editbox:SetHeight(20)
window.editbox:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile=true,
tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}})
window.editbox:SetBackdropBorderColor (0, 0, 0, 0.5)
window.editbox:SetBackdropBorderColor(0, 0, 0, 0.5)
window.editbox:SetBackdropColor(0, 0, 0, 0.3)
window.linhas_amt:ClearAllPoints()
@@ -629,7 +629,7 @@ local createDropdown = function(thisFrame)
window.slider:SetPoint("topleft", window.linhas_amt, "bottomleft", 0, -3)
window.slider:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile=true,
tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}})
window.slider:SetBackdropBorderColor (0, 0, 0, 0.5)
window.slider:SetBackdropBorderColor(0, 0, 0, 0.5)
window.slider:SetBackdropColor(0, 0, 0, 0.3)
window.slider.thumb:SetTexture([[Interface\AddOns\Details\images\icons2]])
@@ -643,7 +643,7 @@ local createDropdown = function(thisFrame)
reverse_checkbox:ClearAllPoints()
reverse_checkbox:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile=true,
tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}})
reverse_checkbox:SetBackdropBorderColor (0, 0, 0, 0.5)
reverse_checkbox:SetBackdropBorderColor(0, 0, 0, 0.5)
reverse_checkbox:SetBackdropColor(0, 0, 0, 0.3)
reverse_checkbox:SetPoint("topleft", window.slider, "bottomleft", 0, -8)
reverse_checkbox:SetSize(14, 14)
@@ -665,7 +665,7 @@ local createDropdown = function(thisFrame)
window:SetHeight(195)
window:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
window:SetBackdropColor(1, 1, 1, 1)
window:SetBackdropBorderColor (0, 0, 0, 1)
window:SetBackdropBorderColor(0, 0, 0, 1)
if (not window.widgets) then
window.widgets = {}
@@ -676,7 +676,7 @@ local createDropdown = function(thisFrame)
titlebar:SetHeight(20)
titlebar:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
titlebar:SetBackdropColor(.5, .5, .5, 1)
titlebar:SetBackdropBorderColor (0, 0, 0, 1)
titlebar:SetBackdropBorderColor(0, 0, 0, 1)
local bg1 = window:CreateTexture(nil, "background")
bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
@@ -895,7 +895,7 @@ local createDropdown = function(thisFrame)
--close button
window.fechar = CreateFrame("Button", nil, window, "UIPanelCloseButton")
window.fechar:SetScript("OnClick", function()
Details.FadeHandler.Fader (window, 1)
Details.FadeHandler.Fader(window, 1)
Details.janela_report.ativa = false
end)
+14 -14
View File
@@ -10,7 +10,7 @@ local windowWidth = 950
local scrollWidth = 825
local panel = Details:CreateWelcomePanel ("DetailsWindowOptionsBarTextEditor", nil, windowWidth, 600, true)
panel:SetPoint ("center", UIParent, "center")
panel:SetPoint("center", UIParent, "center")
panel:Hide()
panel:SetFrameStrata ("FULLSCREEN")
DF:ApplyStandardBackdrop (panel)
@@ -19,12 +19,12 @@ DF:CreateTitleBar (panel, "Details! Custom Line Text Editor")
function panel:Open (text, callback, host, default)
if (host) then
panel:ClearAllPoints()
panel:SetPoint ("center", host, "center")
panel:SetPoint("center", host, "center")
end
text = text:gsub ("||", "|")
panel.default_text = text
panel.editbox:SetText (text)
panel.editbox:SetText(text)
panel.callback = callback
panel.default = default or ""
panel:Show()
@@ -34,7 +34,7 @@ local y = -32
local buttonTemplate = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local textentry = DF:NewSpecialLuaEditorEntry (panel, scrollWidth, 555, "editbox", "$parentEntry")
textentry:SetPoint ("topleft", panel, "topleft", 10, y)
textentry:SetPoint("topleft", panel, "topleft", 10, y)
DF:ApplyStandardBackdrop (textentry)
DF:SetFontSize (textentry.editbox, 14)
DF:ReskinSlider(textentry.scroll)
@@ -42,9 +42,9 @@ DF:ReskinSlider(textentry.scroll)
local arg1_button = DF:NewButton (panel, nil, "$parentButton1", nil, 80, 20, function() textentry.editbox:Insert ("{data1}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "1"), 1)
local arg2_button = DF:NewButton (panel, nil, "$parentButton2", nil, 80, 20, function() textentry.editbox:Insert ("{data2}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "2"), 1)
local arg3_button = DF:NewButton (panel, nil, "$parentButton3", nil, 80, 20, function() textentry.editbox:Insert ("{data3}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "3"), 1)
arg1_button:SetPoint ("topright", panel, "topright", -12, y)
arg2_button:SetPoint ("topright", panel, "topright", -12, y - (20*1))
arg3_button:SetPoint ("topright", panel, "topright", -12, y - (20*2))
arg1_button:SetPoint("topright", panel, "topright", -12, y)
arg2_button:SetPoint("topright", panel, "topright", -12, y - (20*1))
arg3_button:SetPoint("topright", panel, "topright", -12, y - (20*2))
arg1_button:SetTemplate (buttonTemplate)
arg2_button:SetTemplate (buttonTemplate)
arg3_button:SetTemplate (buttonTemplate)
@@ -164,10 +164,10 @@ end
local func_button = DF:NewButton (panel, nil, "$parentButton4", nil, 80, 20, function() textentry.editbox:Insert ("{func local player, combat = ...; return 0;}") end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC"], 1)
local color_button = DF:NewColorPickButton (panel, "$parentButton5", nil, color_func)
color_button:SetSize (80, 20)
color_button:SetSize(80, 20)
color_button:SetTemplate (buttonTemplate)
func_button:SetPoint ("topright", panel, "topright", -12, y - (20*3))
func_button:SetPoint("topright", panel, "topright", -12, y - (20*3))
func_button:SetTemplate (buttonTemplate)
color_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_COLOR_TOOLTIP"]
@@ -180,19 +180,19 @@ end
local apply_button = DF:NewButton (panel, nil, "$parentApply", nil, 80, 20, function() panel.callback(panel.editbox:GetText()) end, nil, nil, nil, "Apply", 1) --localize-me
apply_button:SetTemplate (buttonTemplate)
apply_button:SetPoint ("topright", panel, "topright", -14, -128)
apply_button:SetPoint("topright", panel, "topright", -14, -128)
local ok_button = DF:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1)
ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"]
ok_button:SetTemplate (buttonTemplate)
ok_button:SetPoint ("topright", panel, "topright", -14, -194)
ok_button:SetPoint("topright", panel, "topright", -14, -194)
local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText(panel.default); panel.callback(panel.editbox:GetText()) end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_RESET"], 1)
reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"]
reset_button:SetTemplate (buttonTemplate)
reset_button:SetPoint ("topright", panel, "topright", -14, -150)
reset_button:SetPoint("topright", panel, "topright", -14, -150)
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText (panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"]
cancel_button:SetTemplate (buttonTemplate)
cancel_button:SetPoint ("topright", panel, "topright", -14, -172)
cancel_button:SetPoint("topright", panel, "topright", -14, -172)
+38 -38
View File
@@ -32,24 +32,24 @@ function Details.OpenRunCodeWindow()
local f = DetailsRunCodePanel or DF:CreateSimplePanel (UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel")
--> lua editor
--lua editor
local code_editor = DF:NewSpecialLuaEditorEntry (f, 885, 510, "text", "$parentCodeEditorWindow")
f.CodeEditor = code_editor
code_editor:SetPoint ("topleft", f, "topleft", 20, -56)
code_editor:SetPoint("topleft", f, "topleft", 20, -56)
--> code editor appearance
code_editor.scroll:SetBackdrop (nil)
code_editor.editbox:SetBackdrop (nil)
code_editor:SetBackdrop (nil)
--code editor appearance
code_editor.scroll:SetBackdrop(nil)
code_editor.editbox:SetBackdrop(nil)
code_editor:SetBackdrop(nil)
DF:ReskinSlider(code_editor.scroll)
if (not code_editor.__background) then
code_editor.__background = code_editor:CreateTexture (nil, "background")
code_editor.__background = code_editor:CreateTexture(nil, "background")
end
code_editor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
code_editor:SetBackdropBorderColor (0, 0, 0, 1)
code_editor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
code_editor:SetBackdropBorderColor(0, 0, 0, 1)
code_editor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
code_editor.__background:SetVertexColor (0.27, 0.27, 0.27)
@@ -58,20 +58,20 @@ function Details.OpenRunCodeWindow()
code_editor.__background:SetHorizTile (true)
code_editor.__background:SetAllPoints()
--> code compile error warning
local errortext_frame = CreateFrame ("frame", nil, code_editor,"BackdropTemplate")
errortext_frame:SetPoint ("bottomleft", code_editor, "bottomleft", 1, 1)
errortext_frame:SetPoint ("bottomright", code_editor, "bottomright", -1, 1)
errortext_frame:SetHeight (20)
errortext_frame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
errortext_frame:SetBackdropBorderColor (0, 0, 0, 1)
errortext_frame:SetBackdropColor (0, 0, 0)
--code compile error warning
local errortext_frame = CreateFrame("frame", nil, code_editor,"BackdropTemplate")
errortext_frame:SetPoint("bottomleft", code_editor, "bottomleft", 1, 1)
errortext_frame:SetPoint("bottomright", code_editor, "bottomright", -1, 1)
errortext_frame:SetHeight(20)
errortext_frame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
errortext_frame:SetBackdropBorderColor(0, 0, 0, 1)
errortext_frame:SetBackdropColor(0, 0, 0)
DF:CreateFlashAnimation (errortext_frame)
local errortext_label = DF:CreateLabel (errortext_frame, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local errortext_label = DF:CreateLabel(errortext_frame, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
errortext_label.textcolor = "red"
errortext_label:SetPoint ("left", errortext_frame, "left", 3, 0)
errortext_label:SetPoint("left", errortext_frame, "left", 3, 0)
code_editor.NextCodeCheck = 0.33
code_editor:HookScript ("OnUpdate", function(self, deltaTime)
@@ -96,15 +96,15 @@ function Details.OpenRunCodeWindow()
end
end)
--> script selector
--script selector
local on_select_CodeType_option = function(self, fixedParameter, value)
--> set the current editing code type
--set the current editing code type
f.EditingCode = Details.RunCodeTypes [value].Value
f.EditingCodeKey = Details.RunCodeTypes [value].ProfileKey
--> load the code for the event
--load the code for the event
local code = Details.run_code [f.EditingCodeKey]
code_editor:SetText (code)
code_editor:SetText(code)
end
local build_CodeType_dropdown_options = function()
@@ -118,13 +118,13 @@ function Details.OpenRunCodeWindow()
return t
end
local code_type_label = DF:CreateLabel (f, "Event:", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local code_type_label = DF:CreateLabel(f, "Event:", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local code_type_dropdown = DF:CreateDropDown (f, build_CodeType_dropdown_options, 1, 160, 20, "CodeTypeDropdown", _, DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
code_type_dropdown:SetPoint ("left", code_type_label, "right", 2, 0)
code_type_dropdown:SetPoint("left", code_type_label, "right", 2, 0)
code_type_dropdown:SetFrameLevel (code_editor:GetFrameLevel() + 10)
code_type_label:SetPoint ("bottomleft", code_editor, "topleft", 0, 8)
code_type_label:SetPoint("bottomleft", code_editor, "topleft", 0, 8)
--> create save button
--create save button
local save_script = function()
local code = code_editor:GetText()
local func, errortext = loadstring (code, "Q")
@@ -132,11 +132,11 @@ function Details.OpenRunCodeWindow()
if (func) then
Details.run_code [f.EditingCodeKey] = code
Details:RecompileAutoRunCode()
Details:Msg ("Code saved!")
Details:Msg("Code saved!")
code_editor:ClearFocus()
else
errortext_frame:Flash (0.2, 0.2, 0.4, true, nil, nil, "NONE")
Details:Msg ("Can't save the code: it has errors.")
Details:Msg("Can't save the code: it has errors.")
end
end
@@ -144,20 +144,20 @@ function Details.OpenRunCodeWindow()
local save_script_button = DF:CreateButton (f, save_script, 120, 20, "Save", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
save_script_button:SetIcon ([[Interface\BUTTONS\UI-Panel-ExpandButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
save_script_button:SetPoint ("topright", code_editor, "bottomright", 0, button_y)
save_script_button:SetPoint("topright", code_editor, "bottomright", 0, button_y)
--> create cancel button
--create cancel button
local cancel_script = function()
code_editor:SetText (Details.run_code [f.EditingCodeKey])
Details:Msg ("Code cancelled!")
code_editor:SetText(Details.run_code [f.EditingCodeKey])
Details:Msg("Code cancelled!")
code_editor:ClearFocus()
end
local cancel_script_button = DF:CreateButton (f, cancel_script, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
cancel_script_button:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
cancel_script_button:SetPoint ("topleft", code_editor, "bottomleft", 0, button_y)
cancel_script_button:SetPoint("topleft", code_editor, "bottomleft", 0, button_y)
--> create run now button
--create run now button
local execute_script = function()
local script = code_editor:GetText()
@@ -173,17 +173,17 @@ function Details.OpenRunCodeWindow()
local run_script_button = DF:CreateButton (f, execute_script, 120, 20, "Test Code", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
run_script_button:SetIcon ([[Interface\BUTTONS\UI-SpellbookIcon-NextPage-Up]], 20, 20, "overlay", {0.05, 0.95, 0.05, 0.95})
run_script_button:SetPoint ("bottomright", code_editor, "topright", 0, 3)
run_script_button:SetPoint("bottomright", code_editor, "topright", 0, 3)
end
DetailsPluginContainerWindow.OpenPlugin (DetailsRunCodePanel)
DetailsRunCodePanel.CodeTypeDropdown:Select (1, true)
--> show the initialization code when showing up this window
--show the initialization code when showing up this window
DetailsRunCodePanel.EditingCode = Details.RunCodeTypes [1].Value
DetailsRunCodePanel.EditingCodeKey = Details.RunCodeTypes [1].ProfileKey
local code = Details.run_code [DetailsRunCodePanel.EditingCodeKey]
DetailsRunCodePanel.CodeEditor:SetText (code)
DetailsRunCodePanel.CodeEditor:SetText(code)
end
+2 -2
View File
@@ -7,11 +7,11 @@ local _
function Details:ScrollDamage()
if (not DetailsScrollDamage) then
DetailsScrollDamage = DetailsFramework:CreateSimplePanel(UIParent)
DetailsScrollDamage:SetSize (427 - 40 - 20 - 20, 505 - 150 + 20 + 40)
DetailsScrollDamage:SetSize(427 - 40 - 20 - 20, 505 - 150 + 20 + 40)
DetailsScrollDamage:SetTitle ("Details! Scroll Damage (/details scroll)")
DetailsScrollDamage.Data = {}
DetailsScrollDamage:ClearAllPoints()
DetailsScrollDamage:SetPoint ("left", UIParent, "left", 10, 0)
DetailsScrollDamage:SetPoint("left", UIParent, "left", 10, 0)
DetailsScrollDamage:Hide()
local scroll_width = 395 - 40 - 20 - 20
+127 -127
View File
@@ -10,7 +10,7 @@ local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
local CONST_GUILD_SYNC = "GS"
function Details:InitializeRaidHistoryWindow()
local DetailsRaidHistoryWindow = CreateFrame ("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate")
local DetailsRaidHistoryWindow = CreateFrame("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate")
DetailsRaidHistoryWindow.Frame = DetailsRaidHistoryWindow
DetailsRaidHistoryWindow.__name = Loc ["STRING_STATISTICS"]
DetailsRaidHistoryWindow.real_name = "DETAILS_STATISTICS"
@@ -33,14 +33,14 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
DetailsRaidHistoryWindow.Initialized = true
local f = DetailsRaidHistoryWindow or CreateFrame ("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate") --, "ButtonFrameTemplate"
f:SetPoint ("center", UIParent, "center")
local f = DetailsRaidHistoryWindow or CreateFrame("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate") --, "ButtonFrameTemplate"
f:SetPoint("center", UIParent, "center")
f:SetFrameStrata ("HIGH")
f:SetToplevel (true)
f:SetMovable (true)
f:SetWidth (850)
f:SetHeight (500)
f:SetWidth(850)
f:SetHeight(500)
tinsert (UISpecialFrames, "DetailsRaidHistoryWindow")
function f.OpenDB()
@@ -65,54 +65,54 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
f.Mode = 2
f.bg1 = f:CreateTexture (nil, "background")
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.7)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetSize (790, 454)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor (.5, .5, .5, .5)
f:SetBackdropBorderColor (0, 0, 0, 1)
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor(.5, .5, .5, .5)
f:SetBackdropBorderColor(0, 0, 0, 1)
local titlebar = DF:CreateTitleBar(f, "Details! " .. Loc ["STRING_STATISTICS"])
if (not Details:GetTutorialCVar ("HISTORYPANEL_TUTORIAL")) then
local tutorialFrame = CreateFrame ("frame", "$parentTutorialFrame",f,"BackdropTemplate")
tutorialFrame:SetPoint ("center", f, "center")
local tutorialFrame = CreateFrame("frame", "$parentTutorialFrame",f,"BackdropTemplate")
tutorialFrame:SetPoint("center", f, "center")
tutorialFrame:SetFrameStrata ("DIALOG")
tutorialFrame:SetSize (400, 300)
tutorialFrame:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
tutorialFrame:SetSize(400, 300)
tutorialFrame:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1})
tutorialFrame:SetBackdropColor (0, 0, 0, 1)
tutorialFrame:SetBackdropColor(0, 0, 0, 1)
tutorialFrame.Title = DF:CreateLabel (tutorialFrame, "Statistics" , 12, "orange") --curse localization isn't adding new strings (and I deleted the old one)
tutorialFrame.Title:SetPoint ("top", tutorialFrame, "top", 0, -5)
tutorialFrame.Title = DF:CreateLabel(tutorialFrame, "Statistics" , 12, "orange") --curse localization isn't adding new strings (and I deleted the old one)
tutorialFrame.Title:SetPoint("top", tutorialFrame, "top", 0, -5)
tutorialFrame.Desc = DF:CreateLabel (tutorialFrame, Loc ["STRING_GUILDDAMAGERANK_TUTORIAL_DESC"], 12)
tutorialFrame.Desc = DF:CreateLabel(tutorialFrame, Loc ["STRING_GUILDDAMAGERANK_TUTORIAL_DESC"], 12)
tutorialFrame.Desc.width = 370
tutorialFrame.Desc:SetPoint ("topleft", tutorialFrame, "topleft", 10, -45)
tutorialFrame.Desc:SetPoint("topleft", tutorialFrame, "topleft", 10, -45)
local closeButton = DF:CreateButton (tutorialFrame, function() Details:SetTutorialCVar ("HISTORYPANEL_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, Loc ["STRING_OPTIONS_CHART_CLOSE"])
closeButton:SetPoint ("bottom", tutorialFrame, "bottom", 0, 10)
closeButton:SetPoint("bottom", tutorialFrame, "bottom", 0, 10)
closeButton:SetTemplate (DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end
--> background
local background = f:CreateTexture ("$parentBackgroundImage", "border")
--background
local background = f:CreateTexture("$parentBackgroundImage", "border")
background:SetAlpha (0.3)
background:SetPoint ("topleft", f, "topleft", 6, -65)
background:SetPoint ("bottomright", f, "bottomright", -10, 28)
background:SetPoint("topleft", f, "topleft", 6, -65)
background:SetPoint("bottomright", f, "bottomright", -10, 28)
--> separate menu and main list
local div = f:CreateTexture (nil, "artwork")
div:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-MetalBorder-Left]])
--separate menu and main list
local div = f:CreateTexture(nil, "artwork")
div:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-MetalBorder-Left]])
div:SetAlpha (0.1)
div:SetPoint ("topleft", f, "topleft", 180, -64)
div:SetHeight (574)
div:SetPoint("topleft", f, "topleft", 180, -64)
div:SetHeight(574)
--select history or guild rank
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
@@ -120,16 +120,16 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local selectKillTimeline = function()
f.GuildRankCheckBox:SetValue (false)
f.HistoryCheckBox:SetValue (true)
f.GuildRankCheckBox:SetValue(false)
f.HistoryCheckBox:SetValue(true)
f.Mode = 1
_G.DetailsRaidHistoryWindow:Refresh()
f.ReportButton:Hide()
end
local selectGuildRank = function()
f.HistoryCheckBox:SetValue (false)
f.GuildRankCheckBox:SetValue (true)
f.HistoryCheckBox:SetValue(false)
f.GuildRankCheckBox:SetValue(true)
_G.DetailsRaidHistoryWindow.select_player:Select (1, true)
f.select_player2:Hide()
f.select_player2_label:Hide()
@@ -142,19 +142,19 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local HistoryCheckBox, HistoryLabel = DF:CreateSwitch (f, selectKillTimeline, false, 18, 18, "", "", "HistoryCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWHISTORY"], options_switch_template) --, options_text_template
HistoryLabel:ClearAllPoints()
HistoryCheckBox:ClearAllPoints()
HistoryCheckBox:SetPoint ("topleft", f, "topleft", 100, -34)
HistoryLabel:SetPoint ("left", HistoryCheckBox, "right", 2, 0)
HistoryCheckBox:SetPoint("topleft", f, "topleft", 100, -34)
HistoryLabel:SetPoint("left", HistoryCheckBox, "right", 2, 0)
HistoryCheckBox:SetAsCheckBox()
--guildrank
local GuildRankCheckBox, GuildRankLabel = DF:CreateSwitch (f, selectGuildRank, true, 18, 18, "", "", "GuildRankCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWRANK"], options_switch_template) --, options_text_template
GuildRankLabel:ClearAllPoints()
GuildRankCheckBox:ClearAllPoints()
GuildRankCheckBox:SetPoint ("topleft", f, "topleft", 240, -34)
GuildRankLabel:SetPoint ("left", GuildRankCheckBox, "right", 2, 0)
GuildRankCheckBox:SetPoint("topleft", f, "topleft", 240, -34)
GuildRankLabel:SetPoint("left", GuildRankCheckBox, "right", 2, 0)
GuildRankCheckBox:SetAsCheckBox()
--> guild sync
--guild sync
local doGuildSync = function()
f.RequestedAmount = 0
f.DownloadedAmount = 0
@@ -166,35 +166,35 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
f.GuildSyncButton:Disable()
if (not f.SyncTexture) then
local workingFrame = CreateFrame ("frame", nil, f,"BackdropTemplate")
local workingFrame = CreateFrame("frame", nil, f,"BackdropTemplate")
f.WorkingFrame = workingFrame
workingFrame:SetSize (1, 1)
f.SyncTextureBackground = workingFrame:CreateTexture (nil, "border")
f.SyncTextureBackground:SetPoint ("bottomright", f, "bottomright", -5, -1)
f.SyncTextureBackground:SetTexture ([[Interface\COMMON\StreamBackground]])
f.SyncTextureBackground:SetSize (32, 32)
f.SyncTextureCircle = workingFrame:CreateTexture (nil, "artwork")
f.SyncTextureCircle:SetPoint ("center", f.SyncTextureBackground, "center", 0, 0)
f.SyncTextureCircle:SetTexture ([[Interface\COMMON\StreamCircle]])
f.SyncTextureCircle:SetSize (32, 32)
f.SyncTextureGrade = workingFrame:CreateTexture (nil, "overlay")
f.SyncTextureGrade:SetPoint ("center", f.SyncTextureBackground, "center", 0, 0)
f.SyncTextureGrade:SetTexture ([[Interface\COMMON\StreamFrame]])
f.SyncTextureGrade:SetSize (32, 32)
workingFrame:SetSize(1, 1)
f.SyncTextureBackground = workingFrame:CreateTexture(nil, "border")
f.SyncTextureBackground:SetPoint("bottomright", f, "bottomright", -5, -1)
f.SyncTextureBackground:SetTexture([[Interface\COMMON\StreamBackground]])
f.SyncTextureBackground:SetSize(32, 32)
f.SyncTextureCircle = workingFrame:CreateTexture(nil, "artwork")
f.SyncTextureCircle:SetPoint("center", f.SyncTextureBackground, "center", 0, 0)
f.SyncTextureCircle:SetTexture([[Interface\COMMON\StreamCircle]])
f.SyncTextureCircle:SetSize(32, 32)
f.SyncTextureGrade = workingFrame:CreateTexture(nil, "overlay")
f.SyncTextureGrade:SetPoint("center", f.SyncTextureBackground, "center", 0, 0)
f.SyncTextureGrade:SetTexture([[Interface\COMMON\StreamFrame]])
f.SyncTextureGrade:SetSize(32, 32)
local animationHub = DF:CreateAnimationHub (workingFrame)
animationHub:SetLooping ("Repeat")
f.WorkingAnimation = animationHub
local rotation = DF:CreateAnimation (animationHub, "ROTATION", 1, 3, -360)
local rotation = DF:CreateAnimation(animationHub, "ROTATION", 1, 3, -360)
rotation:SetTarget (f.SyncTextureCircle)
f.SyncText = workingFrame:CreateFontString (nil, "border", "GameFontNormal")
f.SyncText:SetPoint ("right", f.SyncTextureBackground, "left", 0, 0)
f.SyncText:SetText ("working")
f.SyncText:SetPoint("right", f.SyncTextureBackground, "left", 0, 0)
f.SyncText:SetText("working")
local endAnimationHub = DF:CreateAnimationHub (workingFrame, nil, function() workingFrame:Hide() end)
DF:CreateAnimation (endAnimationHub, "ALPHA", 1, 0.5, 1, 0)
DF:CreateAnimation(endAnimationHub, "ALPHA", 1, 0.5, 1, 0)
f.EndAnimationHub = endAnimationHub
end
@@ -215,10 +215,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local GuildSyncButton = DF:CreateButton (f, doGuildSync, 130, 20, Loc ["STRING_GUILDDAMAGERANK_SYNCBUTTONTEXT"], nil, nil, nil, "GuildSyncButton", nil, nil, options_button_template, options_text_template)
GuildSyncButton:SetPoint ("topright", f, "topright", -20, -34)
GuildSyncButton:SetPoint("topright", f, "topright", -20, -34)
GuildSyncButton:SetIcon ([[Interface\GLUES\CharacterSelect\RestoreButton]], 12, 12, "overlay", {0.2, .8, 0.2, .8}, nil, 4)
--> listen to comm events
--listen to comm events
local eventListener = Details:CreateEventListener()
function eventListener:OnCommReceived (event, length, prefix, playerName, realmName, detailsVersion, guildSyncID, data)
@@ -239,7 +239,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
f.DownloadedSize = f.DownloadedSize + length
local downloadSpeed = f.DownloadedSize / (time() - f.SyncStartTime)
f.SyncText:SetText ("working [downloading " .. f.DownloadedAmount .. "/" .. f.RequestedAmount .. ", " .. format ("%.2f", downloadSpeed/1024) .. "Kbps]")
f.SyncText:SetText("working [downloading " .. f.DownloadedAmount .. "/" .. f.RequestedAmount .. ", " .. format ("%.2f", downloadSpeed/1024) .. "Kbps]")
end
end
end
@@ -252,7 +252,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
--requested to download a selected list of encounter tables
elseif (guildSyncID == "G") then
f.RequestedAmount = f.RequestedAmount + #missingIDs
f.SyncText:SetText ("working [downloading " .. f.DownloadedAmount .. "/" .. f.RequestedAmount .. "]")
f.SyncText:SetText("working [downloading " .. f.DownloadedAmount .. "/" .. f.RequestedAmount .. "]")
end
end
end
@@ -260,7 +260,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
eventListener:RegisterEvent ("COMM_EVENT_RECEIVED", "OnCommReceived")
eventListener:RegisterEvent ("COMM_EVENT_SENT", "OnCommSent")
--> report results
--report results
function f.BuildReport()
if (f.LatestResourceTable) then
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
@@ -291,7 +291,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local ReportButton = DF:CreateButton (f, f.BuildReport, 130, 20, Loc ["STRING_OPTIONS_REPORT_ANCHOR"]:gsub (":", ""), nil, nil, nil, "ReportButton", nil, nil, options_button_template, options_text_template)
ReportButton:SetPoint ("right", GuildSyncButton, "left", -2, 0)
ReportButton:SetPoint("right", GuildSyncButton, "left", -2, 0)
ReportButton:SetIcon ([[Interface\GLUES\CharacterSelect\RestoreButton]], 12, 12, "overlay", {0.2, .8, 0.2, .8}, nil, 4)
--
@@ -313,8 +313,8 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
--> window script handlers
f:SetScript ("OnMouseDown", function(self, button)
--window script handlers
f:SetScript("OnMouseDown", function(self, button)
if (self.isMoving) then
return
end
@@ -326,15 +326,15 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end)
f:SetScript ("OnMouseUp", function(self, button)
f:SetScript("OnMouseUp", function(self, button)
if (self.isMoving and button == "LeftButton") then
self:StopMovingOrSizing()
self.isMoving = nil
end
end)
f:SetScript ("OnHide", function()
--> save latest shown state
f:SetScript("OnHide", function()
--save latest shown state
f.LatestSelection = f.LatestSelection or {}
f.LatestSelection.Raid = DetailsRaidHistoryWindow.select_raid.value
f.LatestSelection.Boss = DetailsRaidHistoryWindow.select_boss.value
@@ -362,7 +362,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
--> select raid:
--select raid:
local onRaidSelect = function(_, _, raid)
Details.rank_window.last_raid = raid
f:UpdateDropdowns (true)
@@ -372,10 +372,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
return raidList
end
local raid_dropdown = DF:CreateDropDown (f, buildRaidList, 1, dropdownWidth, 20, "select_raid")
local raid_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_RAID"] .. ":", _, _, "GameFontNormal", "select_raid_label")
local raid_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_RAID"] .. ":", _, _, "GameFontNormal", "select_raid_label")
raid_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select boss:
--select boss:
local on_boss_select = function(_, _, boss)
on_select()
end
@@ -383,10 +383,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
return bossList
end
local boss_dropdown = DF:CreateDropDown (f, build_boss_list, 1, dropdownWidth, 20, "select_boss")
local boss_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_BOSS"] .. ":", _, _, "GameFontNormal", "select_boss_label")
local boss_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_BOSS"] .. ":", _, _, "GameFontNormal", "select_boss_label")
boss_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select difficulty:
--select difficulty:
local on_diff_select = function(_, _, diff)
Details.rank_window.last_difficulty = diff
on_select()
@@ -396,10 +396,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
return difficultyList
end
local diff_dropdown = DF:CreateDropDown (f, build_diff_list, 1, dropdownWidth, 20, "select_diff")
local diff_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_DIFF"] .. ":", _, _, "GameFontNormal", "select_diff_label")
local diff_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_DIFF"] .. ":", _, _, "GameFontNormal", "select_diff_label")
diff_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select role:
--select role:
local on_role_select = function(_, _, role)
on_select()
end
@@ -410,10 +410,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
}
end
local role_dropdown = DF:CreateDropDown (f, build_role_list, 1, dropdownWidth, 20, "select_role")
local role_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_ROLE"] .. ":", _, _, "GameFontNormal", "select_role_label")
local role_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_ROLE"] .. ":", _, _, "GameFontNormal", "select_role_label")
role_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select guild:
--select guild:
local on_guild_select = function(_, _, guild)
on_select()
end
@@ -421,10 +421,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
return guildList
end
local guild_dropdown = DF:CreateDropDown (f, build_guild_list, 1, dropdownWidth, 20, "select_guild")
local guild_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_GUILD"] .. ":", _, _, "GameFontNormal", "select_guild_label")
local guild_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_GUILD"] .. ":", _, _, "GameFontNormal", "select_guild_label")
guild_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select playerbase:
--select playerbase:
local on_player_select = function(_, _, player)
on_select()
end
@@ -435,10 +435,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
}
end
local player_dropdown = DF:CreateDropDown (f, build_player_list, 1, dropdownWidth, 20, "select_player")
local player_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE"] .. ":", _, _, "GameFontNormal", "select_player_label")
local player_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE"] .. ":", _, _, "GameFontNormal", "select_player_label")
player_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select player:
--select player:
local onPlayer2Select = function(_, _, player)
f.latest_player_selected = player
f:BuildPlayerTable (player)
@@ -448,7 +448,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local t = {}
local alreadyListed = {}
if (encounterTable) then
for encounterIndex, encounter in ipairs (encounterTable) do
for encounterIndex, encounter in ipairs(encounterTable) do
if (encounter.guild == guild) then
local roleTable = encounter [role]
for playerName, _ in pairs (roleTable) do
@@ -465,7 +465,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
return t
end
local player2_dropdown = DF:CreateDropDown (f, build_player2_list, 1, dropdownWidth, 20, "select_player2")
local player2_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE_PLAYER"] .. ":", _, _, "GameFontNormal", "select_player2_label")
local player2_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE_PLAYER"] .. ":", _, _, "GameFontNormal", "select_player2_label")
player2_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
function f:UpdateDropdowns(DoNotSelectRaid)
@@ -510,7 +510,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
elseif (difficulty == 16) then
local alreadyHave = false
for i, t in ipairs (difficultyList) do
for i, t in ipairs(difficultyList) do
if (t.label == "Mythic") then
alreadyHave = true
end
@@ -540,7 +540,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
for index, encounter in ipairs (encounterTable) do
for index, encounter in ipairs(encounterTable) do
local guild = encounter.guild
if (not guildRepeated [guild]) then
tinsert (guildList, {value = guild, label = guild, icon = icon, onclick = on_guild_select})
@@ -578,13 +578,13 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
wipe (bossList)
for difficulty, encounterIdTable in pairs (db) do
if (type (difficulty) == "number") then
if (type(difficulty) == "number") then
if (difficulty == 14) then
--tinsert (difficultyList, {value = 14, label = "Normal", icon = icon, onclick = on_diff_select})
--print ("has normal encounter")
elseif (difficulty == 15) then
local alreadyHave = false
for i, t in ipairs (difficultyList) do
for i, t in ipairs(difficultyList) do
if (t.label == "Heroic") then
alreadyHave = true
end
@@ -594,7 +594,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
elseif (difficulty == 16) then
local alreadyHave = false
for i, t in ipairs (difficultyList) do
for i, t in ipairs(difficultyList) do
if (t.label == "Mythic") then
alreadyHave = true
end
@@ -636,39 +636,39 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
boss_dropdown:Refresh()
end
--> anchors:
raid_string:SetPoint ("topleft", f, "topleft", 10, -70)
raid_dropdown:SetPoint ("topleft", f, "topleft", 10, -85)
--anchors:
raid_string:SetPoint("topleft", f, "topleft", 10, -70)
raid_dropdown:SetPoint("topleft", f, "topleft", 10, -85)
boss_string:SetPoint ("topleft", f, "topleft", 10, -110)
boss_dropdown:SetPoint ("topleft", f, "topleft", 10, -125)
boss_string:SetPoint("topleft", f, "topleft", 10, -110)
boss_dropdown:SetPoint("topleft", f, "topleft", 10, -125)
diff_string:SetPoint ("topleft", f, "topleft", 10, -150)
diff_dropdown:SetPoint ("topleft", f, "topleft", 10, -165)
diff_string:SetPoint("topleft", f, "topleft", 10, -150)
diff_dropdown:SetPoint("topleft", f, "topleft", 10, -165)
role_string:SetPoint ("topleft", f, "topleft", 10, -190)
role_dropdown:SetPoint ("topleft", f, "topleft", 10, -205)
role_string:SetPoint("topleft", f, "topleft", 10, -190)
role_dropdown:SetPoint("topleft", f, "topleft", 10, -205)
guild_string:SetPoint ("topleft", f, "topleft", 10, -230)
guild_dropdown:SetPoint ("topleft", f, "topleft", 10, -245)
guild_string:SetPoint("topleft", f, "topleft", 10, -230)
guild_dropdown:SetPoint("topleft", f, "topleft", 10, -245)
player_string:SetPoint ("topleft", f, "topleft", 10, -270)
player_dropdown:SetPoint ("topleft", f, "topleft", 10, -285)
player_string:SetPoint("topleft", f, "topleft", 10, -270)
player_dropdown:SetPoint("topleft", f, "topleft", 10, -285)
player2_string:SetPoint ("topleft", f, "topleft", 10, -310)
player2_dropdown:SetPoint ("topleft", f, "topleft", 10, -325)
player2_string:SetPoint("topleft", f, "topleft", 10, -310)
player2_dropdown:SetPoint("topleft", f, "topleft", 10, -325)
player2_string:Hide()
player2_dropdown:Hide()
--> refresh the window:
--refresh the window:
function f:BuildPlayerTable (playerName)
local encounterTable, guild, role = unpack (f.build_player2_data or {})
local data = {}
if (type (playerName) == "string" and string.len (playerName) > 1) then
for encounterIndex, encounter in ipairs (encounterTable) do
if (type(playerName) == "string" and string.len (playerName) > 1) then
for encounterIndex, encounter in ipairs(encounterTable) do
if (encounter.guild == guild) then
local roleTable = encounter [role]
@@ -687,7 +687,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
--> update graphic
--update graphic
if (not f.gframe) then
local onenter = function(self)
@@ -707,7 +707,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
GameCooltip:Hide()
end
f.gframe = DF:CreateGFrame (f, 650, 400, 35, onenter, onleave, "gframe", "$parentGF")
f.gframe:SetPoint ("topleft", f, "topleft", 190, -65)
f.gframe:SetPoint("topleft", f, "topleft", 190, -65)
end
f.gframe:Reset()
@@ -717,7 +717,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local fillpanel = DF:NewFillPanel (f, {}, "$parentFP", "fillpanel", 710, 501, false, false, true, nil)
fillpanel:SetPoint ("topleft", f, "topleft", 195, -65)
fillpanel:SetPoint("topleft", f, "topleft", 195, -65)
function f:BuildGuildRankTable (encounterTable, guild, role)
@@ -729,7 +729,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local playerScore = {}
--get the best of each player
for encounterIndex, encounter in ipairs (encounterTable) do
for encounterIndex, encounter in ipairs(encounterTable) do
if (encounter.guild == guild) then
local roleTable = encounter [role]
@@ -789,7 +789,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
table.sort (sortTable, function(a, b) return a[8] > b[8] end)
--> add the number before the player name
--add the number before the player name
for i = 1, #sortTable do
local t = sortTable [i]
t [1] = i .. ". " .. t [1]
@@ -816,7 +816,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local player_class = {}
local amt_encounters = 0
for encounterIndex, encounter in ipairs (encounterTable) do
for encounterIndex, encounter in ipairs(encounterTable) do
if (encounter.guild == guild) then
local roleTable = encounter [role]
@@ -854,10 +854,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
--> sort alphabetical
--sort alphabetical
table.sort (players, function(a, b) return a[1] < b[1] end)
for index, playerTable in ipairs (players) do
for index, playerTable in ipairs(players) do
for i = #playerTable, amt_encounters do
tinsert (playerTable, "")
end
@@ -876,11 +876,11 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
fillpanel:UpdateRows (header)
fillpanel:Refresh()
fillpanel:SetPoint ("topleft", f, "topleft", 200, -65)
fillpanel:SetPoint("topleft", f, "topleft", 200, -65)
end
function f:Refresh (player_name)
--> build the main table
--build the main table
local diff = diff_dropdown.value
local boss = boss_dropdown.value
local role = role_dropdown.value
@@ -895,7 +895,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
if (diffTable) then
local encounters = diffTable [boss]
if (encounters) then
if (player == 1) then --> raid
if (player == 1) then --raid
fillpanel:Show()
if (f.gframe) then
f.gframe:Hide()
@@ -904,7 +904,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
player2_dropdown:Hide()
f:BuildRaidTable (encounters, guild, role)
elseif (player == 2) then --> only one player
elseif (player == 2) then --only one player
fillpanel:Hide()
if (f.gframe) then
f.gframe:Show()
@@ -925,7 +925,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
f:BuildPlayerTable (player2_dropdown.value)
end
else
if (player == 1) then --> raid
if (player == 1) then --raid
fillpanel:Show()
if (f.gframe) then
f.gframe:Hide()
@@ -934,7 +934,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
player2_dropdown:Hide()
f:BuildRaidTable ({}, guild, role)
elseif (player == 2) then --> only one player
elseif (player == 2) then --only one player
fillpanel:Hide()
if (f.gframe) then
f.gframe:Show()
@@ -955,8 +955,8 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local statsWindow = _G.DetailsRaidHistoryWindow
--> table means some button send the request - nil for other ways
if (type (_raid) == "table" or (not _raid and not _boss and not _difficulty and not _role and not _guild and not _player_base and not _player_name)) then
--table means some button send the request - nil for other ways
if (type(_raid) == "table" or (not _raid and not _boss and not _difficulty and not _role and not _guild and not _player_base and not _player_name)) then
local f = statsWindow
if (f.LatestSelection) then
_raid = f.LatestSelection.Raid
@@ -997,12 +997,12 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
statsWindow.Mode = _history_type
if (statsWindow.Mode == 1) then
--overall
statsWindow.HistoryCheckBox:SetValue (true)
statsWindow.GuildRankCheckBox:SetValue (false)
statsWindow.HistoryCheckBox:SetValue(true)
statsWindow.GuildRankCheckBox:SetValue(false)
elseif (statsWindow.Mode == 2) then
--guild rank
statsWindow.GuildRankCheckBox:SetValue (true)
statsWindow.HistoryCheckBox:SetValue (false)
statsWindow.GuildRankCheckBox:SetValue(true)
statsWindow.HistoryCheckBox:SetValue(false)
end
end
@@ -1028,7 +1028,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
if (_guild) then
if (type (_guild) == "boolean") then
if (type(_guild) == "boolean") then
_guild = GetGuildInfo ("player")
end
statsWindow.select_guild:Select (_guild)
+89 -89
View File
@@ -170,78 +170,78 @@ do
while (text_width > 104) do
local text = font_string:GetText()
text = strsub (text, 1, #text-1)
font_string:SetText (text)
font_string:SetText(text)
text_width = font_string:GetStringWidth()
end
end
local create_all_switch_button = function(attribute, sub_attribute, x, y)
local button = CreateFrame ("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute, allDisplaysFrame)
button:SetSize (130, 16)
button.texture = button:CreateTexture (nil, "overlay")
button.texture:SetPoint ("left", 0, 0)
button.texture:SetSize (icon_size, icon_size)
local button = CreateFrame("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute, allDisplaysFrame)
button:SetSize(130, 16)
button.texture = button:CreateTexture(nil, "overlay")
button.texture:SetPoint("left", 0, 0)
button.texture:SetSize(icon_size, icon_size)
local texture_highlight_frame = CreateFrame ("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute .. "IconFrame", button)
texture_highlight_frame:SetSize (icon_size, icon_size)
texture_highlight_frame:SetPoint ("left", 0, 0)
local texture_highlight_frame = CreateFrame("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute .. "IconFrame", button)
texture_highlight_frame:SetSize(icon_size, icon_size)
texture_highlight_frame:SetPoint("left", 0, 0)
texture_highlight_frame.texture = button.texture
texture_highlight_frame.MainFrame = button
button.text = button:CreateFontString (nil, "overlay", "GameFontNormal")
button.text:SetPoint ("left", button.texture, "right", 2, 0)
button.text:SetPoint("left", button.texture, "right", 2, 0)
button.attribute = attribute
button.sub_attribute = sub_attribute
button:SetPoint ("topleft", x, y)
button:SetPoint("topleft", x, y)
Details:SetFontSize(button.text, Details.all_switch_config.font_size)
Details:SetFontColor (button.text, text_color)
Details:SetFontColor(button.text, text_color)
button:SetScript ("OnClick", on_click_all_switch_button)
button:SetScript ("OnEnter", on_enter_all_switch_button)
button:SetScript ("OnLeave", on_leave_all_switch_button)
button:SetScript("OnClick", on_click_all_switch_button)
button:SetScript("OnEnter", on_enter_all_switch_button)
button:SetScript("OnLeave", on_leave_all_switch_button)
texture_highlight_frame:SetScript ("OnClick", on_click_all_switch_button)
texture_highlight_frame:SetScript ("OnEnter", on_enter_all_switch_button_icon)
texture_highlight_frame:SetScript ("OnLeave", on_leave_all_switch_button_icon)
texture_highlight_frame:SetScript("OnClick", on_click_all_switch_button)
texture_highlight_frame:SetScript("OnEnter", on_enter_all_switch_button_icon)
texture_highlight_frame:SetScript("OnLeave", on_leave_all_switch_button_icon)
button:RegisterForClicks ("LeftButtonDown", "RightButtonDown")
return button
end
allDisplaysFrame:SetScript ("OnShow", function()
allDisplaysFrame:SetScript("OnShow", function()
if (not allDisplaysFrame.already_built) then
local x, y = 8, -8
allDisplaysFrame.higher_counter = 0
for attribute = 1, Details.atributos[0] do
--> localized attribute name
--localized attribute name
local loc_attribute_name = Details.atributos.lista [attribute]
local title_icon = allDisplaysFrame:CreateTexture (nil, "overlay")
title_icon:SetPoint ("topleft", x, y)
local title_icon = allDisplaysFrame:CreateTexture(nil, "overlay")
title_icon:SetPoint("topleft", x, y)
local texture, l, r, t, b = Details:GetAttributeIcon (attribute)
title_icon:SetTexture (texture)
title_icon:SetTexture(texture)
title_icon:SetTexCoord (l, r, t, b)
title_icon:SetSize (18, 18)
title_icon:SetSize(18, 18)
local title_str = allDisplaysFrame:CreateFontString (nil, "overlay", "GameFontNormal")
title_str:SetPoint ("left", title_icon, "right", 2, 0)
title_str:SetText (loc_attribute_name)
title_str:SetPoint("left", title_icon, "right", 2, 0)
title_str:SetText(loc_attribute_name)
y = y - 20
allDisplaysFrame.buttons [attribute] = {}
for i = 1, #Details.sub_atributos [attribute].lista do
--> localized sub attribute name
--localized sub attribute name
local loc_sub_attribute_name = Details.sub_atributos [attribute].lista [i]
local button = create_all_switch_button (attribute, i, x, y)
button.text:SetText (loc_sub_attribute_name)
button.text:SetText(loc_sub_attribute_name)
Details:SetFontSize(button.text, Details.all_switch_config.font_size)
allDisplaysFrame.check_text_size (button.text)
button.texture:SetTexture (Details.sub_atributos [attribute].icones [i] [1])
button.texture:SetTexture(Details.sub_atributos [attribute].icones [i] [1])
button.texture:SetTexCoord (unpack (Details.sub_atributos [attribute].icones [i] [2]))
tinsert (allDisplaysFrame.buttons [attribute], button)
y = y - 17
@@ -255,33 +255,33 @@ do
y = -8
end
--> prepare for scripts
--prepare for scripts
allDisplaysFrame.x = x
allDisplaysFrame.y = -8
allDisplaysFrame.buttons [Details.atributos[0]+1] = {}
local title_icon = allDisplaysFrame:CreateTexture (nil, "overlay")
local title_icon = allDisplaysFrame:CreateTexture(nil, "overlay")
local texture, l, r, t, b = Details:GetAttributeIcon (Details.atributos[0]+1)
title_icon:SetTexture([[Interface\AddOns\Details\images\icons]])
title_icon:SetTexCoord(412/512, 441/512, 43/512, 79/512)
title_icon:SetVertexColor(.7, .6, .5, 1)
title_icon:SetSize(16, 16)
local title_str = allDisplaysFrame:CreateFontString (nil, "overlay", "GameFontNormal")
title_str:SetPoint ("left", title_icon, "right", 2, 0)
title_str:SetText ("Scripts")
title_str:SetPoint("left", title_icon, "right", 2, 0)
title_str:SetText("Scripts")
title_icon:SetPoint ("topleft", allDisplaysFrame.x, allDisplaysFrame.y)
title_icon:SetPoint("topleft", allDisplaysFrame.x, allDisplaysFrame.y)
allDisplaysFrame.y = allDisplaysFrame.y - 20
allDisplaysFrame.title_custom = title_icon
allDisplaysFrame.already_built = true
--> prepare for plugins
--prepare for plugins
allDisplaysFrame.buttons[6] = {}
local title_icon = allDisplaysFrame:CreateTexture(nil, "overlay")
title_icon:SetTexture ([[Interface\AddOns\Details\images\modo_icones]])
title_icon:SetTexture([[Interface\AddOns\Details\images\modo_icones]])
title_icon:SetTexCoord (32/256*3, 32/256*4, 0, 1)
title_icon:SetSize (16, 16)
title_icon:SetSize(16, 16)
local title_str = allDisplaysFrame:CreateFontString(nil, "overlay", "GameFontNormal")
title_str:SetPoint("left", title_icon, "right", 2, 0)
@@ -290,9 +290,9 @@ do
allDisplaysFrame.title_scripts = title_icon
end
--> update scripts
--update scripts
local custom_index = Details.atributos[0]+1
for _, button in ipairs (allDisplaysFrame.buttons [custom_index]) do
for _, button in ipairs(allDisplaysFrame.buttons [custom_index]) do
button:Hide()
end
@@ -306,11 +306,11 @@ do
end
local custom = Details.custom [i]
button.text:SetText (custom.name)
button.text:SetText(custom.name)
Details:SetFontSize(button.text, Details.all_switch_config.font_size)
allDisplaysFrame.check_text_size (button.text)
button.texture:SetTexture (custom.icon)
button.texture:SetTexture(custom.icon)
button.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
button:Show()
@@ -321,20 +321,20 @@ do
allDisplaysFrame.higher_counter = #Details.custom
end
--> update plugins
--update plugins
local script_index = Details.atributos[0]+2
local button_index = 1
allDisplaysFrame.x = allDisplaysFrame.x + 130
allDisplaysFrame.y = -28
for _, button in ipairs (allDisplaysFrame.buttons[script_index]) do
for _, button in ipairs(allDisplaysFrame.buttons[script_index]) do
button:Hide()
end
--build raid plugins list
local raidPlugins = Details.RaidTables:GetAvailablePlugins()
if (#raidPlugins >= 0) then
for i, ptable in ipairs (raidPlugins) do
for i, ptable in ipairs(raidPlugins) do
--if a plugin has the member 'NoMenu', it won't be shown on menus to select plugins
if (ptable[3].__enabled and not ptable[3].NoMenu) then
--PluginName, PluginIcon, PluginObject, PluginAbsoluteName
@@ -353,7 +353,7 @@ do
Details:SetFontSize(button.text, Details.all_switch_config.font_size)
allDisplaysFrame.check_text_size(button.text)
button.texture:SetTexture (ptable[2])
button.texture:SetTexture(ptable[2])
button.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
button:Show()
@@ -385,14 +385,14 @@ do
--they aren't called anymore on showing and hiding the bookmark frame
--show animation
local animHub = Details.gump:CreateAnimationHub (bookmarkFrame, function() bookmarkFrame:Show() end)
Details.gump:CreateAnimation (animHub, "scale", 1, 0.04, 0, 1, 1, 1, "LEFT", 0, 0)
Details.gump:CreateAnimation (animHub, "alpha", 1, 0.04, 0, 1)
Details.gump:CreateAnimation(animHub, "scale", 1, 0.04, 0, 1, 1, 1, "LEFT", 0, 0)
Details.gump:CreateAnimation(animHub, "alpha", 1, 0.04, 0, 1)
bookmarkFrame.ShowAnimation = animHub
--hide animation
local animHub = Details.gump:CreateAnimationHub (bookmarkFrame, function() bookmarkFrame:Show() end, function() bookmarkFrame:Hide() end)
Details.gump:CreateAnimation (animHub, "scale", 1, 0.04, 1, 1, 0, 1, "RIGHT", 0, 0)
Details.gump:CreateAnimation (animHub, "alpha", 1, 0.04, 1, 0)
Details.gump:CreateAnimation(animHub, "scale", 1, 0.04, 1, 1, 0, 1, "RIGHT", 0, 0)
Details.gump:CreateAnimation(animHub, "alpha", 1, 0.04, 1, 0)
bookmarkFrame.HideAnimation = animHub
---------------------------------------------------------------------------------------------------------------------------
@@ -512,17 +512,17 @@ function Details.switch:ShowMe(instancia)
end
local on_enter = function(self)
--self.MyObject.this_background:SetBlendMode ("ADD")
--self.MyObject.boss_texture:SetBlendMode ("ADD")
--self.MyObject.this_background:SetBlendMode("ADD")
--self.MyObject.boss_texture:SetBlendMode("ADD")
end
local on_leave = function(self)
self.MyObject.this_background:SetBlendMode ("BLEND")
self.MyObject.boss_texture:SetBlendMode ("BLEND")
self.MyObject.this_background:SetBlendMode("BLEND")
self.MyObject.boss_texture:SetBlendMode("BLEND")
end
function Details.switch:CreateSegmentBlock()
local s = gump:CreateLabel (Details.switch.frame)
local s = gump:CreateLabel(Details.switch.frame)
Details:SetFontSize (s, 9)
local index = #Details.switch.segments_blocks
@@ -533,19 +533,19 @@ function Details.switch:ShowMe(instancia)
end
local button = gump:CreateButton (Details.switch.frame, segment_switch, 100, 20, "", index)
button:SetPoint ("topleft", s, "topleft", -17, 0)
button:SetPoint ("bottomright", s, "bottomright", 0, 0)
button:SetPoint("topleft", s, "topleft", -17, 0)
button:SetPoint("bottomright", s, "bottomright", 0, 0)
button:SetClickFunction (segment_switch, nil, nil, "right")
local boss_texture = gump:CreateImage (button, nil, 16, 16)
boss_texture:SetPoint ("right", s, "left", -2, 0)
boss_texture:SetPoint("right", s, "left", -2, 0)
local background = button:CreateTexture (nil, "background")
background:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
local background = button:CreateTexture(nil, "background")
background:SetTexture("Interface\\SPELLBOOK\\Spellbook-Parts")
background:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
background:SetWidth (85)
background:SetPoint ("topleft", s.widget, "topleft", -16, 3)
background:SetPoint ("bottomright", s.widget, "bottomright", -3, -5)
background:SetWidth(85)
background:SetPoint("topleft", s.widget, "topleft", -16, 3)
background:SetPoint("bottomright", s.widget, "bottomright", -3, -5)
button.this_background = background
button.boss_texture = boss_texture.widget
@@ -554,8 +554,8 @@ function Details.switch:ShowMe(instancia)
s.button = button
s.background = background
button:SetScript ("OnEnter", on_enter)
button:SetScript ("OnLeave", on_leave)
button:SetScript("OnEnter", on_enter)
button:SetScript("OnLeave", on_leave)
s.HideMe = hide_label
s.ShowMe = show_label
@@ -574,7 +574,7 @@ function Details.switch:ShowMe(instancia)
end
function Details.switch:ClearSegmentBlocks()
for _, block in ipairs (Details.switch.segments_blocks) do
for _, block in ipairs(Details.switch.segments_blocks) do
block:HideMe()
end
end
@@ -600,8 +600,8 @@ function Details.switch:ShowMe(instancia)
for horizontal = 1, horizontal_amt do
local button = Details.switch:GetSegmentBlock (i)
button:SetPoint ("topleft", frame, "topleft", x + 16, -y)
button:SetSize (size - 22, 12)
button:SetPoint("topleft", frame, "topleft", x + 16, -y)
button:SetSize(size - 22, 12)
button:ShowMe()
i = i + 1
@@ -616,18 +616,18 @@ function Details.switch:ShowMe(instancia)
Details.switch.segments_blocks = {}
--> current and overall
--current and overall
Details.switch:CreateSegmentBlock()
Details.switch:CreateSegmentBlock()
local block1 = Details.switch:GetSegmentBlock (1)
block1:SetText (Loc["STRING_CURRENTFIGHT"])
block1.texture:SetTexture ([[Interface\Scenarios\ScenariosParts]])
block1:SetText(Loc["STRING_CURRENTFIGHT"])
block1.texture:SetTexture([[Interface\Scenarios\ScenariosParts]])
block1.texture:SetTexCoord (55/512, 81/512, 368/512, 401/512)
local block2 = Details.switch:GetSegmentBlock (2)
block2:SetText (Loc["STRING_SEGMENT_OVERALL"])
block2.texture:SetTexture ([[Interface\Scenarios\ScenariosParts]])
block2:SetText(Loc["STRING_SEGMENT_OVERALL"])
block2.texture:SetTexture([[Interface\Scenarios\ScenariosParts]])
block2.texture:SetTexCoord (55/512, 81/512, 368/512, 401/512)
end
@@ -642,33 +642,33 @@ function Details.switch:ShowMe(instancia)
local block = Details.switch:GetSegmentBlock (i)
local enemy, color, raid_type, killed, is_trash, portrait, background, background_coords = Details:GetSegmentInfo (segment_index)
block:SetText ("#" .. segment_index .. " " .. enemy)
block:SetText("#" .. segment_index .. " " .. enemy)
if (combat.is_boss and combat.instance_type == "raid") then
local L, R, T, B, Texture = Details:GetBossIcon (combat.is_boss.mapid, combat.is_boss.index)
if (L) then
block.texture:SetTexture (Texture)
block.texture:SetTexture(Texture)
block.texture:SetTexCoord (L, R, T, B)
else
block.texture:SetTexture ([[Interface\Scenarios\ScenarioIcon-Boss]])
block.texture:SetTexture([[Interface\Scenarios\ScenarioIcon-Boss]])
end
else
block.texture:SetTexture ([[Interface\Scenarios\ScenarioIcon-Boss]])
block.texture:SetTexture([[Interface\Scenarios\ScenarioIcon-Boss]])
end
block:ShowMe()
segment_index = segment_index + 1
end
Details.switch.frame:SetScale (instancia.window_scale)
Details.switch.frame:SetScale(instancia.window_scale)
Details.switch:ResizeSegmentBlocks()
for i = segment_index+2, #Details.switch.segments_blocks do
Details.switch.segments_blocks [i]:HideMe()
end
Details.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 1)
Details.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 1)
Details.switch.frame:SetPoint("topleft", instancia.baseframe, "topleft", 0, 1)
Details.switch.frame:SetPoint("bottomright", instancia.baseframe, "bottomright", 0, 1)
Details.switch.frame:Show()
return
@@ -679,7 +679,7 @@ function Details.switch:ShowMe(instancia)
end
end
--> check if there is some custom contidional
--check if there is some custom contidional
if (instancia.atributo == 5) then
local custom_object = instancia:GetCustomObject()
if (custom_object and custom_object.OnSwitchShow) then
@@ -690,8 +690,8 @@ function Details.switch:ShowMe(instancia)
end
end
Details.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 1)
Details.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 1)
Details.switch.frame:SetPoint("topleft", instancia.baseframe, "topleft", 0, 1)
Details.switch.frame:SetPoint("bottomright", instancia.baseframe, "bottomright", 0, 1)
local altura = instancia.baseframe:GetHeight()
local mostrar_quantas = floor (altura / Details.switch.button_height) * 2
@@ -729,7 +729,7 @@ function Details.switch:ShowMe(instancia)
Details.switch:Resize (precisa_mostrar)
Details.switch:Update()
Details.switch.frame:SetScale (instancia.window_scale)
Details.switch.frame:SetScale(instancia.window_scale)
Details.switch.frame:Show()
Details.switch:Resize (precisa_mostrar)
@@ -953,9 +953,9 @@ function Details.switch:Update()
local textColor = "white"
if (options and options.sub_atributo) then
if (options.atributo == 5) then --> custom
if (options.atributo == 5) then --custom
local CustomObject = Details.custom [options.sub_atributo]
if (not CustomObject) then --> ele j foi deletado
if (not CustomObject) then --ele j foi deletado
icone = [[Interface\AddOns\Details\images\icons]]
coords = add_coords
name = Loc["STRING_SWITCH_CLICKME"]
@@ -968,7 +968,7 @@ function Details.switch:Update()
vcolor = vertex_color_default
end
elseif (options.atributo == "plugin") then --> plugin
elseif (options.atributo == "plugin") then --plugin
local plugin = Details:GetPlugin (options.sub_atributo)
if (plugin) then
@@ -976,7 +976,7 @@ function Details.switch:Update()
local raidPlugins = Details.RaidTables:GetAvailablePlugins()
local isAvailable = false
if (#raidPlugins >= 0) then
for i, ptable in ipairs (raidPlugins) do
for i, ptable in ipairs(raidPlugins) do
--check if the plugin is available
if (ptable[4] == plugin.real_name) then
isAvailable = true
@@ -1076,9 +1076,9 @@ function Details.switch:Update()
FauxScrollFrame_Update(DetailsSwitchPanelScroll, ceil (40 / Details.switch.vertical_amt) , Details.switch.horizontal_amt, 20)
end
local scroll = CreateFrame ("scrollframe", "DetailsSwitchPanelScroll", DetailsSwitchPanel, "FauxScrollFrameTemplate")
local scroll = CreateFrame("scrollframe", "DetailsSwitchPanelScroll", DetailsSwitchPanel, "FauxScrollFrameTemplate")
scroll:SetAllPoints()
scroll:SetScript ("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, Details.switch.Update) end) --altura
scroll:SetScript("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, Details.switch.Update) end) --altura
scroll.ScrollBar:Hide()
scroll.ScrollBar.ScrollUpButton:Hide()
scroll.ScrollBar.ScrollDownButton:Hide()
+196 -196
View File
@@ -1,10 +1,10 @@
local _detalhes = _G._detalhes
local L = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
--> default weaktable
--default weaktable
_detalhes.weaktable = {__mode = "v"}
--> globals
--globals
--[[global]] DETAILS_WA_AURATYPE_ICON = 1
--[[global]] DETAILS_WA_AURATYPE_TEXT = 2
--[[global]] DETAILS_WA_AURATYPE_BAR = 3
@@ -1421,12 +1421,12 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
--print (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
--> check if wa is installed
--check if wa is installed
if (not WeakAuras or not WeakAurasSaved) then
return
end
--> check if there is a group for our auras
--check if there is a group for our auras
--[=[
if (not WeakAurasSaved.displays ["Details! Aura Group"]) then
local group = _detalhes.table.copy ({}, group_prototype)
@@ -1443,7 +1443,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
return Details:Msg("feature disabled due to 9.0 changes.")
end
--> create the icon table
--create the icon table
local new_aura
icon_size = icon_size or 40
@@ -1482,10 +1482,10 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spellid", spellid)
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spell_casted", icon_text)
--> size
--size
new_aura.fontSize = min (icon_size, 24)
--> combat only
--combat only
if (in_combat) then
new_aura.load.use_combat = true
else
@@ -1528,10 +1528,10 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spellid", spellid)
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@title", icon_text)
--> size
--size
new_aura.fontSize = min (icon_size, 24)
--> combat only
--combat only
if (in_combat) then
new_aura.load.use_combat = true
else
@@ -1540,7 +1540,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then --boss mods
--> create the default aura table
--create the default aura table
if (aura_type == "icon") then
new_aura = _detalhes.table.copy ({}, icon_dbm_timerbar_prototype)
elseif (aura_type == "aurabar") then
@@ -1549,7 +1549,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura = _detalhes.table.copy ({}, text_dbm_timerbar_prototype)
end
--> text and icon
--text and icon
if (aura_type == "aurabar") then
icon_text = icon_text:gsub ("= ", "")
icon_text = icon_text:gsub (" =", "")
@@ -1561,7 +1561,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.displayIcon = icon_texture
end
--> size
--size
if (aura_type == "icon") then
new_aura.width = icon_size
new_aura.height = icon_size
@@ -1572,7 +1572,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.fontSize = min (icon_size, 72)
end
--> trigger
--trigger
if (aura_type == "text") then
local init_start = [[
aura_env.ability_text = "@text"
@@ -1768,7 +1768,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
_detalhes.table.overwrite (new_aura, add)
end
--> combat only
--combat only
if (in_combat) then
new_aura.load = new_aura.load or {}
new_aura.load.use_combat = true
@@ -1782,7 +1782,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
tinsert (new_aura.trigger.spellIds, spellid)
end
--> if is a regular aura without using spells ids
--if is a regular aura without using spells ids
if (not use_spellid) then
new_aura.trigger.useExactSpellId = false
new_aura.useName = true
@@ -1793,7 +1793,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.auraspellids = {tostring(spellid)}
end
--> check stack size
--check stack size
if (stacksize and stacksize >= 1) then
stacksize = floor (stacksize)
local add = _detalhes.table.copy ({}, stack_prototype)
@@ -1801,7 +1801,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
_detalhes.table.overwrite (new_aura, add)
end
--> icon text
--icon text
if (icon_text and icon_text ~= "") then
if (aura_type == "text") then
new_aura.displayText = icon_text
@@ -1812,7 +1812,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
end
end
--> size
--size
if (aura_type == "icon") then
new_aura.width = icon_size
new_aura.height = icon_size
@@ -1827,14 +1827,14 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.id = name
new_aura.displayIcon = icon_texture
--> load by encounter id
--load by encounter id
if (encounter_id) then
new_aura.load = new_aura.load or {}
new_aura.load.use_encounterid = true
new_aura.load.encounterid = tostring (encounter_id)
end
--> using sound
--using sound
if (sound and type (sound) == "table") then
local add = _detalhes.table.copy ({}, sound_prototype_custom)
add.actions.start.sound_path = sound.sound_path
@@ -1847,14 +1847,14 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
_detalhes.table.overwrite (new_aura, add)
end
--> chat message
--chat message
if (chat and chat ~= "") then
local add = _detalhes.table.copy ({}, chat_prototype)
add.actions.start.message = chat
_detalhes.table.overwrite (new_aura, add)
end
--> check if already exists a aura with this name
--check if already exists a aura with this name
if (WeakAurasSaved.displays [new_aura.id]) then
for i = 2, 100 do
if (not WeakAurasSaved.displays [new_aura.id .. " (" .. i .. ")"]) then
@@ -1864,7 +1864,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
end
end
--> check is is using glow effect
--check is is using glow effect
if (icon_glow) then
local add = _detalhes.table.copy ({}, glow_prototype)
add.actions.start.glow_frame = "WeakAuras:" .. new_aura.id
@@ -1876,16 +1876,16 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.cooldownTextEnabled = true
end
--> add the aura on a group
--add the aura on a group
if (group) then
new_aura.parent = group
if (new_aura.regionType == "icon") then
--> adjust the width and height of the new aura following the existing auras on the group
--adjust the width and height of the new aura following the existing auras on the group
local normalWidth, normalHeight, amount = 0, 0, 0
local allAurasInTheGroup = WeakAurasSaved.displays [group].controlledChildren
for index, auraname in ipairs (allAurasInTheGroup) do
for index, auraname in ipairs(allAurasInTheGroup) do
local auraObject = WeakAurasSaved.displays [auraname]
if (auraObject and auraObject.regionType == "icon") then
amount = amount + 1
@@ -1907,10 +1907,10 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.parent = nil
end
--> add the aura
--add the aura
WeakAuras.Add (new_aura)
--> check if the options panel has loaded
--check if the options panel has loaded
local options_frame = WeakAuras.OptionsFrame and WeakAuras.OptionsFrame()
if (options_frame) then
if (options_frame and not options_frame:IsShown()) then
@@ -1936,7 +1936,7 @@ end
-- text_size 72
function _detalhes:InitializeAuraCreationWindow() if true then return end
local DetailsAuraPanel = CreateFrame ("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
local DetailsAuraPanel = CreateFrame("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
DetailsAuraPanel.Frame = DetailsAuraPanel
DetailsAuraPanel.__name = L["STRING_CREATEAURA"]
DetailsAuraPanel.real_name = "DETAILS_CREATEAURA"
@@ -1968,7 +1968,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
DetailsAuraPanel.Initialized = true
--> check if there is a group for our auras
--check if there is a group for our auras
if (WeakAuras and WeakAurasSaved) then
if (not WeakAurasSaved.displays ["Details! Aura Group"]) then
local group = _detalhes.table.copy ({}, group_prototype)
@@ -1980,26 +1980,26 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
end
local f = DetailsAuraPanel or CreateFrame ("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
f:SetSize (800, 600)
f:SetPoint ("center", UIParent, "center", 0, 150)
local f = DetailsAuraPanel or CreateFrame("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
f:SetSize(800, 600)
f:SetPoint("center", UIParent, "center", 0, 150)
f:SetFrameStrata ("DIALOG")
f:EnableMouse (true)
f:SetMovable (true)
f:SetToplevel (true)
--background
f.bg1 = f:CreateTexture (nil, "background")
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.8)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetSize (790, 454)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor (.5, .5, .5, .7)
f:SetBackdropBorderColor (0, 0, 0, 1)
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor(.5, .5, .5, .7)
f:SetBackdropBorderColor(0, 0, 0, 1)
--register to libwindow
local LibWindow = LibStub ("LibWindow-1.1")
@@ -2008,40 +2008,40 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
LibWindow.MakeDraggable (f)
LibWindow.SavePosition (f)
f:SetScript ("OnMouseDown", function(self, button)
f:SetScript("OnMouseDown", function(self, button)
if (button == "RightButton") then
f:Hide()
end
end)
--titlebar
f.TitleBar = CreateFrame ("frame", "$parentTitleBar", f,"BackdropTemplate")
f.TitleBar:SetPoint ("topleft", f, "topleft", 2, -3)
f.TitleBar:SetPoint ("topright", f, "topright", -2, -3)
f.TitleBar:SetHeight (20)
f.TitleBar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f.TitleBar:SetBackdropColor (.2, .2, .2, 1)
f.TitleBar:SetBackdropBorderColor (0, 0, 0, 1)
f.TitleBar = CreateFrame("frame", "$parentTitleBar", f,"BackdropTemplate")
f.TitleBar:SetPoint("topleft", f, "topleft", 2, -3)
f.TitleBar:SetPoint("topright", f, "topright", -2, -3)
f.TitleBar:SetHeight(20)
f.TitleBar:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f.TitleBar:SetBackdropColor(.2, .2, .2, 1)
f.TitleBar:SetBackdropBorderColor(0, 0, 0, 1)
--close button
f.Close = CreateFrame ("button", "$parentCloseButton", f, "BackdropTemplate")
f.Close:SetPoint ("right", f.TitleBar, "right", -2, 0)
f.Close:SetSize (16, 16)
f.Close = CreateFrame("button", "$parentCloseButton", f, "BackdropTemplate")
f.Close:SetPoint("right", f.TitleBar, "right", -2, 0)
f.Close:SetSize(16, 16)
f.Close:SetNormalTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
f.Close:SetHighlightTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
f.Close:SetPushedTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
f.Close:SetNormalTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
f.Close:SetHighlightTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
f.Close:SetPushedTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
f.Close:GetNormalTexture():SetDesaturated(true)
f.Close:GetHighlightTexture():SetDesaturated(true)
f.Close:GetPushedTexture():SetDesaturated(true)
f.Close:SetAlpha (0.7)
f.Close:SetScript ("OnClick", function() f:Hide() end)
f.Close:SetScript("OnClick", function() f:Hide() end)
--title
f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
f.Title:SetPoint ("center", f.TitleBar, "center")
f.Title:SetText ("Details! Create Aura")
f.Title:SetPoint("center", f.TitleBar, "center")
f.Title:SetText("Details! Create Aura")
local fw = _detalhes:GetFramework()
@@ -2052,10 +2052,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local button_template = fw:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
--aura name
local name_label = fw:CreateLabel (f, "Aura Name: ", nil, nil, "GameFontNormal")
local name_label = fw:CreateLabel(f, "Aura Name: ", nil, nil, "GameFontNormal")
local name_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraName", "$parentAuraName")
name_textentry:SetTemplate (slider_template)
name_textentry:SetPoint ("left", name_label, "right", 2, 0)
name_textentry:SetPoint("left", name_label, "right", 2, 0)
f.name = name_textentry
--aura type
@@ -2073,18 +2073,18 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
return aura_type_table
end
local aura_type = fw:CreateDropDown (f, aura_type_options, 1, 150, 20, "AuraTypeDropdown", "$parentAuraTypeDropdown")
local aura_type_label = fw:CreateLabel (f, "Aura Type: ", nil, nil, "GameFontNormal")
aura_type:SetPoint ("left", aura_type_label, "right", 2, 0)
local aura_type_label = fw:CreateLabel(f, "Aura Type: ", nil, nil, "GameFontNormal")
aura_type:SetPoint("left", aura_type_label, "right", 2, 0)
aura_type:Hide()
local Icon_IconAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {200/512, 232/512, 336/512, 368/512}, nil, nil)
Icon_IconAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 10, -16)
Icon_IconAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 10, -16)
local Icon_StatusbarAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {235/512, 327/512, 336/512, 348/512}, nil, nil)
Icon_StatusbarAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 60, -26)
Icon_StatusbarAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 60, -26)
local Icon_TextOnlyAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {250/512, 306/512, 360/512, 367/512}, nil, nil)
Icon_TextOnlyAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 170, -28)
Icon_TextOnlyAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 170, -28)
local AuraTypeSelectedColor = {1, 1, 1, 0.3}
local AuraTypeBorderColor = {.3, .3, .3, 0.5}
@@ -2092,7 +2092,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local OnSelectAuraType = function(self, fixedParam, auraType, noUpdate)
if (type (auraType) == "number") then
if (type(auraType) == "number") then
if (auraType == 1) then
auraType = "icon"
elseif (auraType == 2) then
@@ -2102,57 +2102,57 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
end
f.IconAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
f.StatusbarAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
f.TextOnlyAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
f.IconAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
f.StatusbarAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
f.TextOnlyAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
f.IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
f.IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
f.StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
f.TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
if (auraType == "icon") then
f.IconAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
f.IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
f.IconAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
f.IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
elseif (auraType == "aurabar") then
f.StatusbarAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
f.StatusbarAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
f.StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
elseif (auraType == "text") then
f.TextOnlyAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
f.TextOnlyAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
f.TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
end
aura_type:SetValue (auraType)
aura_type:SetValue(auraType)
if (f.UpdateLabels and not noUpdate) then
f:UpdateLabels()
end
end
f.OnSelectAuraType = OnSelectAuraType
local AuraTypeBackground = f:CreateTexture (nil, "border")
local AuraTypeBackground = f:CreateTexture(nil, "border")
AuraTypeBackground:SetColorTexture (.4, .4, .4, .1)
AuraTypeBackground:SetHeight (64)
AuraTypeBackground:SetPoint ("topleft", f, "topleft", 10, -79)
AuraTypeBackground:SetPoint ("topright", f, "topright", -10, -79)
AuraTypeBackground:SetHeight(64)
AuraTypeBackground:SetPoint("topleft", f, "topleft", 10, -79)
AuraTypeBackground:SetPoint("topright", f, "topright", -10, -79)
local Icon_IconAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 46, 46, "", "icon", nil, nil, "IconAuraTypeButton")
local Icon_StatusbarAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 100, 46, "", "aurabar", nil, nil, "StatusbarAuraTypeButton")
local Icon_TextOnlyAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 69, 46, "", "text", nil, nil, "TextOnlyAuraTypeButton")
Icon_IconAuraTypeButton:SetPoint ("center", Icon_IconAuraType, "center")
Icon_StatusbarAuraTypeButton:SetPoint ("center", Icon_StatusbarAuraType, "center")
Icon_TextOnlyAuraTypeButton:SetPoint ("center", Icon_TextOnlyAuraType, "center")
Icon_IconAuraTypeButton:SetPoint("center", Icon_IconAuraType, "center")
Icon_StatusbarAuraTypeButton:SetPoint("center", Icon_StatusbarAuraType, "center")
Icon_TextOnlyAuraTypeButton:SetPoint("center", Icon_TextOnlyAuraType, "center")
Icon_IconAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_IconAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
Icon_IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
Icon_IconAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_IconAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
Icon_IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
Icon_StatusbarAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_StatusbarAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
Icon_StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
Icon_StatusbarAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_StatusbarAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
Icon_StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
Icon_TextOnlyAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_TextOnlyAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
Icon_TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
Icon_TextOnlyAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_TextOnlyAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
Icon_TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
--trigger list
--target
@@ -2185,8 +2185,8 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
return aura_on_table
end
local aura_on = fw:CreateDropDown (f, aura_on_options, 1, 150, 20, "AuraOnDropdown", "$parentAuraOnDropdown")
local aura_on_label = fw:CreateLabel (f, "Trigger On: ", nil, nil, "GameFontNormal")
aura_on:SetPoint ("left", aura_on_label, "right", 2, 0)
local aura_on_label = fw:CreateLabel(f, "Trigger On: ", nil, nil, "GameFontNormal")
aura_on:SetPoint("left", aura_on_label, "right", 2, 0)
aura_on:Hide()
local triggerList = {
@@ -2206,9 +2206,9 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local SetTriggerState = function(triggerID)
for i = 1, #triggerList do
triggerList[i].checkBox:SetValue (false)
triggerList[i].checkBox:SetValue(false)
if (triggerList[i].value == triggerID) then
triggerList[i].checkBox:SetValue (true)
triggerList[i].checkBox:SetValue(true)
end
end
end
@@ -2218,7 +2218,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local OnChangeTriggerState = function(self, triggerID, state)
SetTriggerState (triggerID)
aura_on:SetValue (triggerID)
aura_on:SetValue(triggerID)
if (f.UpdateLabels) then
f:UpdateLabels()
@@ -2231,10 +2231,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
checkBox:SetAsCheckBox()
checkBox:SetFixedParameter (triggerList [i].value)
checkBox:SetSize (20, 20)
checkBox:SetPoint ("topleft", aura_on_label, "bottomleft", 0, 12 + (-i*20))
local label = fw:CreateLabel (f, triggerList [i].name)
label:SetPoint ("left", checkBox, "right", 2, 0)
checkBox:SetSize(20, 20)
checkBox:SetPoint("topleft", aura_on_label, "bottomleft", 0, 12 + (-i*20))
local label = fw:CreateLabel(f, triggerList [i].name)
label:SetPoint("left", checkBox, "right", 2, 0)
triggerList [i].checkBox = checkBox
end
@@ -2243,39 +2243,39 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--spellname
local spellname_label = fw:CreateLabel (f, "Spell Name: ", nil, nil, "GameFontNormal")
local spellname_label = fw:CreateLabel(f, "Spell Name: ", nil, nil, "GameFontNormal")
local spellname_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SpellName", "$parentSpellName")
spellname_textentry:SetTemplate (slider_template)
spellname_textentry:SetPoint ("left", spellname_label, "right", 2, 0)
spellname_textentry:SetPoint("left", spellname_label, "right", 2, 0)
f.spellname = spellname_textentry
spellname_textentry.tooltip = "Spell/Debuff/Buff to be tracked."
--spellid
local auraid_label = fw:CreateLabel (f, "Spell Id: ", nil, nil, "GameFontNormal")
local auraid_label = fw:CreateLabel(f, "Spell Id: ", nil, nil, "GameFontNormal")
local auraid_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraSpellId", "$parentAuraSpellId")
auraid_textentry:SetTemplate (slider_template)
auraid_textentry:Disable()
auraid_textentry:SetPoint ("left", auraid_label, "right", 2, 0)
auraid_textentry:SetPoint("left", auraid_label, "right", 2, 0)
--use spellid
local usespellid_label = fw:CreateLabel (f, "Use SpellId: ", nil, nil, "GameFontNormal")
local usespellid_label = fw:CreateLabel(f, "Use SpellId: ", nil, nil, "GameFontNormal")
local aura_use_spellid = fw:CreateSwitch (f, function(_, _, state) if (state) then auraid_textentry:Enable() else auraid_textentry:Disable() end end, false, nil, nil, nil, nil, "UseSpellId")
aura_use_spellid:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
aura_use_spellid:SetAsCheckBox()
aura_use_spellid:SetPoint ("left", usespellid_label, "right", 2, 0)
aura_use_spellid:SetPoint("left", usespellid_label, "right", 2, 0)
aura_use_spellid.tooltip = "Use the spell id instead of the spell name, for advanced users."
--in combat only
local incombat_label = fw:CreateLabel (f, "Only in Combat: ", nil, nil, "GameFontNormal")
local incombat_label = fw:CreateLabel(f, "Only in Combat: ", nil, nil, "GameFontNormal")
local aura_incombat = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "UseInCombat")
aura_incombat:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
aura_incombat:SetAsCheckBox()
aura_incombat:SetPoint ("left", incombat_label, "right", 2, 0)
aura_incombat:SetPoint("left", incombat_label, "right", 2, 0)
aura_incombat.tooltip = "Only active when in combat."
--aura icon
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
local icon_label = fw:CreateLabel(f, "Icon: ", nil, nil, "GameFontNormal")
local icon_button_func = function(texture)
f.IconButton.icon.texture = texture
end
@@ -2283,30 +2283,30 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
icon_pick_button:InstallCustomTexture()
icon_pick_button:SetPoint ("left", icon_label, "right", 2, 0)
icon_button_icon:SetPoint ("left", icon_label, "right", 2, 0)
icon_pick_button:SetPoint("left", icon_label, "right", 2, 0)
icon_button_icon:SetPoint("left", icon_label, "right", 2, 0)
f.icon = icon_button_icon
--is cooldown
local iscooldown_label = fw:CreateLabel (f, "Cooldown Animation: ", nil, nil, "GameFontNormal")
local iscooldown_label = fw:CreateLabel(f, "Cooldown Animation: ", nil, nil, "GameFontNormal")
local aura_iscooldown = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "IsCooldown")
aura_iscooldown:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
aura_iscooldown:SetAsCheckBox()
aura_iscooldown:SetPoint ("left", iscooldown_label, "right", 2, 0)
aura_iscooldown:SetPoint("left", iscooldown_label, "right", 2, 0)
aura_iscooldown.tooltip = "Only active when in combat."
--stack
local stack_slider = fw:NewSlider (f, f, "$parentStackSlider", "StackSlider", 150, 20, 0, 30, 1, 0, true)
stack_slider.useDecimals = true
stack_slider:SetTemplate (slider_template)
local stack_label = fw:CreateLabel (f, "Trigger Stack Size: ", nil, nil, "GameFontNormal")
stack_slider:SetPoint ("left", stack_label, "right", 2, 0)
local stack_label = fw:CreateLabel(f, "Trigger Stack Size: ", nil, nil, "GameFontNormal")
stack_slider:SetPoint("left", stack_label, "right", 2, 0)
stack_slider.tooltip = "Minimum amount of stacks to trigger the aura."
--sound effect
local play_sound = function(self, fixedParam, file)
if (type (file) == "table") then
if (type(file) == "table") then
PlaySoundFile (file.sound_path, "Master")
else
PlaySoundFile (file, "Master")
@@ -2385,10 +2385,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
table.sort (sounds, sort)
for _, sound in ipairs (sounds) do
if (sound.name:find ("D_")) then --> details sound
for _, sound in ipairs(sounds) do
if (sound.name:find ("D_")) then --details sound
tinsert (t, {color = "orange", label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize})
elseif (sound.gamesound) then --> game sound
elseif (sound.gamesound) then --game sound
tinsert (t, {color = "yellow", label = sound.name, value = {sound_path = sound.file}, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize})
else
tinsert (t, {label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize})
@@ -2398,26 +2398,26 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
local sound_effect = fw:CreateDropDown (f, sound_options, 1, 150, 20, "SoundEffectDropdown", "$parentSoundEffectDropdown")
sound_effect:SetTemplate (slider_template)
local sound_effect_label = fw:CreateLabel (f, "Play Sound: ", nil, nil, "GameFontNormal")
sound_effect:SetPoint ("left", sound_effect_label, "right", 2, 0)
local sound_effect_label = fw:CreateLabel(f, "Play Sound: ", nil, nil, "GameFontNormal")
sound_effect:SetPoint("left", sound_effect_label, "right", 2, 0)
sound_effect.tooltip = "Sound played when the aura triggers."
--say something
local say_something_label = fw:CreateLabel (f, "/Say on Trigger: ", nil, nil, "GameFontNormal")
local say_something_label = fw:CreateLabel(f, "/Say on Trigger: ", nil, nil, "GameFontNormal")
local say_something = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SaySomething", "$parentSaySomething")
say_something:SetTemplate (slider_template)
say_something:SetPoint ("left", say_something_label, "right", 2, 0)
say_something:SetPoint("left", say_something_label, "right", 2, 0)
say_something.tooltip = "Your character /say this phrase when the aura triggers."
--aura text
local aura_text_label = fw:CreateLabel (f, "Aura Text: ", nil, nil, "GameFontNormal")
local aura_text_label = fw:CreateLabel(f, "Aura Text: ", nil, nil, "GameFontNormal")
local aura_text = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraText", "$parentAuraText")
aura_text:SetTemplate (slider_template)
aura_text:SetPoint ("left", aura_text_label, "right", 2, 0)
aura_text:SetPoint("left", aura_text_label, "right", 2, 0)
aura_text.tooltip = "Text shown at aura's icon right side."
--apply glow
local useglow_label = fw:CreateLabel (f, "Glow Effect: ", nil, nil, "GameFontNormal")
local useglow_label = fw:CreateLabel(f, "Glow Effect: ", nil, nil, "GameFontNormal")
local useglow = fw:CreateSwitch (f, function(self, _, state)
if (state and self.glow_test) then
self.glow_test:Show()
@@ -2432,26 +2432,26 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
useglow:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
useglow:SetAsCheckBox()
useglow:SetPoint ("left", useglow_label, "right", 2, 0)
useglow:SetPoint("left", useglow_label, "right", 2, 0)
useglow.tooltip = "Do not rename the aura on WeakAuras options panel or the glow effect may not work."
useglow.glow_test = CreateFrame ("frame", "DetailsAuraTextGlowTest", useglow.widget, "ActionBarButtonSpellActivationAlert")
useglow.glow_test:SetPoint ("topleft", useglow.widget, "topleft", -20, 2)
useglow.glow_test:SetPoint ("bottomright", useglow.widget, "bottomright", 20, -2)
useglow.glow_test = CreateFrame("frame", "DetailsAuraTextGlowTest", useglow.widget, "ActionBarButtonSpellActivationAlert")
useglow.glow_test:SetPoint("topleft", useglow.widget, "topleft", -20, 2)
useglow.glow_test:SetPoint("bottomright", useglow.widget, "bottomright", 20, -2)
useglow.glow_test:Hide()
--encounter id
local encounterid_label = fw:CreateLabel (f, "Encounter ID: ", nil, nil, "GameFontNormal")
local encounterid_label = fw:CreateLabel(f, "Encounter ID: ", nil, nil, "GameFontNormal")
local encounterid = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "EncounterIdText", "$parentEncounterIdText")
encounterid:SetTemplate (slider_template)
encounterid:SetPoint ("left", encounterid_label, "right", 2, 0)
encounterid:SetPoint("left", encounterid_label, "right", 2, 0)
encounterid.tooltip = "Only load this aura for this raid encounter."
--size
local icon_size_slider = fw:NewSlider (f, f, "$parentIconSizeSlider", "IconSizeSlider", 150, 20, 8, 256, 1, 64)
local icon_size_label = fw:CreateLabel (f, "Size: ", nil, nil, "GameFontNormal")
local icon_size_label = fw:CreateLabel(f, "Size: ", nil, nil, "GameFontNormal")
icon_size_slider:SetTemplate (slider_template)
icon_size_slider:SetPoint ("left", icon_size_label, "right", 2, 0)
icon_size_slider:SetPoint("left", icon_size_label, "right", 2, 0)
icon_size_slider.tooltip = "Icon size, width and height."
--aura addon
@@ -2464,8 +2464,8 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
local aura_addon = fw:CreateDropDown (f, addon_options, 1, 150, 20, "AuraAddonDropdown", "$parentAuraAddonDropdown")
aura_addon:SetTemplate (slider_template)
local aura_addon_label = fw:CreateLabel (f, "Addon: ", nil, nil, "GameFontNormal")
aura_addon:SetPoint ("left", aura_addon_label, "right", 2, 0)
local aura_addon_label = fw:CreateLabel(f, "Addon: ", nil, nil, "GameFontNormal")
aura_addon:SetPoint("left", aura_addon_label, "right", 2, 0)
--weakauras - group
@@ -2489,10 +2489,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
return t
end
local weakauras_folder_label = fw:CreateLabel (f, "WeakAuras Group: ", nil, nil, "GameFontNormal")
local weakauras_folder_label = fw:CreateLabel(f, "WeakAuras Group: ", nil, nil, "GameFontNormal")
local weakauras_folder = fw:CreateDropDown (f, weakauras_folder_options, 1, 150, 20, "WeakaurasFolderDropdown", "$parentWeakaurasFolder")
weakauras_folder:SetTemplate (slider_template)
weakauras_folder:SetPoint ("left", weakauras_folder_label, "right", 2, 0)
weakauras_folder:SetPoint("left", weakauras_folder_label, "right", 2, 0)
--make new group
local create_wa_group = function()
@@ -2536,18 +2536,18 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
weakauras_folder:Select (groupName)
end
local weakauras_newgroup_label = fw:CreateLabel (f, "New WeakAuras Group: ", nil, nil, "GameFontNormal")
local weakauras_newgroup_label = fw:CreateLabel(f, "New WeakAuras Group: ", nil, nil, "GameFontNormal")
local weakauras_newgroup_textentry = fw:CreateTextEntry (f, create_wa_group, 150, 20, "NewWeakaurasGroupTextEntry", "$parentNewWeakaurasGroup")
weakauras_newgroup_textentry:SetTemplate (slider_template)
weakauras_newgroup_textentry:SetPoint ("left", weakauras_newgroup_label, "right", 2, 0)
weakauras_newgroup_textentry:SetPoint("left", weakauras_newgroup_label, "right", 2, 0)
f.weakauras_newgroup = weakauras_newgroup_textentry
weakauras_newgroup_textentry.tooltip = "Enter the name of the new group"
local weakauras_newgroup_button = fw:CreateButton (f, create_wa_group, 106, 20, "Create Group")
weakauras_newgroup_button:SetTemplate (slider_template)
weakauras_newgroup_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
weakauras_newgroup_button:SetWidth (100)
weakauras_newgroup_button:SetPoint ("left", weakauras_newgroup_textentry, "right", 2, 0)
weakauras_newgroup_button:SetWidth(100)
weakauras_newgroup_button:SetPoint("left", weakauras_newgroup_textentry, "right", 2, 0)
--create
@@ -2589,11 +2589,11 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local create_button = fw:CreateButton (f, create_func, 106, 20, L["STRING_CREATEAURA"])
create_button:SetTemplate (slider_template)
create_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
create_button:SetWidth (160)
create_button:SetWidth(160)
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 20, "Cancel")
cancel_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
cancel_button:SetWidth (160)
cancel_button:SetWidth(160)
create_button:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
@@ -2604,36 +2604,36 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local y_start = 21
--aura name and the type
name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (25)) * -1)
aura_type_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (25)) * -1)
name_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*1) + (25)) * -1)
aura_type_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*2) + (25)) * -1)
--triggers
aura_on_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (65)) * -1)
stack_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*17) + (65)) * -1)
encounterid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*18) + (65)) * -1)
aura_on_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*4) + (65)) * -1)
stack_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*17) + (65)) * -1)
encounterid_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*18) + (65)) * -1)
--about the spell
spellname_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*20) + (45)) * -1)
usespellid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*21) + (45)) * -1)
auraid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*22) + (45)) * -1)
incombat_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*23) + (45)) * -1)
spellname_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*20) + (45)) * -1)
usespellid_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*21) + (45)) * -1)
auraid_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*22) + (45)) * -1)
incombat_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*23) + (45)) * -1)
--configuration
icon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*6) + (47)) * -1)
sound_effect_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*7) + (47)) * -1)
say_something_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*8) + (47)) * -1)
aura_text_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*9) + (47)) * -1)
useglow_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*10) + (47)) * -1)
iscooldown_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*11) + (47)) * -1)
icon_size_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*12) + (47)) * -1)
icon_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*6) + (47)) * -1)
sound_effect_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*7) + (47)) * -1)
say_something_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*8) + (47)) * -1)
aura_text_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*9) + (47)) * -1)
useglow_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*10) + (47)) * -1)
iscooldown_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*11) + (47)) * -1)
icon_size_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*12) + (47)) * -1)
aura_addon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*17) + (60)) * -1)
weakauras_folder_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*18) + (60)) * -1)
weakauras_newgroup_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*19) + (60)) * -1)
aura_addon_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*17) + (60)) * -1)
weakauras_folder_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*18) + (60)) * -1)
weakauras_newgroup_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*19) + (60)) * -1)
create_button:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
cancel_button:SetPoint ("left", create_button, "right", 20, 0)
create_button:SetPoint("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
cancel_button:SetPoint("left", create_button, "right", 20, 0)
function f:UpdateLabels()
@@ -2642,7 +2642,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.StackSlider:Enable()
f.StackSlider.tooltip = "Minimum amount of stacks to trigger the aura."
f.StackSlider:SetValue (0)
f.StackSlider:SetValue(0)
f.SpellName:Enable()
f.UseSpellId:Enable()
f.AuraSpellId:Enable()
@@ -2654,41 +2654,41 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.IconButton:Enable()
f.AuraOnDropdown:Enable()
f.AuraText:Enable()
f.AuraText:SetText ("")
f.AuraText:SetText("")
aura_text_label.text = "Aura Text: "
f.UseGlow:Enable()
f.IsCooldown:Enable()
if (aura_type == "icon") then
aura_text_label:SetText ("Icon Text: ")
icon_size_label:SetText ("Width/Height: ")
f.IconSizeSlider:SetValue (64)
aura_text_label:SetText("Icon Text: ")
icon_size_label:SetText("Width/Height: ")
f.IconSizeSlider:SetValue(64)
elseif (aura_type == "text") then
aura_text_label:SetText ("Text: ")
icon_size_label:SetText ("Font Size: ")
f.IconSizeSlider:SetValue (12)
aura_text_label:SetText("Text: ")
icon_size_label:SetText("Font Size: ")
f.IconSizeSlider:SetValue(12)
f.IsCooldown:Disable()
elseif (aura_type == "aurabar") then
aura_text_label:SetText ("Left Text: ")
icon_size_label:SetText ("Bar Width: ")
f.IconSizeSlider:SetValue (250)
aura_text_label:SetText("Left Text: ")
icon_size_label:SetText("Bar Width: ")
f.IconSizeSlider:SetValue(250)
f.IsCooldown:Disable()
end
if (trigger >= 1 and trigger <= 19) then --buff and debuff
stack_label:SetText ("Trigger Stack Size: ")
stack_label:SetText("Trigger Stack Size: ")
elseif (trigger >= 20 and trigger <= 29) then --cast end cast start
stack_label:SetText ("Cast Duration: ")
f.StackSlider:SetValue (2)
stack_label:SetText("Cast Duration: ")
f.StackSlider:SetValue(2)
elseif (trigger >= 30 and trigger <= 39) then --boss mods
stack_label:SetText ("Trigger Remaining Time:")
f.StackSlider:SetValue (4)
stack_label:SetText("Trigger Remaining Time:")
f.StackSlider:SetValue(4)
f.StackSlider.tooltip = "Will trigger when the bar remaining time reach this value."
f.IconSizeSlider:SetValue (64)
f.IconSizeSlider:SetValue(64)
f.SpellName:Disable()
f.UseSpellId:Disable()
@@ -2704,19 +2704,19 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.SaySomething:Disable()
f.IconButton:Disable()
f.UseGlow:Disable()
icon_size_label:SetText ("Text Size: ")
f.IconSizeSlider:SetValue (11)
icon_size_label:SetText("Text Size: ")
f.IconSizeSlider:SetValue(11)
if (trigger == 41) then
f.AuraText:SetText ("=Not Interrupted!=")
f.AuraText:SetText("=Not Interrupted!=")
aura_text_label.text = "Not Interrupted: "
elseif (trigger == 42) then
f.AuraText:SetText (DetailsAuraPanel.name.text:gsub ("%(d!%)", "") .. "Dispells")
f.AuraText:SetText(DetailsAuraPanel.name.text:gsub ("%(d!%)", "") .. "Dispells")
aura_text_label.text = "Title Text: "
end
end
if (DetailsAuraPanel.other_values and DetailsAuraPanel.other_values.text) then
DetailsAuraPanel.AuraText:SetText (DetailsAuraPanel.other_values.text)
DetailsAuraPanel.AuraText:SetText(DetailsAuraPanel.other_values.text)
end
end
@@ -2732,10 +2732,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
DetailsAuraPanel.WeakaurasFolderDropdown:Refresh()
if (encounterid) then
DetailsAuraPanel.WeakaurasFolderDropdown:Select ("Details! Aura Group")
DetailsAuraPanel.IconSizeSlider:SetValue (128)
DetailsAuraPanel.IconSizeSlider:SetValue(128)
else
DetailsAuraPanel.WeakaurasFolderDropdown:Select (1, true)
DetailsAuraPanel.IconSizeSlider:SetValue (64)
DetailsAuraPanel.IconSizeSlider:SetValue(64)
end
if (DetailsAuraPanel.other_values.dbm_timer_id or DetailsAuraPanel.other_values.bw_timer_id) then
@@ -2743,7 +2743,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
if (DetailsAuraPanel.other_values.text_size) then
DetailsAuraPanel.IconSizeSlider:SetValue (DetailsAuraPanel.other_values.text_size)
DetailsAuraPanel.IconSizeSlider:SetValue(DetailsAuraPanel.other_values.text_size)
end
spellname = spellname or ""
@@ -2755,12 +2755,12 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
DetailsAuraPanel.UseGlow.glow_test.animIn:Stop()
DetailsAuraPanel.UseGlow.glow_test.animOut:Play()
DetailsAuraPanel.UseGlow:SetValue (false)
DetailsAuraPanel.UseGlow:SetValue(false)
DetailsAuraPanel.StackSlider:SetValue (0)
DetailsAuraPanel.StackSlider:SetValue(0)
DetailsAuraPanel.SoundEffectDropdown:Select (1, true)
DetailsAuraPanel.AuraText:SetText (DetailsAuraPanel.other_values.text or "")
DetailsAuraPanel.SaySomething:SetText ("")
DetailsAuraPanel.AuraText:SetText(DetailsAuraPanel.other_values.text or "")
DetailsAuraPanel.SaySomething:SetText("")
if (triggertype and type (triggertype) == "number") then
DetailsAuraPanel.AuraOnDropdown:Select (triggertype, true)
+464 -464
View File
File diff suppressed because it is too large Load Diff