- Battle for Dazaralor update.

- Fixed rogue spec icons.
- Some visual improvements.
- Framework update.
This commit is contained in:
Tercioo
2019-01-20 00:22:22 -02:00
parent b198c62489
commit 0c486a24a2
32 changed files with 3069 additions and 248 deletions
+12
View File
@@ -876,6 +876,9 @@ local ButtonMetaFunctions = _G [DF.GlobalWidgetControlNames ["button"]]
local x, y = GetCursorPosition()
x = _math_floor (x)
y = _math_floor (y)
button.mouse_down = button.mouse_down or 0 --avoid issues when the button was pressed while disabled and release when enabled
if (
(x == button.x and y == button.y) or
(button.mouse_down+0.5 > GetTime() and button:IsMouseOver())
@@ -892,6 +895,15 @@ local ButtonMetaFunctions = _G [DF.GlobalWidgetControlNames ["button"]]
function ButtonMetaFunctions:SetTemplate (template)
if (type (template) == "string") then
template = DF:GetTemplate ("button", template)
end
if (not template) then
DF:Error ("template not found")
return
end
if (template.width) then
self:SetWidth (template.width)
end
+12 -9
View File
@@ -1652,9 +1652,9 @@ function DF:CreateCoolTip()
if (CoolTip.Type == 2) then --> with bars
if (CoolTip.OptionsTable.MinWidth) then
local w = frame1.w + 34
frame1:SetWidth (math.max (w, CoolTip.OptionsTable.MinWidth))
PixelUtil.SetWidth (frame1, math.max (w, CoolTip.OptionsTable.MinWidth))
else
frame1:SetWidth (frame1.w + 34)
PixelUtil.SetWidth (frame1, frame1.w + 34)
end
else
--> width stability check
@@ -1666,22 +1666,24 @@ function DF:CreateCoolTip()
end
if (CoolTip.OptionsTable.MinWidth) then
frame1:SetWidth (math.max (width, CoolTip.OptionsTable.MinWidth))
PixelUtil.SetWidth (frame1, math.max (width, CoolTip.OptionsTable.MinWidth))
else
frame1:SetWidth (width)
PixelUtil.SetWidth (frame1, width)
end
end
end
if (CoolTip.OptionsTable.FixedHeight) then
frame1:SetHeight (CoolTip.OptionsTable.FixedHeight)
PixelUtil.SetHeight (frame1, CoolTip.OptionsTable.FixedHeight)
else
if (CoolTip.OptionsTable.AlignAsBlizzTooltip) then
frame1:SetHeight ( ((temp-10) * -1) + (CoolTip.OptionsTable.AlignAsBlizzTooltipFrameHeightOffset or 0))
PixelUtil.SetHeight (frame1, ((temp-10) * -1) + (CoolTip.OptionsTable.AlignAsBlizzTooltipFrameHeightOffset or 0))
elseif (CoolTip.OptionsTable.IgnoreButtonAutoHeight) then
frame1:SetHeight ( (temp+spacing) * -1)
PixelUtil.SetHeight (frame1, (temp+spacing) * -1)
else
frame1:SetHeight ( _math_max ( (frame1.hHeight * CoolTip.Indexes) + 8 + ((CoolTip.OptionsTable.ButtonsYMod or 0)*-1), 22 ))
PixelUtil.SetHeight (frame1, _math_max ( (frame1.hHeight * CoolTip.Indexes) + 8 + ((CoolTip.OptionsTable.ButtonsYMod or 0)*-1), 22 ))
end
end
@@ -1922,7 +1924,8 @@ function DF:CreateCoolTip()
local anchor = CoolTip.OptionsTable.Anchor or CoolTip.Host
frame1:SetPoint (CoolTip.OptionsTable.MyAnchor, anchor, CoolTip.OptionsTable.RelativeAnchor, 0 + moveX + CoolTip.OptionsTable.WidthAnchorMod, 10 + CoolTip.OptionsTable.HeightAnchorMod + moveY)
--frame1:SetPoint (CoolTip.OptionsTable.MyAnchor, anchor, CoolTip.OptionsTable.RelativeAnchor, 0 + moveX + CoolTip.OptionsTable.WidthAnchorMod, 10 + CoolTip.OptionsTable.HeightAnchorMod + moveY)
PixelUtil.SetPoint (frame1, CoolTip.OptionsTable.MyAnchor, anchor, CoolTip.OptionsTable.RelativeAnchor, 0 + moveX + CoolTip.OptionsTable.WidthAnchorMod, 10 + CoolTip.OptionsTable.HeightAnchorMod + moveY)
if (not x_mod) then
--> check if cooltip is out of screen bounds
+147 -63
View File
@@ -1,5 +1,5 @@
local dversion = 126
local dversion = 131
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -391,6 +391,17 @@ function DF:SetFontColor (fontString, r, g, b, a)
fontString:SetTextColor (r, g, b, a)
end
function DF:SetFontShadow (fontString, r, g, b, a, x, y)
r, g, b, a = DF:ParseColors (r, g, b, a)
fontString:SetShadowColor (r, g, b, a)
local offSetX, offSetY = fontString:GetShadowOffset()
x = x or offSetX
y = y or offSetY
fontString:SetShadowOffset (x, y)
end
function DF:AddClassColorToText (text, class)
if (type (class) ~= "string") then
return DF:RemoveRealName (text)
@@ -705,6 +716,33 @@ end
return true
end
local colorTableMixin = {
GetColor = function (self)
return self.r, self.g, self.b, self.a
end,
SetColor = function (self, r, g, b, a)
r, g, b, a = DF:ParseColors (r, g, b, a)
self.r = r or self.r
self.g = g or self.g
self.b = b or self.b
self.a = a or self.a
end,
IsColorTable = true,
}
function DF:CreateColorTable (r, g, b, a)
local t = {
r = r or 1,
g = g or 1,
b = b or 1,
a = a or 1,
}
DF:Mixin (t, colorTableMixin)
return t
end
function DF:IsHtmlColor (color)
return DF.alias_text_colors [color]
@@ -713,8 +751,12 @@ end
local tn = tonumber
function DF:ParseColors (_arg1, _arg2, _arg3, _arg4)
if (_type (_arg1) == "table") then
if (not _arg1[1] and _arg1.r) then
if (_arg1.IsColorTable) then
return _arg1:GetColor()
elseif (not _arg1[1] and _arg1.r) then
_arg1, _arg2, _arg3, _arg4 = _arg1.r, _arg1.g, _arg1.b, _arg1.a
else
_arg1, _arg2, _arg3, _arg4 = _unpack (_arg1)
end
@@ -869,7 +911,7 @@ end
end
if (value_change_hook) then
slider:SetHook ("OnValueChanged", value_change_hook)
slider:SetHook ("OnValueChange", value_change_hook)
end
--> hook list
@@ -1483,6 +1525,10 @@ function DF:SetHook (hookType, func)
end
end
function DF:Error (errortext)
print ("|cFFFF2222Details! Framework Error|r:", errortext, self.GetName and self:GetName(), self.WidgetType, debugstack (2, 3, 0))
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> members
@@ -2116,16 +2162,16 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3)
parent.SetLayerVisibility = SetLayerVisibility
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("topleft", parent, "topleft", -1, 1)
border1:SetPoint ("bottomleft", parent, "bottomleft", -1, -1)
PixelUtil.SetPoint (border1, "topleft", parent, "topleft", -1, 1)
PixelUtil.SetPoint (border1, "bottomleft", parent, "bottomleft", -1, -1)
border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
local border2 = parent:CreateTexture (nil, "background")
border2:SetPoint ("topleft", parent, "topleft", -2, 2)
border2:SetPoint ("bottomleft", parent, "bottomleft", -2, -2)
PixelUtil.SetPoint (border2, "topleft", parent, "topleft", -2, 2)
PixelUtil.SetPoint (border2, "bottomleft", parent, "bottomleft", -2, -2)
border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
local border3 = parent:CreateTexture (nil, "background")
border3:SetPoint ("topleft", parent, "topleft", -3, 3)
border3:SetPoint ("bottomleft", parent, "bottomleft", -3, -3)
PixelUtil.SetPoint (border3, "topleft", parent, "topleft", -3, 3)
PixelUtil.SetPoint (border3, "bottomleft", parent, "bottomleft", -3, -3)
border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
tinsert (parent.Borders.Layer1, border1)
@@ -2133,16 +2179,16 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3)
tinsert (parent.Borders.Layer3, border3)
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("topleft", parent, "topleft", 0, 1)
border1:SetPoint ("topright", parent, "topright", 1, 1)
PixelUtil.SetPoint (border1, "topleft", parent, "topleft", 0, 1)
PixelUtil.SetPoint (border1, "topright", parent, "topright", 1, 1)
border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
local border2 = parent:CreateTexture (nil, "background")
border2:SetPoint ("topleft", parent, "topleft", -1, 2)
border2:SetPoint ("topright", parent, "topright", 2, 2)
PixelUtil.SetPoint (border2, "topleft", parent, "topleft", -1, 2)
PixelUtil.SetPoint (border2, "topright", parent, "topright", 2, 2)
border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
local border3 = parent:CreateTexture (nil, "background")
border3:SetPoint ("topleft", parent, "topleft", -2, 3)
border3:SetPoint ("topright", parent, "topright", 3, 3)
PixelUtil.SetPoint (border3, "topleft", parent, "topleft", -2, 3)
PixelUtil.SetPoint (border3, "topright", parent, "topright", 3, 3)
border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
tinsert (parent.Borders.Layer1, border1)
@@ -2150,16 +2196,16 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3)
tinsert (parent.Borders.Layer3, border3)
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("topright", parent, "topright", 1, 0)
border1:SetPoint ("bottomright", parent, "bottomright", 1, -1)
PixelUtil.SetPoint (border1, "topright", parent, "topright", 1, 0)
PixelUtil.SetPoint (border1, "bottomright", parent, "bottomright", 1, -1)
border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
local border2 = parent:CreateTexture (nil, "background")
border2:SetPoint ("topright", parent, "topright", 2, 1)
border2:SetPoint ("bottomright", parent, "bottomright", 2, -2)
PixelUtil.SetPoint (border2, "topright", parent, "topright", 2, 1)
PixelUtil.SetPoint (border2, "bottomright", parent, "bottomright", 2, -2)
border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
local border3 = parent:CreateTexture (nil, "background")
border3:SetPoint ("topright", parent, "topright", 3, 2)
border3:SetPoint ("bottomright", parent, "bottomright", 3, -3)
PixelUtil.SetPoint (border3, "topright", parent, "topright", 3, 2)
PixelUtil.SetPoint (border3, "bottomright", parent, "bottomright", 3, -3)
border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
tinsert (parent.Borders.Layer1, border1)
@@ -2167,16 +2213,16 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3)
tinsert (parent.Borders.Layer3, border3)
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("bottomleft", parent, "bottomleft", 0, -1)
border1:SetPoint ("bottomright", parent, "bottomright", 0, -1)
PixelUtil.SetPoint (border1, "bottomleft", parent, "bottomleft", 0, -1)
PixelUtil.SetPoint (border1, "bottomright", parent, "bottomright", 0, -1)
border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
local border2 = parent:CreateTexture (nil, "background")
border2:SetPoint ("bottomleft", parent, "bottomleft", -1, -2)
border2:SetPoint ("bottomright", parent, "bottomright", 1, -2)
PixelUtil.SetPoint (border2, "bottomleft", parent, "bottomleft", -1, -2)
PixelUtil.SetPoint (border2, "bottomright", parent, "bottomright", 1, -2)
border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
local border3 = parent:CreateTexture (nil, "background")
border3:SetPoint ("bottomleft", parent, "bottomleft", -2, -3)
border3:SetPoint ("bottomright", parent, "bottomright", 2, -3)
PixelUtil.SetPoint (border3, "bottomleft", parent, "bottomleft", -2, -3)
PixelUtil.SetPoint (border3, "bottomright", parent, "bottomright", 2, -3)
border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
tinsert (parent.Borders.Layer1, border1)
@@ -2185,6 +2231,9 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3)
end
function DF:CreateBorderSolid (parent, size)
end
function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, spread)
@@ -2201,24 +2250,28 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, spread
parent.SetBorderColor = SetBorderColor
parent.SetLayerVisibility = SetLayerVisibility
size = size or 1
local minPixels = 1
local spread = 0
--left
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("topleft", parent, "topleft", -1 + spread, 1 + (-spread))
border1:SetPoint ("bottomleft", parent, "bottomleft", -1 + spread, -1 + spread)
border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
border1:SetWidth (size)
PixelUtil.SetPoint (border1, "topleft", parent, "topleft", -1 + spread, 1 + (-spread), 0, 0)
PixelUtil.SetPoint (border1, "bottomleft", parent, "bottomleft", -1 + spread, -1 + spread, 0, 0)
PixelUtil.SetWidth (border1, size, minPixels)
local border2 = parent:CreateTexture (nil, "background")
border2:SetPoint ("topleft", parent, "topleft", -2 + spread, 2 + (-spread))
border2:SetPoint ("bottomleft", parent, "bottomleft", -2 + spread, -2 + spread)
PixelUtil.SetPoint (border2, "topleft", parent, "topleft", -2 + spread, 2 + (-spread))
PixelUtil.SetPoint (border2, "bottomleft", parent, "bottomleft", -2 + spread, -2 + spread)
border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
border2:SetWidth (size)
PixelUtil.SetWidth (border2, size, minPixels)
local border3 = parent:CreateTexture (nil, "background")
border3:SetPoint ("topleft", parent, "topleft", -3 + spread, 3 + (-spread))
border3:SetPoint ("bottomleft", parent, "bottomleft", -3 + spread, -3 + spread)
PixelUtil.SetPoint (border3, "topleft", parent, "topleft", -3 + spread, 3 + (-spread))
PixelUtil.SetPoint (border3, "bottomleft", parent, "bottomleft", -3 + spread, -3 + spread)
border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
border3:SetWidth (size)
PixelUtil.SetWidth (border3, size, minPixels)
tinsert (parent.Borders.Layer1, border1)
tinsert (parent.Borders.Layer2, border2)
@@ -2226,22 +2279,22 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, spread
--top
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("topleft", parent, "topleft", 0 + spread, 1 + (-spread))
border1:SetPoint ("topright", parent, "topright", 1 + (-spread), 1 + (-spread))
PixelUtil.SetPoint (border1, "topleft", parent, "topleft", 0 + spread, 1 + (-spread))
PixelUtil.SetPoint (border1, "topright", parent, "topright", 1 + (-spread), 1 + (-spread))
border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
border1:SetHeight (size)
PixelUtil.SetHeight (border1, size, minPixels)
local border2 = parent:CreateTexture (nil, "background")
border2:SetPoint ("topleft", parent, "topleft", -1 + spread, 2 + (-spread))
border2:SetPoint ("topright", parent, "topright", 2 + (-spread), 2 + (-spread))
PixelUtil.SetPoint (border2, "topleft", parent, "topleft", -1 + spread, 2 + (-spread))
PixelUtil.SetPoint (border2, "topright", parent, "topright", 2 + (-spread), 2 + (-spread))
border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
border2:SetHeight (size)
PixelUtil.SetHeight (border2, size, minPixels)
local border3 = parent:CreateTexture (nil, "background")
border3:SetPoint ("topleft", parent, "topleft", -2 + spread, 3 + (-spread))
border3:SetPoint ("topright", parent, "topright", 3 + (-spread), 3 + (-spread))
PixelUtil.SetPoint (border3, "topleft", parent, "topleft", -2 + spread, 3 + (-spread))
PixelUtil.SetPoint (border3, "topright", parent, "topright", 3 + (-spread), 3 + (-spread))
border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
border3:SetHeight (size)
PixelUtil.SetHeight (border3, size, minPixels)
tinsert (parent.Borders.Layer1, border1)
tinsert (parent.Borders.Layer2, border2)
@@ -2249,44 +2302,44 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, spread
--right
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("topright", parent, "topright", 1 + (-spread), 0 + (-spread))
border1:SetPoint ("bottomright", parent, "bottomright", 1 + (-spread), -1 + spread)
PixelUtil.SetPoint (border1, "topright", parent, "topright", 1 + (-spread), 0 + (-spread))
PixelUtil.SetPoint (border1, "bottomright", parent, "bottomright", 1 + (-spread), -1 + spread)
border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
border1:SetWidth (size)
PixelUtil.SetWidth (border1, size, minPixels)
local border2 = parent:CreateTexture (nil, "background")
border2:SetPoint ("topright", parent, "topright", 2 + (-spread), 1 + (-spread))
border2:SetPoint ("bottomright", parent, "bottomright", 2 + (-spread), -2 + spread)
PixelUtil.SetPoint (border2, "topright", parent, "topright", 2 + (-spread), 1 + (-spread))
PixelUtil.SetPoint (border2, "bottomright", parent, "bottomright", 2 + (-spread), -2 + spread)
border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
border2:SetWidth (size)
PixelUtil.SetWidth (border2, size, minPixels)
local border3 = parent:CreateTexture (nil, "background")
border3:SetPoint ("topright", parent, "topright", 3 + (-spread), 2 + (-spread))
border3:SetPoint ("bottomright", parent, "bottomright", 3 + (-spread), -3 + spread)
PixelUtil.SetPoint (border3, "topright", parent, "topright", 3 + (-spread), 2 + (-spread))
PixelUtil.SetPoint (border3, "bottomright", parent, "bottomright", 3 + (-spread), -3 + spread)
border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
border3:SetWidth (size)
PixelUtil.SetWidth (border3, size, minPixels)
tinsert (parent.Borders.Layer1, border1)
tinsert (parent.Borders.Layer2, border2)
tinsert (parent.Borders.Layer3, border3)
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("bottomleft", parent, "bottomleft", 0 + spread, -1 + spread)
border1:SetPoint ("bottomright", parent, "bottomright", 0 + (-spread), -1 + spread)
PixelUtil.SetPoint (border1, "bottomleft", parent, "bottomleft", 0 + spread, -1 + spread)
PixelUtil.SetPoint (border1, "bottomright", parent, "bottomright", 0 + (-spread), -1 + spread)
border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
border1:SetHeight (size)
PixelUtil.SetHeight (border1, size, minPixels)
local border2 = parent:CreateTexture (nil, "background")
border2:SetPoint ("bottomleft", parent, "bottomleft", -1 + spread, -2 + spread)
border2:SetPoint ("bottomright", parent, "bottomright", 1 + (-spread), -2 + spread)
PixelUtil.SetPoint (border2, "bottomleft", parent, "bottomleft", -1 + spread, -2 + spread)
PixelUtil.SetPoint (border2, "bottomright", parent, "bottomright", 1 + (-spread), -2 + spread)
border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
border2:SetHeight (size)
PixelUtil.SetHeight (border2, size, minPixels)
local border3 = parent:CreateTexture (nil, "background")
border3:SetPoint ("bottomleft", parent, "bottomleft", -2 + spread, -3 + spread)
border3:SetPoint ("bottomright", parent, "bottomright", 2 + (-spread), -3 + spread)
PixelUtil.SetPoint (border3, "bottomleft", parent, "bottomleft", -2 + spread, -3 + spread)
PixelUtil.SetPoint (border3, "bottomright", parent, "bottomright", 2 + (-spread), -3 + spread)
border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
border3:SetHeight (size)
PixelUtil.SetHeight (border3, size, minPixels)
tinsert (parent.Borders.Layer1, border1)
tinsert (parent.Borders.Layer2, border2)
@@ -2712,5 +2765,36 @@ function DF:GetCLEncounterIDs()
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> debug
DF.DebugMixin = {
debug = true,
CheckPoint = function (self, checkPointName, ...)
print (self:GetName(), checkPointName, ...)
end,
CheckVisibilityState = function (self, widget)
self = widget or self
local width, height = self:GetSize()
width = floor (width)
height = floor (height)
local numPoints = self:GetNumPoints()
print ("shown:", self:IsShown(), "visible:", self:IsVisible(), "alpha:", self:GetAlpha(), "size:", width, height, "points:", numPoints)
end,
CheckStack = function (self)
local stack = debugstack()
Details:Dump (stack)
end,
}
--doo elsee
--was doing double loops due to not enought height
+2237 -48
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -729,6 +729,8 @@ local DFSliderMetaFunctions = _G [DF.GlobalWidgetControlNames ["slider"]]
table_remove (slider.MyObject.previous_value, 4)
local capsule = slider.MyObject
--some plugins registered OnValueChanged and others with OnValueChange
local kill = capsule:RunHooksForWidget ("OnValueChanged", slider, capsule.FixedValue, amt, capsule)
if (kill) then
return
@@ -736,7 +738,7 @@ local DFSliderMetaFunctions = _G [DF.GlobalWidgetControlNames ["slider"]]
local kill = capsule:RunHooksForWidget ("OnValueChange", slider, capsule.FixedValue, amt, capsule)
if (kill) then
return
end
end
if (slider.MyObject.OnValueChanged) then
slider.MyObject.OnValueChanged (slider, slider.MyObject.FixedValue, amt)
@@ -752,6 +754,7 @@ local DFSliderMetaFunctions = _G [DF.GlobalWidgetControlNames ["slider"]]
slider.amt:SetText (math.floor (amt))
end
slider.MyObject.ivalue = amt
end
------------------------------------------------------------------------------------------------------------
+53 -19
View File
File diff suppressed because one or more lines are too long
+12 -12
View File
@@ -483,16 +483,16 @@
--
--> plugins menu title bar
local titlebar_plugins = CreateFrame ("frame", nil, menuBackground)
titlebar_plugins:SetPoint ("topleft", menuBackground, "topleft", 2, -3)
titlebar_plugins:SetPoint ("topright", menuBackground, "topright", -2, -3)
PixelUtil.SetPoint (titlebar_plugins, "topleft", menuBackground, "topleft", 2, -3)
PixelUtil.SetPoint (titlebar_plugins, "topright", menuBackground, "topright", -2, -3)
titlebar_plugins:SetHeight (f.TitleHeight)
titlebar_plugins:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
titlebar_plugins:SetBackdropColor (.5, .5, .5, 1)
titlebar_plugins:SetBackdropBorderColor (0, 0, 0, 1)
--> title
local titleLabel = _detalhes.gump:NewLabel (titlebar_plugins, titlebar_plugins, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
titleLabel:SetPoint ("center", titlebar_plugins , "center")
titleLabel:SetPoint ("top", titlebar_plugins , "top", 0, -5)
PixelUtil.SetPoint (titleLabel, "center", titlebar_plugins , "center", 0, 0)
PixelUtil.SetPoint (titleLabel, "top", titlebar_plugins , "top", 0, -5)
--> plugins menu title bar
local titlebar_tools = CreateFrame ("frame", nil, menuBackground)
@@ -502,8 +502,8 @@
titlebar_tools:SetBackdropBorderColor (0, 0, 0, 1)
--> title
local titleLabel = _detalhes.gump:NewLabel (titlebar_tools, titlebar_tools, nil, "titulo", "Tools", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
titleLabel:SetPoint ("center", titlebar_tools , "center")
titleLabel:SetPoint ("top", titlebar_tools , "top", 0, -5)
PixelUtil.SetPoint (titleLabel, "center", titlebar_tools , "center", 0, 0)
PixelUtil.SetPoint (titleLabel, "top", titlebar_tools , "top", 0, -5)
--> scripts
f:SetScript ("OnShow", function()
@@ -628,7 +628,7 @@
--frame:SetScript ("OnHide", on_hide)
frame:HookScript ("OnHide", on_hide)
frame:ClearAllPoints()
frame:SetPoint ("topleft", f, "topleft", 0, 0)
PixelUtil.SetPoint (frame, "topleft", f, "topleft", 0, 0)
frame:Show()
end
@@ -666,7 +666,7 @@
local addingTools = false
for index, button in ipairs (f.MenuButtons) do
button:ClearAllPoints()
button:SetPoint ("center", menuBackground, "center")
PixelUtil.SetPoint (button, "center", menuBackground, "center", 0, 0)
if (button.IsUtility) then
--> add -20 to add a gap between plugins and utilities
@@ -674,13 +674,13 @@
if (not addingTools) then
--> add the header
addingTools = true
titlebar_tools:SetPoint ("topleft", menuBackground, "topleft", 2, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 20)
titlebar_tools:SetPoint ("topright", menuBackground, "topright", -2, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 20)
PixelUtil.SetPoint (titlebar_tools, "topleft", menuBackground, "topleft", 2, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 20)
PixelUtil.SetPoint (titlebar_tools, "topright", menuBackground, "topright", -2, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 20)
end
button:SetPoint ("top", menuBackground, "top", 0, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 40)
PixelUtil.SetPoint (button, "top", menuBackground, "top", 0, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 40)
else
button:SetPoint ("top", menuBackground, "top", 0, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index)
PixelUtil.SetPoint (button, "top", menuBackground, "top", 0, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index)
end
end
+206
View File
@@ -4860,6 +4860,212 @@ function _detalhes:OpenPlayerDetails (window)
end
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> extra buttons at the death options (release, death recap)
local detailsOnDeathMenu = CreateFrame ("frame", "DetailsOnDeathMenu", UIParent)
detailsOnDeathMenu:SetHeight (30)
detailsOnDeathMenu.Debug = false
detailsOnDeathMenu:RegisterEvent ("PLAYER_REGEN_ENABLED")
detailsOnDeathMenu:RegisterEvent ("ENCOUNTER_END")
DetailsFramework:ApplyStandardBackdrop (detailsOnDeathMenu)
detailsOnDeathMenu:SetAlpha (0.75)
--disable text
detailsOnDeathMenu.disableLabel = _detalhes.gump:CreateLabel (detailsOnDeathMenu, "you can disable this at /details > Raid Tools", 9)
detailsOnDeathMenu.warningLabel = _detalhes.gump:CreateLabel (detailsOnDeathMenu, "", 11)
detailsOnDeathMenu.warningLabel.textcolor = "red"
detailsOnDeathMenu.warningLabel:SetPoint ("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 2)
detailsOnDeathMenu.warningLabel:Hide()
detailsOnDeathMenu:SetScript ("OnEvent", function (self, event, ...)
if (event == "ENCOUNTER_END") then --event == "PLAYER_REGEN_ENABLED" or
print ("encounter ended")
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
end
end)
function detailsOnDeathMenu.OpenEncounterBreakdown()
if (not _detalhes:GetPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")) then
detailsOnDeathMenu.warningLabel.text = "Encounter Breakdown plugin is disabled! Please enable it in the Addon Control Panel."
detailsOnDeathMenu.warningLabel:Show()
C_Timer.After (5, function()
detailsOnDeathMenu.warningLabel:Hide()
end)
end
Details:OpenPlugin ("Encounter Breakdown")
end
function detailsOnDeathMenu.OpenPlayerEndurance()
if (not _detalhes:GetPlugin ("DETAILS_PLUGIN_DEATH_GRAPHICS")) then
detailsOnDeathMenu.warningLabel.text = "Advanced Death Logs plugin is disabled! Please enable it (or download) in the Addon Control Panel."
detailsOnDeathMenu.warningLabel:Show()
C_Timer.After (5, function()
detailsOnDeathMenu.warningLabel:Hide()
end)
end
DetailsPluginContainerWindow.OnMenuClick (nil, nil, "DETAILS_PLUGIN_DEATH_GRAPHICS", true)
C_Timer.After (0, function()
local a = Details_DeathGraphsModeEnduranceButton and Details_DeathGraphsModeEnduranceButton.MyObject:Click()
end)
end
function detailsOnDeathMenu.OpenPlayerSpells()
local window1 = Details:GetWindow (1)
local window2 = Details:GetWindow (2)
local window3 = Details:GetWindow (3)
local window4 = Details:GetWindow (4)
local assignedRole = UnitGroupRolesAssigned ("player")
if (assignedRole == "HEALER") then
if (window1 and window1:GetDisplay() == 2) then
Details:OpenPlayerDetails(1)
elseif (window2 and window2:GetDisplay() == 2) then
Details:OpenPlayerDetails(2)
elseif (window3 and window3:GetDisplay() == 2) then
Details:OpenPlayerDetails(3)
elseif (window4 and window4:GetDisplay() == 2) then
Details:OpenPlayerDetails(4)
else
Details:OpenPlayerDetails (1)
end
else
if (window1 and window1:GetDisplay() == 1) then
Details:OpenPlayerDetails(1)
elseif (window2 and window2:GetDisplay() == 1) then
Details:OpenPlayerDetails(2)
elseif (window3 and window3:GetDisplay() == 1) then
Details:OpenPlayerDetails(3)
elseif (window4 and window4:GetDisplay() == 1) then
Details:OpenPlayerDetails(4)
else
Details:OpenPlayerDetails (1)
end
end
end
--encounter breakdown button
detailsOnDeathMenu.breakdownButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenEncounterBreakdown, 120, 20, "Encounter Breakdown", "breakdownButton")
detailsOnDeathMenu.breakdownButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.breakdownButton:SetPoint ("topleft", detailsOnDeathMenu, "topleft", 5, -5)
detailsOnDeathMenu.breakdownButton:Hide()
--player endurance button
detailsOnDeathMenu.enduranceButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton")
detailsOnDeathMenu.enduranceButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.enduranceButton:SetPoint ("topleft", detailsOnDeathMenu.breakdownButton, "topright", 2, 0)
detailsOnDeathMenu.enduranceButton:Hide()
--spells
detailsOnDeathMenu.spellsButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton")
detailsOnDeathMenu.spellsButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.spellsButton:SetPoint ("topleft", detailsOnDeathMenu.enduranceButton, "topright", 2, 0)
detailsOnDeathMenu.spellsButton:Hide()
function detailsOnDeathMenu.CanShowPanel()
if (StaticPopup_Visible ("DEATH")) then
if (not _detalhes.on_death_menu) then
return
end
if (detailsOnDeathMenu.Debug) then
return true
end
--> check if the player just wiped in an encounter
if (IsInRaid()) then
local isInInstance = IsInInstance()
if (isInInstance) then
--> check if all players in the raid are out of combat
for i = 1, GetNumGroupMembers() do
if (UnitAffectingCombat ("raid" .. i)) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
return false
end
end
if (_detalhes.in_combat) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
return false
end
return true
end
end
end
end
function detailsOnDeathMenu.ShowPanel()
if (not detailsOnDeathMenu.CanShowPanel()) then
return
end
if (ElvUI) then
detailsOnDeathMenu:SetPoint ("topleft", StaticPopup1, "bottomleft", 0, -1)
detailsOnDeathMenu:SetPoint ("topright", StaticPopup1, "bottomright", 0, -1)
else
detailsOnDeathMenu:SetPoint ("topleft", StaticPopup1, "bottomleft", 4, 2)
detailsOnDeathMenu:SetPoint ("topright", StaticPopup1, "bottomright", -4, 2)
end
detailsOnDeathMenu.breakdownButton:Show()
detailsOnDeathMenu.enduranceButton:Show()
detailsOnDeathMenu.spellsButton:Show()
detailsOnDeathMenu:Show()
detailsOnDeathMenu:SetHeight (30)
if (not _detalhes:GetTutorialCVar ("DISABLE_ONDEATH_PANEL")) then
detailsOnDeathMenu.disableLabel:Show()
detailsOnDeathMenu.disableLabel:SetPoint ("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 1)
detailsOnDeathMenu.disableLabel.color = "gray"
detailsOnDeathMenu.disableLabel.alpha = 0.5
detailsOnDeathMenu:SetHeight (detailsOnDeathMenu:GetHeight() + 10)
if (math.random (1, 3) == 3) then
_detalhes:SetTutorialCVar ("DISABLE_ONDEATH_PANEL", true)
end
end
end
hooksecurefunc ("StaticPopup_Show", function (which, text_arg1, text_arg2, data, insertedFrame)
--print (which, text_arg1, text_arg2, data, insertedFrame)
--print ("popup Show:", which)
if (which == "DEATH") then
--StaticPopup1
if (detailsOnDeathMenu.Debug) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
end
end
end)
hooksecurefunc ("StaticPopup_Hide", function (which, data)
-- if (which and which:find ("EQUIP")) then
-- return
-- end
--print ("popup Hide:", which)
if (which == "DEATH") then
detailsOnDeathMenu:Hide()
end
end)
--endd
+3
View File
@@ -1246,6 +1246,9 @@ local default_player_data = {
last_difficulty = 15,
last_raid = "",
},
--> death panel buttons
on_death_menu = true,
}
_detalhes.default_player_data = default_player_data
+188
View File
@@ -2,6 +2,194 @@
--> install data for raiding tiers
do
--> data for Crucible of Storms (BFA tier 1)
local INSTANCE_EJID = 1177
local INSTANCE_MAPID = 0 --TBD
local HDIMAGESPATH = "Details\\images\\raid"
local HDFILEPREFIX = "CrucibleRaid"
local LOADINGSCREEN_FILE, LOADINGSCREEN_COORDS = "LoadingScreen_Seapriestraid_wide_BattleforAzeroth", {0, 1, 285/1024, 875/1024}
local EJ_LOREBG = "UI-EJ-LOREBG-CrucibleOfStorms"
local PORTRAIT_LIST = {
2497795, --Zaxasj the Speaker - The Restless Cabal
2497794, --Uu'nat - Uu'nat, Harbinger of the Void
}
local ENCOUNTER_ID_CL = {
2269, 2273,
[2269] = 1, --The Restless Cabal
[2273] = 2, --Uu'nat, Harbinger of the Void
}
local ENCOUNTER_ID_EJ = {
2328, 2332,
[2328] = 1, --The Restless Cabal
[2332] = 2, --Uu'nat, Harbinger of the Void
}
--> install the raid
C_Timer.After (10, function()
--load encounter journal
EJ_SelectInstance (INSTANCE_EJID)
local InstanceName = EJ_GetInstanceInfo (INSTANCE_EJID)
--build the boss name list
local BOSSNAMES = {}
local ENCOUNTERS = {}
for i = 1, #PORTRAIT_LIST do
local bossName = EJ_GetEncounterInfoByIndex (i, INSTANCE_EJID)
if (bossName) then
tinsert (BOSSNAMES, bossName)
local encounterTable = {
boss = bossName,
--portrait = "Interface\\EncounterJournal\\" .. PORTRAIT_LIST [i],
portrait = PORTRAIT_LIST [i],
}
tinsert (ENCOUNTERS, encounterTable)
else
break
end
end
_detalhes:InstallEncounter ({
id = INSTANCE_MAPID, --map id
ej_id = INSTANCE_EJID, --encounter journal id
name = InstanceName,
icons = "Interface\\AddOns\\" .. HDIMAGESPATH .. "\\" .. HDFILEPREFIX .. "_BossFaces",
icon = "Interface\\AddOns\\" .. HDIMAGESPATH .. "\\" .. HDFILEPREFIX .. "_Icon256x128",
is_raid = true,
backgroundFile = {file = "Interface\\Glues\\LOADINGSCREENS\\" .. LOADINGSCREEN_FILE, coords = LOADINGSCREEN_COORDS},
backgroundEJ = "Interface\\EncounterJournal\\" .. EJ_LOREBG,
encounter_ids = ENCOUNTER_ID_EJ,
encounter_ids2 = ENCOUNTER_ID_CL,
boss_names = BOSSNAMES,
encounters = ENCOUNTERS,
boss_ids = {
--npc ids
},
})
end)
end
do
--> data for Battle for Dazar'alor (BFA tier 1)
-- DazaralorRaid_BossFaces.tga --TBD
-- DazaralorRaid_Icon256x128.tga --TBD
local INSTANCE_EJID = 1176
local INSTANCE_MAPID = 2070
local HDIMAGESPATH = "Details\\images\\raid"
local HDFILEPREFIX = "DazaralorRaid"
local LOADINGSCREEN_FILE, LOADINGSCREEN_COORDS = "LoadScreen_ZuldazarRaid_Wide", {0, 1, 285/1024, 875/1024}
local EJ_LOREBG = "UI-EJ-LOREBG-BattleOfDazaralor"
local PORTRAIT_LIST = {
2497778, --Frida Ironbellows - Champion of the Light
2497783, --Grong - Grong, the Jungle Lord
2529383, --Manceroy Flamefist - Jadefire Masters
2497790, --Opulence - Opulence
2497779, --Pa'ku's Aspect - Conclave of the Chosen
2497784, --King Rastakhan - King Rastakhan
2497788, --High Tinker Mekkatorque - High Tinker Mekkatorque
2497786, --Laminaria - Stormwall Blockade
2497785, --Lady Jaina Proudmoore - Lady Jaina Proudmoore
}
local ENCOUNTER_ID_CL = {
2265, 2263, 2266, 2271, 2268, 2272, 2276, 2280, 2281,
[2265] = 1, --Champion of the Light
[2263] = 2, --Grong, the Jungle Lord
[2266] = 3, --Jadefire Masters
[2271] = 4, --Opulence
[2268] = 5, --Conclave of the Chosen
[2272] = 6, --King Rastakhan
[2276] = 7, --High Tinker Mekkatorque
[2280] = 8, --Stormwall Blockade
[2281] = 9, --Lady Jaina Proudmoore
}
local ENCOUNTER_ID_EJ = {
2333, 2325, 2341, 2342, 2330, 2335, 2334, 2337, 2343,
[2333] = 1, --Champion of the Light
[2325] = 2, --Grong, the Jungle Lord
[2341] = 3, --Jadefire Masters
[2342] = 4, --Opulence
[2330] = 5, --Conclave of the Chosen
[2335] = 6, --King Rastakhan
[2334] = 7, --High Tinker Mekkatorque
[2337] = 8, --Stormwall Blockade
[2343] = 9, --Lady Jaina Proudmoore
}
--> install the raid
C_Timer.After (10, function()
--load encounter journal
EJ_SelectInstance (INSTANCE_EJID)
local InstanceName = EJ_GetInstanceInfo (INSTANCE_EJID)
--build the boss name list
local BOSSNAMES = {}
local ENCOUNTERS = {}
for i = 1, #PORTRAIT_LIST do
local bossName = EJ_GetEncounterInfoByIndex (i, INSTANCE_EJID)
if (bossName) then
tinsert (BOSSNAMES, bossName)
local encounterTable = {
boss = bossName,
--portrait = "Interface\\EncounterJournal\\" .. PORTRAIT_LIST [i],
portrait = PORTRAIT_LIST [i],
}
tinsert (ENCOUNTERS, encounterTable)
else
break
end
end
_detalhes:InstallEncounter ({
id = INSTANCE_MAPID, --map id
ej_id = INSTANCE_EJID, --encounter journal id
name = InstanceName,
icons = "Interface\\AddOns\\" .. HDIMAGESPATH .. "\\" .. HDFILEPREFIX .. "_BossFaces",
icon = "Interface\\AddOns\\" .. HDIMAGESPATH .. "\\" .. HDFILEPREFIX .. "_Icon256x128",
is_raid = true,
backgroundFile = {file = "Interface\\Glues\\LOADINGSCREENS\\" .. LOADINGSCREEN_FILE, coords = LOADINGSCREEN_COORDS},
backgroundEJ = "Interface\\EncounterJournal\\" .. EJ_LOREBG,
encounter_ids = ENCOUNTER_ID_EJ,
encounter_ids2 = ENCOUNTER_ID_CL,
boss_names = BOSSNAMES,
encounters = ENCOUNTERS,
boss_ids = {
--npc ids
},
})
end)
end
do
--> data for Uldir (BFA tier 1)
+102 -75
View File
@@ -1785,6 +1785,14 @@ function gump:CriaJanelaInfo()
--> tabs:
--> tab default
local iconTableSummary = {
texture = [[Interface\AddOns\Details\images\icons]],
coords = {238/512, 255/512, 0, 18/512},
width = 16,
height = 16,
}
_detalhes:CreatePlayerDetailsTab ("Summary", Loc ["STRING_SPELLS"], --[1] tab name [2] localized name
function (tabOBject, playerObject) --[2] condition
if (playerObject) then
@@ -1799,7 +1807,8 @@ function gump:CriaJanelaInfo()
tab.frame:Hide()
end
end,
nil --[5] oncreate
nil, --[5] oncreate
iconTableSummary --icon table
)
--> search key: ~avoidance --> begining of avoidance tab
@@ -2498,6 +2507,14 @@ function gump:CriaJanelaInfo()
--]]
end
local iconTableAvoidance = {
texture = [[Interface\AddOns\Details\images\icons]],
--coords = {363/512, 381/512, 0/512, 17/512},
coords = {384/512, 402/512, 19/512, 38/512},
width = 16,
height = 16,
}
_detalhes:CreatePlayerDetailsTab ("Avoidance", Loc ["STRING_INFO_TAB_AVOIDANCE"], --[1] tab name [2] localized name
function (tabOBject, playerObject) --[2] condition
if (playerObject.isTank) then
@@ -2511,7 +2528,8 @@ function gump:CriaJanelaInfo()
nil, --[4] onclick
avoidance_create --[5] oncreate
avoidance_create, --[5] oncreate
iconTableAvoidance
)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -2744,6 +2762,13 @@ function gump:CriaJanelaInfo()
end
end
local iconTableAuras = {
texture = [[Interface\AddOns\Details\images\icons]],
coords = {257/512, 278/512, 0/512, 19/512},
width = 16,
height = 16,
}
_detalhes:CreatePlayerDetailsTab ("Auras", "Auras", --[1] tab name [2] localized name
function (tabOBject, playerObject) --[2] condition
return true
@@ -2753,7 +2778,8 @@ function gump:CriaJanelaInfo()
nil, --[4] onclick
auras_tab_create --[5] oncreate
auras_tab_create, --[5] oncreate
iconTableAuras --icon table
)
@@ -4665,6 +4691,13 @@ function gump:CriaJanelaInfo()
-- ~compare
local iconTableCompare = {
texture = [[Interface\AddOns\Details\images\icons]],
--coords = {363/512, 381/512, 0/512, 17/512},
coords = {383/512, 403/512, 0/512, 15/512},
width = 16,
height = 14,
}
_detalhes:CreatePlayerDetailsTab ("Compare", Loc ["STRING_INFO_TAB_COMPARISON"], --[1] tab name [2] localized name
function (tabOBject, playerObject) --[2] condition
@@ -4716,7 +4749,8 @@ function gump:CriaJanelaInfo()
nil, --[4] onclick
compare_create --[5] oncreate
compare_create, --[5] oncreate
iconTableCompare --icon table
)
-- ~tab ~tabs
@@ -4757,11 +4791,14 @@ function gump:CriaJanelaInfo()
tab:Show()
amt_positive = amt_positive + 1
--tab:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 490 - (94 * (amt_positive-1)), 1) --left to right
tab:ClearAllPoints()
tab:SetPoint ("bottomright", info, "topright", -17 - (94 * (amt_positive-1)), -74) --right to left
--get the button width
local buttonTemplate = gump:GetTemplate ("button", "DETAILS_TAB_BUTTON_TEMPLATE")
local buttonWidth = buttonTemplate.width + 1
PixelUtil.SetSize (tab, buttonTemplate.width, buttonTemplate.height)
PixelUtil.SetPoint (tab, "bottomright", info, "topright", -9 - (buttonWidth * (amt_positive-1)), -72)
tab:SetAlpha (0.8)
else
tab.frame:Hide()
@@ -4774,7 +4811,6 @@ function gump:CriaJanelaInfo()
end
_detalhes.player_details_tabs[1]:Click()
end
este_gump:SetScript ("OnHide", function (self)
@@ -4794,56 +4830,63 @@ end
_detalhes.player_details_tabs = {}
function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, fillfunction, onclick, oncreate)
function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, fillfunction, onclick, oncreate, iconSettings)
if (not tabname) then
tabname = "unnamed"
end
local index = #_detalhes.player_details_tabs
local newtab = CreateFrame ("button", "DetailsInfoWindowTab" .. index, info, "ChatTabTemplate")
newtab.textWidth = 90
--create a button for the tab
local newTabButton = gump:CreateButton (info, onclick, 20, 20)
newTabButton:SetTemplate ("DETAILS_TAB_BUTTON_TEMPLATE")
if (tabname == "Summary") then
newTabButton:SetTemplate ("DETAILS_TAB_BUTTONSELECTED_TEMPLATE")
end
newTabButton:SetText (localized_name)
newTabButton:SetFrameStrata ("HIGH")
newTabButton:SetFrameLevel (info:GetFrameLevel()+1)
newTabButton:Hide()
newtab:SetParent (info)
newtab:SetWidth (100)
newtab.middleTexture:SetWidth (70)
newTabButton.condition = condition
newTabButton.tabname = tabname
newTabButton.localized_name = localized_name
newTabButton.onclick = onclick
newTabButton.fillfunction = fillfunction
newTabButton.last_actor = {}
newtab:SetText (localized_name)
_G ["DetailsInfoWindowTab" .. index .. "Text"]:SetWidth (70)
newTabButton.frame = CreateFrame ("frame", "DetailsPDWTabFrame" .. tabname, UIParent)
newTabButton.frame:SetParent (info)
newTabButton.frame:SetFrameStrata ("HIGH")
newTabButton.frame:SetFrameLevel (info:GetFrameLevel()+5)
newTabButton.frame:EnableMouse (true)
newtab:SetFrameStrata ("HIGH")
newtab:SetFrameLevel (info:GetFrameLevel()+1)
newtab:Hide()
if (iconSettings) then
local texture = iconSettings.texture
local coords = iconSettings.coords
local width = iconSettings.width
local height = iconSettings.height
local overlay, textdistance, leftpadding, textheight, short_method --nil
newTabButton:SetIcon (texture, width, height, "overlay", coords, overlay, textdistance, leftpadding, textheight, short_method)
end
newtab.condition = condition
newtab.tabname = tabname
newtab.localized_name = localized_name
newtab.onclick = onclick
newtab.fillfunction = fillfunction
newtab.last_actor = {}
--> frame
newtab.frame = CreateFrame ("frame", "DetailsPDWTabFrame" .. tabname, UIParent)
newtab.frame:SetParent (info)
newtab.frame:SetFrameStrata ("HIGH")
newtab.frame:SetFrameLevel (info:GetFrameLevel()+5)
newtab.frame:EnableMouse (true)
if (newtab.fillfunction) then
newtab.frame:SetScript ("OnShow", function()
if (newtab.last_actor == info.jogador) then
if (newTabButton.fillfunction) then
newTabButton.frame:SetScript ("OnShow", function()
if (newTabButton.last_actor == info.jogador) then
return
end
newtab.last_actor = info.jogador
newtab:fillfunction (info.jogador, info.instancia.showing)
newTabButton.last_actor = info.jogador
newTabButton:fillfunction (info.jogador, info.instancia.showing)
end)
end
if (oncreate) then
oncreate (newtab, newtab.frame)
oncreate (newTabButton, newTabButton.frame)
end
newtab.frame:SetBackdrop({
newTabButton.frame:SetBackdrop({
edgeFile = [[Interface\Buttons\WHITE8X8]],
edgeSize = 1,
bgFile = [[Interface\AddOns\Details\images\background]],
@@ -4851,55 +4894,45 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
tile = true,
insets = {left = 0, right = 0, top = 0, bottom = 0}}
)
newtab.frame:SetBackdropColor (0, 0, 0, 0.3)
newtab.frame:SetBackdropBorderColor (.3, .3, .3, 0)
newtab.frame:SetPoint ("TOPLEFT", info.container_barras, "TOPLEFT", 0, 2)
newtab.frame:SetPoint ("bottomright", info, "bottomright", -3, 3)
newtab.frame:SetSize (569, 274)
newtab.frame:Hide()
newTabButton.frame:SetBackdropColor (0, 0, 0, 0.3)
newTabButton.frame:SetBackdropBorderColor (.3, .3, .3, 0)
newTabButton.frame:SetPoint ("TOPLEFT", info.container_barras, "TOPLEFT", 0, 2)
newTabButton.frame:SetPoint ("bottomright", info, "bottomright", -3, 3)
newTabButton.frame:SetSize (569, 274)
--> adicionar ao container
_detalhes.player_details_tabs [#_detalhes.player_details_tabs+1] = newtab
newTabButton.frame:Hide()
_detalhes.player_details_tabs [#_detalhes.player_details_tabs+1] = newTabButton
if (not onclick) then
--> hide all tabs
newtab:SetScript ("OnClick", function()
newTabButton:SetScript ("OnClick", function()
for _, tab in _ipairs (_detalhes.player_details_tabs) do
tab.frame:Hide()
tab.leftSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab.middleSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab.rightSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab:SetTemplate ("DETAILS_TAB_BUTTON_TEMPLATE")
end
newtab.leftSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.middleSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.rightSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.frame:Show()
newTabButton:SetTemplate ("DETAILS_TAB_BUTTONSELECTED_TEMPLATE")
newTabButton.frame:Show()
end)
else
--> custom
newtab:SetScript ("OnClick", function()
newTabButton:SetScript ("OnClick", function()
for _, tab in _ipairs (_detalhes.player_details_tabs) do
tab.frame:Hide()
tab.leftSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab.middleSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab.rightSelectedTexture:SetVertexColor (1, 1, 1, 1)
tab:SetTemplate ("DETAILS_TAB_BUTTON_TEMPLATE")
end
newtab.leftSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.middleSelectedTexture:SetVertexColor (1, .7, 0, 1)
newtab.rightSelectedTexture:SetVertexColor (1, .7, 0, 1)
newTabButton:SetTemplate ("DETAILS_TAB_BUTTONSELECTED_TEMPLATE")
onclick()
end)
end
newtab:SetScript ("PostClick", function (self)
CurrentTab = self.tabname
newTabButton:SetScript ("PostClick", function (self)
CurrentTab = self.tabname or self.MyObject.tabname
if (CurrentTab ~= "Summary") then
for _, widget in ipairs (SummaryWidgets) do
widget:Hide()
@@ -4911,12 +4944,6 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
end
end)
--> remove os scripts padroes
newtab:SetScript ("OnDoubleClick", nil)
newtab:SetScript ("OnEnter", nil)
newtab:SetScript ("OnLeave", nil)
newtab:SetScript ("OnDragStart", nil)
end
function _detalhes.janela_info:monta_relatorio (botao)
+14
View File
@@ -10888,6 +10888,19 @@ function window:CreateFrame11()
window:CreateLineBackground2 (frame11, "EnabledFirstHitSlider", "EnabledFirstHitLabel", Loc ["STRING_OPTIONS_RT_FIRST_HIT_DESC"])
--> death menu
g:NewLabel (frame11, _, "$parentShowDeathMenuLabel", "ShowDeathMenuLabel", "Show Death Menu", "GameFontHighlightLeft") --localize-me
g:NewSwitch (frame11, _, "$parentShowDeathMenuSlider", "ShowDeathMenuSlider", 60, 20, _, _, _detalhes.on_death_menu, nil, nil, nil, nil, options_switch_template)
frame11.ShowDeathMenuSlider:SetPoint ("left", frame11.ShowDeathMenuLabel, "right", 2)
frame11.ShowDeathMenuSlider:SetAsCheckBox()
frame11.ShowDeathMenuSlider.OnSwitch = function (_, _, value)
_detalhes.on_death_menu = value
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame11, "ShowDeathMenuSlider", "ShowDeathMenuLabel", "Show a panel below the Release / Death Recap panel with some shortcuts for Raid Leaders.") --localize-me
--> anchors
--announcers anchor
@@ -10934,6 +10947,7 @@ function window:CreateFrame11()
{"AnnouncersOther", 6, true},
{"EnabledPrePotLabel", 7},
{"EnabledFirstHitLabel", 8},
{"ShowDeathMenuLabel", 9},
}
window:arrange_menu (frame11, right_side, window.right_start_at, window.top_start_at)
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 490 KiB

@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details! 3D Model Viewer
## Notes: When the 3d models option is enabled, this tool is used to select which model will be used on the window's rows.
## DefaultState: Enabled
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details Storage
## Notes: Stores information for Details!
## DefaultState: Enabled
+1 -1
View File
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details Damage, the Game! (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details Dps Tuning (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -3,6 +3,13 @@ local Loc = AceLocale:GetLocale ("Details_EncounterDetails")
local Graphics = LibStub:GetLibrary("LibGraph-2.0")
local _
local isDebug = false
local function DebugMessage (...)
if (isDebug) then
print ("|cFFFFFF00EBreakDown|r:", ...)
end
end
--> Needed locals
local _GetTime = GetTime --> wow api local
local _UFC = UnitAffectingCombat --> wow api local
@@ -49,7 +56,7 @@ local sort_by_name = function (t1, t2) return t1.nome < t2.nome end
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
EncounterDetails.name = "Encounter Details"
EncounterDetails.name = "Encounter Breakdown"
EncounterDetails.debugmode = false
function EncounterDetails:FormatCooltipSettings()
@@ -390,7 +397,7 @@ local function CreatePluginFrames (data)
local alert = CreateFrame ("frame", "EncounterDetailsTutorialAlertButton1", EncounterDetails.ToolbarButton, "MicroButtonAlertTemplate")
alert:SetFrameLevel (302)
alert.label = "Click here (on the skull icon) to bring the Encounter Details panel"
alert.label = "Click here (on the skull icon) to bring the Encounter Breakdown panel"
alert.Text:SetSpacing (4)
alert:SetClampedToScreen (true)
MicroButtonAlert_SetText (alert, alert.label)
@@ -491,8 +498,19 @@ local function CreatePluginFrames (data)
end
EncounterDetailsFrame:HookScript ("OnShow", function()
C_Timer.After (0.1, function()
if (not EncounterDetails.LastOpenedTime or EncounterDetails.LastOpenedTime + 2 < GetTime()) then
if (_detalhes.AddOnStartTime and _detalhes.AddOnStartTime + 30 < GetTime()) then
EncounterDetails:OpenAndRefresh()
end
end
end)
end)
--> user clicked on button, need open or close window
function EncounterDetails:OpenWindow()
if (EncounterDetails.Frame:IsShown()) then
return EncounterDetails:CloseWindow()
end
@@ -1144,23 +1162,45 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local frame = EncounterDetailsFrame --alias
DebugMessage ("OpenAndRefresh() called")
EncounterDetails.LastOpenedTime = GetTime()
_G [frame:GetName().."SegmentsDropdown"].MyObject:Refresh()
if (segment) then
_combat_object = EncounterDetails:GetCombat (segment)
EncounterDetails._segment = segment
DebugMessage ("there's a segment to use:", segment, _combat_object, _combat_object and _combat_object.is_boss)
else
DebugMessage ("no segment has been passed, looping segments to find one.")
local historico = _detalhes.tabela_historico.tabelas
local foundABoss = false
for index, combate in ipairs (historico) do
if (combate.is_boss and combate.is_boss.index) then
_G [frame:GetName().."SegmentsDropdown"].MyObject:Select (index)
EncounterDetails._segment = index
_combat_object = combate
DebugMessage ("segment found: ", index, combate:GetCombatName(), combate.is_trash)
_G [frame:GetName().."SegmentsDropdown"].MyObject:Select (index, true)
foundABoss = index
break
end
end
if (not foundABoss) then
DebugMessage ("boss not found during the segment loop")
end
end
if (not _combat_object) then
EncounterDetails:Msg ("no combat found.")
DebugMessage ("_combat_object is nil, EXIT")
return
end
@@ -1181,16 +1221,32 @@ function EncounterDetails:OpenAndRefresh (_, segment)
end
if (not _combat_object.is_boss) then
for _, combat in _ipairs (EncounterDetails:GetCombatSegments()) do
DebugMessage ("_combat_object is not a boss, trying another loop in the segments")
local foundSegment
for index, combat in _ipairs (EncounterDetails:GetCombatSegments()) do
if (combat.is_boss and EncounterDetails:GetBossDetails (combat.is_boss.mapid, combat.is_boss.index)) then
_combat_object = combat
_G [frame:GetName().."SegmentsDropdown"].MyObject:Select (index, true)
DebugMessage ("found another segment during another loop", index, combat:GetCombatName(), combat.is_trash)
foundSegment = true
break
end
end
if (not foundSegment) then
DebugMessage ("boss not found during the second loop segment")
end
if (not _combat_object.is_boss) then
DebugMessage ("_combat_object still isn't a boss segment, trying to get the last segment shown.")
if (EncounterDetails.LastSegmentShown) then
_combat_object = EncounterDetails.LastSegmentShown
DebugMessage ("found the last segment shown, using it.")
else
DebugMessage ("the segment isn't a boss, EXIT.")
return
end
end
@@ -1198,6 +1254,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--> the segment is a boss
DebugMessage ("segment are OKAY, updating the panel")
boss_id = _combat_object.is_boss.index
map_id = _combat_object.is_boss.mapid
boss_info = _detalhes:GetBossDetails (_combat_object.is_boss.mapid, _combat_object.is_boss.index)
@@ -1,6 +1,6 @@
## Interface: 80000
## Title: Details Encounter (plugin)
## Notes: Plugin for Details
## Interface: 80100
## Title: Details!: Encounter Breakdown (plugin)
## Notes: Show detailed information about a boss encounter. Also provide damage per phase, graphic charts, easy weakauras creation.
## RequiredDeps: Details
## OptionalDeps: Ace3
## SavedVariablesPerCharacter: EncounterDetailsDB
+2 -2
View File
@@ -4,8 +4,8 @@ if (not Loc) then
return
end
Loc ["STRING_PLUGIN_NAME"] = "Encounter Details"
Loc ["STRING_WINDOW_TITLE"] = "Details! Encounter Info"
Loc ["STRING_PLUGIN_NAME"] = "Encounter Breakdown"
Loc ["STRING_WINDOW_TITLE"] = "Details! Encounter Breakdown"
Loc ["STRING_TOTAL_DAMAGE"] = "Total Damage"
Loc ["STRING_TOTAL_HEAL"] = "Total Heal"
Loc ["STRING_SHOW_ALL_DATA"] = "Show overall data"
+3 -3
View File
@@ -76,7 +76,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local build_options_panel = function()
local options_frame = EncounterDetails:CreatePluginOptionsFrame ("EncounterDetailsOptionsWindow", "Encounter Details Options", 2)
local options_frame = EncounterDetails:CreatePluginOptionsFrame ("EncounterDetailsOptionsWindow", "Encounter Breakdown Options", 2)
-- 1 = only when inside a raid map
-- 2 = only when in raid group
@@ -132,7 +132,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
type = "toggle",
get = function() return EncounterDetails.db.hide_on_combat end,
set = function (self, fixedparam, value) EncounterDetails.db.hide_on_combat = value end,
desc = "Encounter Details window automatically close when you enter in combat.",
desc = "Encounter Breakdown window automatically close when you enter in combat.",
name = "Hide on Combat"
},
{
@@ -2635,7 +2635,7 @@ end
BossFrame.MacroEditBox = DetailsFrameWork:CreateTextEntry (frame, function()end, 300, 20)
BossFrame.MacroEditBox:SetPoint ("left", options, "right", 10, 0)
BossFrame.MacroEditBox:SetAlpha (0.5)
BossFrame.MacroEditBox:SetText ("/run Details:OpenPlugin ('Encounter Details')")
BossFrame.MacroEditBox:SetText ("/run Details:OpenPlugin ('Encounter Breakdown')")
BossFrame.MacroEditBox:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
BossFrame.MacroEditBox:SetSize (360, 20)
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details Raid Check (plugin)
## Notes: Show a icon on Details title bar showing flask, food, pre-pots.
## RequiredDeps: Details
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details!: Streamer (plugin)
## Notes: Show which spells you are casting, viewers can see what are you doing and follow your steps.
## RequiredDeps: Details
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details TimeAttack (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseTimeAttack
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details Tiny Threat (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 80100
## Title: Details Vanguard (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseVanguard