Another round of polishing
This commit is contained in:
@@ -32,7 +32,11 @@ function breakdownWindowFrame.RegisterPluginButton(newPluginButton, newPluginObj
|
||||
newPluginButton.PluginAbsoluteName = newPluginAbsoluteName
|
||||
newPluginButton.PluginFrame = newPluginObject.Frame
|
||||
|
||||
newPluginButton:SetTemplate(detailsFramework:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
newPluginButton:SetTemplate("STANDARD_GRAY")
|
||||
|
||||
--get the fontstring for this especific button
|
||||
local fontString = _G[newPluginButton:GetName() .. "_Text"]
|
||||
detailsFramework:SetFontDefault(fontString)
|
||||
|
||||
newPluginObject.__breakdownwindow = true
|
||||
|
||||
@@ -76,7 +80,7 @@ function breakdownWindowFrame.ShowPluginOnBreakdown(pluginObject, button)
|
||||
--reset the template on all plugin buttons
|
||||
for _, thisPluginButton in ipairs(breakdownWindowFrame.RegisteredPluginButtons) do
|
||||
---@cast thisPluginButton df_button
|
||||
thisPluginButton:SetTemplate(detailsFramework:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
thisPluginButton:SetTemplate(detailsFramework:GetTemplate("button", "STANDARD_GRAY")) --"DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"
|
||||
end
|
||||
|
||||
local pluginMainFrame = pluginObject.Frame
|
||||
@@ -186,10 +190,18 @@ function Details222.BreakdownWindow.HidePluginFrame()
|
||||
--reset the template on all plugin buttons
|
||||
for _, thisPluginButton in ipairs(breakdownWindowFrame.RegisteredPluginButtons) do
|
||||
---@cast thisPluginButton df_button
|
||||
thisPluginButton:SetTemplate(detailsFramework:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
thisPluginButton:SetTemplate(detailsFramework:GetTemplate("button", "STANDARD_GRAY"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function Details222.BreakdownWindow.ApplyFontSettings(fontString)
|
||||
detailsFramework:SetFontSize(fontString, Details.breakdown_general.font_size)
|
||||
detailsFramework:SetFontColor(fontString, Details.breakdown_general.font_color)
|
||||
detailsFramework:SetFontOutline(fontString, Details.breakdown_general.font_outline)
|
||||
detailsFramework:SetFontFace(fontString, Details.breakdown_general.font_face)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------
|
||||
--self = instancia
|
||||
--jogador = classe_damage ou classe_heal
|
||||
@@ -248,10 +260,16 @@ end
|
||||
|
||||
Details.PlayerBreakdown.RoundedCornerPreset = {
|
||||
roundness = 6,
|
||||
color = {.1, .1, .1, 0.98},
|
||||
border_color = {.05, .05, .05, 0.834},
|
||||
color = {.1, .1, .1, 0.834},
|
||||
--border_color = {.05, .05, .05, 0.834},
|
||||
}
|
||||
|
||||
function Details:SetBreakdownWindowColor(r, g, b, a)
|
||||
--setcolor implemented by rounded corners
|
||||
breakdownWindowFrame:SetColor(r, g, b, a)
|
||||
breakdownSideMenu:SetColor(r, g, b, a)
|
||||
end
|
||||
|
||||
---open the breakdown window
|
||||
---@param self details
|
||||
---@param instanceObject instance
|
||||
@@ -267,10 +285,12 @@ function Details:OpenBreakdownWindow(instanceObject, actorObject, bFromAttribute
|
||||
if (not breakdownWindowFrame.__rcorners) then
|
||||
breakdownWindowFrame:SetBackdropColor(.1, .1, .1, 0)
|
||||
breakdownWindowFrame:SetBackdropBorderColor(.1, .1, .1, 0)
|
||||
breakdownWindowFrame.__background:Hide()
|
||||
detailsFramework:AddRoundedCornersToFrame(breakdownWindowFrame, Details.PlayerBreakdown.RoundedCornerPreset)
|
||||
detailsFramework:AddRoundedCornersToFrame(breakdownSideMenu, Details.PlayerBreakdown.RoundedCornerPreset)
|
||||
end
|
||||
|
||||
Details:SetBreakdownWindowColor(unpack(Details.frame_background_color))
|
||||
|
||||
if (not Details.row_singleclick_overwrite[mainAttribute] or not Details.row_singleclick_overwrite[mainAttribute][subAttribute]) then
|
||||
Details:CloseBreakdownWindow()
|
||||
return
|
||||
@@ -673,10 +693,6 @@ function breakdownWindowFrame.SetClassIcon(actorObject, class)
|
||||
end
|
||||
end
|
||||
|
||||
function Details:SetBreakdownWindowBackgroundTexture(texture)
|
||||
breakdownWindowFrame.backgroundTexture:SetTexture(texture)
|
||||
end
|
||||
|
||||
--search key: ~create ~inicio ~start
|
||||
function Details:CreateBreakdownWindow()
|
||||
table.insert(UISpecialFrames, breakdownWindowFrame:GetName())
|
||||
@@ -712,13 +728,6 @@ function Details:CreateBreakdownWindow()
|
||||
end
|
||||
end
|
||||
|
||||
detailsFramework:ApplyStandardBackdrop(breakdownWindowFrame)
|
||||
|
||||
--background
|
||||
breakdownWindowFrame.backgroundTexture = breakdownWindowFrame:CreateTexture("$parent", "background", nil, -3)
|
||||
breakdownWindowFrame.backgroundTexture:SetAllPoints()
|
||||
breakdownWindowFrame.backgroundTexture:Hide()
|
||||
|
||||
--host the textures and fontstring of the default frame of the player breakdown window
|
||||
--what is the summary window: is the frame where all the widgets for the summary tab are created
|
||||
breakdownWindowFrame.SummaryWindowWidgets = CreateFrame("frame", "DetailsBreakdownWindowSummaryWidgets", breakdownWindowFrame, "BackdropTemplate")
|
||||
@@ -790,12 +799,17 @@ function Details:CreateBreakdownWindow()
|
||||
local gradientStartColor = Details222.ColorScheme.GetColorFor("gradient-background")
|
||||
local gradientUp = detailsFramework:CreateTexture(breakdownWindowFrame, {gradient = "vertical", fromColor = gradientStartColor, toColor = {0, 0, 0, 0.2}}, 1, 68, "artwork", {0, 1, 0, 1})
|
||||
gradientUp:SetPoint("tops", 1, 18)
|
||||
--gradientUp:Hide()
|
||||
breakdownWindowFrame.gradientUp = gradientUp
|
||||
|
||||
local gradientHeight = 481
|
||||
local gradientDown = detailsFramework:CreateTexture(breakdownWindowFrame, {gradient = "vertical", fromColor = "transparent", toColor = {0, 0, 0, 0.7}}, 1, gradientHeight, "border", {0, 1, 0, 1})
|
||||
gradientDown:SetPoint("bottomleft", breakdownWindowFrame.statusBar, "topleft", 1, 1)
|
||||
gradientDown:SetPoint("bottomright", breakdownWindowFrame.statusBar, "topright", -1, 1)
|
||||
breakdownWindowFrame.gradientDown = gradientDown
|
||||
|
||||
--visual debugging
|
||||
gradientUp:Hide()
|
||||
gradientDown:Hide()
|
||||
|
||||
function breakdownWindowFrame:SetStatusbarText(text, fontSize, fontColor)
|
||||
if (not text) then
|
||||
@@ -924,10 +938,11 @@ function Details:CreatePlayerDetailsTab(tabName, locName, conditionFunc, fillFun
|
||||
tabFrame:SetPoint("bottomright", breakdownWindowFrame, "bottomright", -1, 20)
|
||||
tabFrame:Hide()
|
||||
|
||||
DetailsFramework:ApplyStandardBackdrop(tabFrame)
|
||||
tabFrame:SetBackdropBorderColor(0, 0, 0, 0.3)
|
||||
tabFrame.__background:SetAlpha(0.3)
|
||||
tabFrame.RightEdge:Hide()
|
||||
--DetailsFramework:ApplyStandardBackdrop(tabFrame)
|
||||
--tabFrame:SetBackdropColor(0, 0, 0, 0)
|
||||
--tabFrame:SetBackdropBorderColor(0, 0, 0, 0)
|
||||
--tabFrame.__background:SetAlpha(0)
|
||||
--tabFrame.RightEdge:Hide()
|
||||
|
||||
--create the gradients in the top and bottom side of the breakdown window
|
||||
local gradientStartColor = Details222.ColorScheme.GetColorFor("gradient-background")
|
||||
|
||||
@@ -22,7 +22,7 @@ local scrollbox_size = {215, 405}
|
||||
local scrollbox_lines = 20
|
||||
local player_line_height = 20
|
||||
local scrollbox_line_backdrop_color = {0.2, 0.2, 0.2, 0.5}
|
||||
local scrollbox_line_backdrop_color_selected = {1, 1, 0, 0.934}
|
||||
local scrollbox_line_backdrop_color_selected = {1, 1, 0, 0.45}
|
||||
local scrollbox_line_backdrop_color_highlight = {.9, .9, .9, 0.5}
|
||||
local player_scroll_size = {195, 288}
|
||||
|
||||
@@ -100,23 +100,25 @@ end
|
||||
local refreshPluginButtons = function(breakdownWindowFrame, pluginsFrame, breakdownSideMenu)
|
||||
local amountPluginButtons = #breakdownWindowFrame.RegisteredPluginButtons
|
||||
local pluginButtonHeight = 20
|
||||
local spacingBetweenButtons = 2
|
||||
local spacingBetweenButtons = 1
|
||||
local totalHeight = 0
|
||||
|
||||
for i = 1, amountPluginButtons do
|
||||
---@type button
|
||||
local pluginButton = breakdownWindowFrame.RegisteredPluginButtons[i]
|
||||
pluginButton:Show()
|
||||
pluginButton:SetWidth(pluginsFrame:GetWidth() - 4)
|
||||
pluginButton:SetHeight(pluginButtonHeight)
|
||||
PixelUtil.SetSize(pluginButton, pluginsFrame:GetWidth() - 4, pluginButtonHeight)
|
||||
pluginButton:ClearAllPoints()
|
||||
|
||||
if (i == 1) then
|
||||
pluginButton:SetPoint("topleft", pluginsFrame, "topleft", 2, -22)
|
||||
PixelUtil.SetPoint(pluginButton, "topleft", pluginsFrame, "topleft", 2, -22)
|
||||
else
|
||||
pluginButton:SetPoint("topleft", breakdownWindowFrame.RegisteredPluginButtons[i - 1], "bottomleft", 0, -spacingBetweenButtons)
|
||||
PixelUtil.SetPoint(pluginButton, "topleft", breakdownWindowFrame.RegisteredPluginButtons[i - 1], "bottomleft", 0, -spacingBetweenButtons)
|
||||
end
|
||||
|
||||
local fontString = _G[pluginButton:GetName() .. "_Text"]
|
||||
Details222.BreakdownWindow.ApplyFontSettings(fontString)
|
||||
|
||||
totalHeight = totalHeight + pluginButtonHeight + spacingBetweenButtons
|
||||
end
|
||||
|
||||
@@ -125,7 +127,7 @@ local refreshPluginButtons = function(breakdownWindowFrame, pluginsFrame, breakd
|
||||
|
||||
pluginsFrame:SetPoint("topleft", breakdownSideMenu, "topleft", 0, 0)
|
||||
pluginsFrame:SetWidth(breakdownSideMenu:GetWidth())
|
||||
pluginsFrame:SetHeight(amountPluginButtons * pluginButtonHeight + 22 + (amountPluginButtons * 2))
|
||||
pluginsFrame:SetHeight(amountPluginButtons * pluginButtonHeight + 22 + (amountPluginButtons * 1))
|
||||
|
||||
return totalHeight
|
||||
end
|
||||
@@ -275,6 +277,10 @@ local createPlayerScrollBox = function(breakdownWindowFrame, breakdownSideMenu,
|
||||
self.percentileText:SetAlpha(0.25)
|
||||
end
|
||||
|
||||
Details222.BreakdownWindow.ApplyFontSettings(self.playerName)
|
||||
Details222.BreakdownWindow.ApplyFontSettings(self.itemLevelText)
|
||||
Details222.BreakdownWindow.ApplyFontSettings(self.percentileText)
|
||||
|
||||
--set the statusbar
|
||||
local r, g, b = self.playerObject:GetClassColor()
|
||||
self.totalStatusBar:SetStatusBarColor(r, g, b, 1)
|
||||
@@ -311,59 +317,49 @@ local createPlayerScrollBox = function(breakdownWindowFrame, breakdownSideMenu,
|
||||
local createPlayerLine = function(self, index)
|
||||
--create a new line
|
||||
local line = CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
|
||||
detailsFramework:SetTemplate(line, "STANDARD_GRAY")
|
||||
|
||||
detailsFramework:Mixin(line, detailsFramework.HeaderFunctions)
|
||||
|
||||
local upFrame = CreateFrame("frame", nil, line)
|
||||
upFrame:SetFrameLevel(line:GetFrameLevel()+2)
|
||||
upFrame:SetAllPoints()
|
||||
---@type frame
|
||||
local OTTFrame = CreateFrame("frame", nil, line)
|
||||
OTTFrame:SetFrameLevel(line:GetFrameLevel()+2)
|
||||
OTTFrame:SetAllPoints()
|
||||
line.OTTFrame = OTTFrame
|
||||
|
||||
PixelUtil.SetPoint(line, "topleft", breakdownWindowFrame.PlayerSelectionHeader, "topleft", 1, -((index) * (player_line_height+1)))
|
||||
PixelUtil.SetSize(line, scrollbox_size[1]-2, player_line_height)
|
||||
|
||||
--set its parameters
|
||||
line:SetPoint("topleft", breakdownWindowFrame.PlayerSelectionHeader, "topleft", 1, -((index) * (player_line_height)))
|
||||
line:SetSize(scrollbox_size[1]-2, player_line_height)
|
||||
line:RegisterForClicks("LeftButtonDown", "RightButtonDown")
|
||||
|
||||
line:SetScript("OnEnter", lineOnEnter)
|
||||
line:SetScript("OnLeave", lineOnLeave)
|
||||
line:SetScript("OnClick", lineOnClick)
|
||||
|
||||
detailsFramework:ApplyStandardBackdrop(line)
|
||||
|
||||
local specIcon = upFrame:CreateTexture("$parentSpecIcon", "artwork")
|
||||
local specIcon = OTTFrame:CreateTexture("$parentSpecIcon", "artwork")
|
||||
specIcon:SetSize(headerTable[1].width - 1, headerTable[1].width - 1)
|
||||
specIcon:SetAlpha(0.71)
|
||||
specIcon:SetAlpha(0.834)
|
||||
detailsFramework:SetMask(specIcon, [[Interface\COMMON\common-iconmask]])
|
||||
|
||||
local roleIcon = upFrame:CreateTexture("$parentRoleIcon", "overlay")
|
||||
local roleIcon = OTTFrame:CreateTexture("$parentRoleIcon", "overlay")
|
||||
roleIcon:SetSize((player_line_height-2) / 2, (player_line_height-2) / 2)
|
||||
roleIcon:SetAlpha(0.71)
|
||||
|
||||
local playerName = detailsFramework:CreateLabel(upFrame, "", 11, "white", "GameFontNormal")
|
||||
if (fontFile) then
|
||||
playerName.fontface = fontFile
|
||||
end
|
||||
if (fontSize) then
|
||||
playerName.fontsize = fontSize
|
||||
end
|
||||
if (fontOutline) then
|
||||
playerName.outline = fontOutline
|
||||
end
|
||||
local playerName = OTTFrame:CreateFontString("$parentPlayerName", "artwork", "GameFontNormal")
|
||||
playerName:SetTextColor(1, 1, 1, .9)
|
||||
|
||||
--~create
|
||||
playerName.textcolor = {1, 1, 1, .9}
|
||||
|
||||
local className = detailsFramework:CreateLabel(upFrame, "", "GameFontNormal")
|
||||
local className = detailsFramework:CreateLabel(OTTFrame, "", "GameFontNormal")
|
||||
className.textcolor = {.95, .8, .2, 0}
|
||||
className.textsize = 9
|
||||
|
||||
local itemLevelText = detailsFramework:CreateLabel(upFrame, "", "GameFontNormal")
|
||||
local itemLevelText = detailsFramework:CreateLabel(OTTFrame, "", "GameFontNormal")
|
||||
itemLevelText.textcolor = {1, 1, 1, .7}
|
||||
itemLevelText.textsize = 11
|
||||
|
||||
local percentileText = detailsFramework:CreateLabel(upFrame, "", "GameFontNormal")
|
||||
local percentileText = detailsFramework:CreateLabel(OTTFrame, "", "GameFontNormal")
|
||||
percentileText.textcolor = {1, 1, 1, .7}
|
||||
percentileText.textsize = 11
|
||||
|
||||
local rankText = detailsFramework:CreateLabel(upFrame, "", "GameFontNormal")
|
||||
local rankText = detailsFramework:CreateLabel(OTTFrame, "", "GameFontNormal")
|
||||
rankText.textcolor = {.3, .3, .3, .7}
|
||||
rankText.textsize = fontSize
|
||||
|
||||
@@ -507,18 +503,15 @@ local createSegmentsScrollBox = function(breakdownWindowFrame, breakdownSideMenu
|
||||
local combatName = segmentData.combatName
|
||||
local r, g, b = segmentData.r, segmentData.g, segmentData.b
|
||||
local combatIcon1 = segmentData.combatIcon
|
||||
local combatIcon2 = segmentData.combatIcon2
|
||||
|
||||
self.segmentText:SetText(combatName)
|
||||
Details222.BreakdownWindow.ApplyFontSettings(self.segmentText)
|
||||
|
||||
self.segmentText:SetTextColor(r, g, b)
|
||||
detailsFramework:TruncateText(self.segmentText, player_scroll_size[1] - 20)
|
||||
detailsFramework:SetAtlas(self.segmentIcon, combatIcon1)
|
||||
|
||||
if (combatIcon2) then
|
||||
detailsFramework:SetAtlas(self.segmentSubIcon, combatIcon2)
|
||||
else
|
||||
self.segmentSubIcon:SetTexture("")
|
||||
end
|
||||
local bUseAtlasSize = true
|
||||
detailsFramework:SetAtlas(self.segmentIcon, combatIcon1, bUseAtlasSize)
|
||||
|
||||
self.combatUniqueID = segmentData.UID
|
||||
|
||||
@@ -559,41 +552,28 @@ local createSegmentsScrollBox = function(breakdownWindowFrame, breakdownSideMenu
|
||||
--create a new line
|
||||
local line = CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
|
||||
detailsFramework:Mixin(line, detailsFramework.HeaderFunctions)
|
||||
detailsFramework:SetTemplate(line, "STANDARD_GRAY")
|
||||
|
||||
PixelUtil.SetPoint(line, "topleft", self, "topleft", 1, -((index-1) * (player_line_height+1)))
|
||||
PixelUtil.SetSize(line, scrollbox_size[1]-2, player_line_height)
|
||||
|
||||
--set its parameters
|
||||
line:SetPoint("topleft", self, "topleft", 1, -((index-1) * (player_line_height)))
|
||||
line:SetSize(scrollbox_size[1]-2, player_line_height)
|
||||
line:RegisterForClicks("LeftButtonDown", "RightButtonDown")
|
||||
|
||||
line:SetScript("OnEnter", lineOnEnter)
|
||||
line:SetScript("OnLeave", lineOnLeave)
|
||||
line:SetScript("OnClick", lineOnClick)
|
||||
|
||||
detailsFramework:ApplyStandardBackdrop(line)
|
||||
|
||||
--segment icon, this icon will tell which type of segment the line is
|
||||
---@type df_image
|
||||
local segmentIcon = detailsFramework:CreateTexture(line, "", player_line_height, player_line_height - 1, "artwork")
|
||||
segmentIcon:SetSize(player_line_height - 4, player_line_height - 4)
|
||||
segmentIcon:SetAlpha(0.834)
|
||||
|
||||
local segmentSubIcon = detailsFramework:CreateTexture(line, "", player_line_height, player_line_height - 1, "artwork")
|
||||
segmentSubIcon:SetSize(player_line_height - 4, player_line_height - 4)
|
||||
segmentSubIcon:SetAlpha(0.834)
|
||||
|
||||
local segmentText = detailsFramework:CreateLabel(line, "", fontSize or 11, "white", "GameFontNormal")
|
||||
segmentText.outline = fontOutline or "none"
|
||||
segmentText.textcolor = {1, 1, 1, .9}
|
||||
if (fontFile) then
|
||||
segmentText.textfont = fontFile
|
||||
end
|
||||
|
||||
local segmentText = line:CreateFontString("$parentSegmentName", "artwork", "GameFontNormal")
|
||||
line.segmentText = segmentText
|
||||
line.segmentIcon = segmentIcon
|
||||
line.segmentSubIcon = segmentSubIcon
|
||||
|
||||
segmentIcon:SetPoint("left", line, "left", 2, 0)
|
||||
segmentSubIcon:SetPoint("left", segmentIcon, "right", 2, 0)
|
||||
segmentText:SetPoint("left", segmentSubIcon, "right", 3, 1)
|
||||
segmentText:SetPoint("left", segmentIcon.widget, "right", 3, 1)
|
||||
|
||||
line.UpdateLine = updateSegmentLine
|
||||
|
||||
@@ -638,8 +618,6 @@ function breakdownWindowPlayerList.CreatePlayerListFrame()
|
||||
PixelUtil.SetPoint(breakdownSideMenu, "topright", breakdownWindowFrame, "topleft", -2, 0)
|
||||
PixelUtil.SetPoint(breakdownSideMenu, "bottomright", breakdownWindowFrame, "bottomleft", -2, 0)
|
||||
|
||||
detailsFramework:AddRoundedCornersToFrame(breakdownSideMenu, Details.PlayerBreakdown.RoundedCornerPreset)
|
||||
|
||||
--> create headers
|
||||
local sectionHeaderHeight = 20
|
||||
--plugins header frame
|
||||
@@ -758,15 +736,17 @@ function breakdownWindowPlayerList.CreatePlayerListFrame()
|
||||
lastSelectedPlayerPerSegment[Details:GetCombatFromBreakdownWindow():GetCombatUID()] = selectedPlayerName
|
||||
lastSelectedPlayerName = selectedPlayerName
|
||||
|
||||
local playerLineHeight = player_line_height+1 --the +1 is the space between the lines
|
||||
|
||||
--recalculate the height free, now that we know the amount of lines the player scroll will show
|
||||
heightFree = heightFree - (linesForPlayerScroll * player_line_height)
|
||||
local linesForSegmentsScroll = math.floor(heightFree/player_line_height)
|
||||
heightFree = heightFree - (linesForPlayerScroll * playerLineHeight)
|
||||
local linesForSegmentsScroll = math.floor(heightFree/playerLineHeight)
|
||||
|
||||
playerScroll:SetNumFramesShown(linesForPlayerScroll) --looks like it is not updating the 'totalLines' at the refresh function
|
||||
playerScroll:SetHeight(linesForPlayerScroll * player_line_height)
|
||||
playerScroll:SetHeight(linesForPlayerScroll * playerLineHeight)
|
||||
|
||||
segmentsScroll:SetNumFramesShown(linesForSegmentsScroll)
|
||||
segmentsScroll:SetHeight(linesForSegmentsScroll * player_line_height)
|
||||
segmentsScroll:SetHeight(linesForSegmentsScroll * playerLineHeight)
|
||||
|
||||
playerScroll:SetData(playerList)
|
||||
playerScroll:Refresh()
|
||||
@@ -786,13 +766,12 @@ function breakdownWindowPlayerList.CreatePlayerListFrame()
|
||||
local UID = combatObject:GetCombatUID()
|
||||
|
||||
local combatName, r, g, b = combatObject:GetCombatName(true)
|
||||
local combatIcon, combatSubIcon = combatObject:GetCombatIcon()
|
||||
local combatIcon, categoryIcon = combatObject:GetCombatIcon()
|
||||
|
||||
segmentsData[i] = {
|
||||
UID = UID,
|
||||
combatName = combatName,
|
||||
combatIcon = combatIcon,
|
||||
combatIcon2 = combatSubIcon,
|
||||
r = r or 1,
|
||||
g = g or 1,
|
||||
b = b or 1,
|
||||
@@ -826,4 +805,8 @@ function Details.PlayerBreakdown.CreatePlayerListFrame()
|
||||
breakdownWindowPlayerList.CreatePlayerListFrame()
|
||||
Details.PlayerBreakdown.playerListFrameCreated = true
|
||||
end
|
||||
end
|
||||
|
||||
function Details222.BreakdownWindow.RefreshScrolls()
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
end
|
||||
@@ -563,7 +563,7 @@ function spellsTab.OnCreateTabCallback(tabButton, tabFrame) --~init
|
||||
local optionsButton = DF:CreateButton(tabFrame, Details.OpenSpellBreakdownOptions, 130, 18, Loc["STRING_OPTIONS_PLUGINS_OPTIONS"], 14)
|
||||
--optionsButton:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
optionsButton:SetPoint("bottomright", tabFrame, "bottomright", -10, -19)
|
||||
optionsButton:SetTemplate("OPTIONS_BUTTON_TEMPLATE")
|
||||
optionsButton:SetTemplate("STANDARD_GRAY")
|
||||
optionsButton:SetIcon(Details:GetTextureAtlas("breakdown-icon-optionsbutton"))
|
||||
optionsButton.textsize = 12
|
||||
optionsButton.textcolor = "DETAILS_STATISTICS_ICON"
|
||||
@@ -643,7 +643,7 @@ function spellsTab.OnCreateTabCallback(tabButton, tabFrame) --~init
|
||||
reportButton:SetPoint("right", optionsButton, "left", -5, 0)
|
||||
reportButton.textsize = 12
|
||||
reportButton.textcolor = "DETAILS_STATISTICS_ICON"
|
||||
reportButton:SetTemplate("OPTIONS_BUTTON_TEMPLATE")
|
||||
reportButton:SetTemplate("STANDARD_GRAY")
|
||||
reportButton:SetIcon(Details:GetTextureAtlas("breakdown-icon-reportbutton"))
|
||||
reportButton:SetAlpha(0.834)
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
local Details = Details
|
||||
|
||||
---@type detailsframework
|
||||
local DF = DetailsFramework
|
||||
|
||||
--create the main frame for the options panel
|
||||
@@ -27,6 +29,7 @@ local createOptionsPanel = function()
|
||||
DF:ApplyStandardBackdrop(optionsFrame, bUseSolidColor)
|
||||
|
||||
local resetSettings = function()
|
||||
--overwrite the settings for the spell frame
|
||||
for key, value in pairs (Details.default_global_data.breakdown_spell_tab) do
|
||||
if (type(value) == "table") then
|
||||
local t = DF.table.copy({}, value)
|
||||
@@ -36,6 +39,16 @@ local createOptionsPanel = function()
|
||||
end
|
||||
end
|
||||
|
||||
--overwrite the settings for the general frame
|
||||
for key, value in pairs (Details.default_global_data.breakdown_general) do
|
||||
if (type(value) == "table") then
|
||||
local t = DF.table.copy({}, value)
|
||||
Details.breakdown_general[key] = t
|
||||
else
|
||||
Details.breakdown_general[key] = value
|
||||
end
|
||||
end
|
||||
|
||||
local instanceObject = Details:GetActiveWindowFromBreakdownWindow()
|
||||
local actorObject = Details:GetActorObjectFromBreakdownWindow()
|
||||
local bFromAttributeChange = true
|
||||
@@ -60,6 +73,36 @@ local createOptionsPanel = function()
|
||||
local subSectionTitleTextTemplate = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")
|
||||
|
||||
local optionsTable = {
|
||||
{type = "label", get = function() return "General Settings" end, text_template = subSectionTitleTextTemplate},
|
||||
--background color from setting Details.frame_background_color
|
||||
{ --background color
|
||||
type = "color",
|
||||
get = function()
|
||||
local colorTable = Details.frame_background_color
|
||||
return colorTable[1], colorTable[2], colorTable[3], colorTable[4]
|
||||
end,
|
||||
set = function(self, r, g, b, a)
|
||||
local colorTable = Details.frame_background_color
|
||||
|
||||
--/run Details.frame_background_color = {0.1215, 0.1176, 0.1294, 0.934}
|
||||
|
||||
local normalizedRed = DF.Math.MapRangeClamped(0, 1, 0, 0.1215, r)
|
||||
local normalizedGreen = DF.Math.MapRangeClamped(0, 1, 0, 0.1176, g)
|
||||
local normalizedBlue = DF.Math.MapRangeClamped(0, 1, 0, 0.1294, b)
|
||||
local normalizedAlpha = DF.Math.MapRangeClamped(0, 1, 0.8, 0.98, a)
|
||||
|
||||
colorTable[1] = normalizedRed
|
||||
colorTable[2] = normalizedGreen
|
||||
colorTable[3] = normalizedBlue
|
||||
colorTable[4] = normalizedAlpha
|
||||
Details:SetBreakdownWindowColor(normalizedRed, normalizedGreen, normalizedBlue, normalizedAlpha)
|
||||
end,
|
||||
name = "Background Color",
|
||||
desc = "Background Color",
|
||||
},
|
||||
|
||||
{type = "blank"},
|
||||
|
||||
{type = "label", get = function() return "Spell Details Block" end, text_template = subSectionTitleTextTemplate},
|
||||
{--block height
|
||||
type = "range",
|
||||
@@ -76,7 +119,6 @@ local createOptionsPanel = function()
|
||||
},
|
||||
|
||||
{type = "blank"},
|
||||
{type = "blank"},
|
||||
|
||||
{type = "label", get = function() return "Spell Header Options" end, text_template = subSectionTitleTextTemplate},
|
||||
{ --per second
|
||||
@@ -167,6 +209,62 @@ local createOptionsPanel = function()
|
||||
desc = "Heal Absorbed",
|
||||
},
|
||||
|
||||
{type = "blank"},
|
||||
|
||||
{type = "label", get = function() return "Text Options" end, text_template = subSectionTitleTextTemplate},
|
||||
{ --font color
|
||||
type = "color",
|
||||
get = function() return Details.breakdown_general.font_color[1], Details.breakdown_general.font_color[2], Details.breakdown_general.font_color[3], Details.breakdown_general.font_color[4] end,
|
||||
set = function(self, r, g, b, a)
|
||||
local colorTable = Details.breakdown_general.font_color
|
||||
colorTable[1] = r
|
||||
colorTable[2] = g
|
||||
colorTable[3] = b
|
||||
colorTable[4] = a
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
end,
|
||||
name = "Text Color",
|
||||
desc = "Text Color",
|
||||
},
|
||||
|
||||
{ --font size
|
||||
type = "range",
|
||||
get = function() return Details.breakdown_general.font_size end,
|
||||
set = function(self, fixedparam, value)
|
||||
Details.breakdown_general.font_size = value
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
end,
|
||||
min = 8,
|
||||
max = 20,
|
||||
step = 1,
|
||||
name = "Text Size",
|
||||
desc = "Text Size",
|
||||
},
|
||||
|
||||
{ --font outline
|
||||
type = "outlinedropdown",
|
||||
get = function() return Details.breakdown_general.font_outline end,
|
||||
set = function(self, fixedparam, value)
|
||||
Details.breakdown_general.font_outline = value
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
end,
|
||||
name = "Text Outline",
|
||||
desc = "Text Outline",
|
||||
},
|
||||
|
||||
{---font face
|
||||
type = "fontdropdown",
|
||||
get = function() return Details.breakdown_general.font_face end,
|
||||
set = function(self, fixedparam, value)
|
||||
Details.breakdown_general.font_face = value
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
end,
|
||||
name = "Font Face",
|
||||
desc = "Font Face",
|
||||
include_default = true,
|
||||
},
|
||||
|
||||
|
||||
{type = "breakline"},
|
||||
{type = "label", get = function() return "Scroll Options" end, text_template = subSectionTitleTextTemplate},
|
||||
|
||||
|
||||
+14
-9
@@ -6420,12 +6420,11 @@ local buildSegmentTooltip = function(self, deltaTime)
|
||||
if (combatType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASH or combatType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSSTRASH) then
|
||||
local combatName, r, g, b = thisCombat:GetCombatName()
|
||||
local broomStick = detailsFramework:CreateAtlasString(Details:GetTextureAtlas("segment-icon-broom"))
|
||||
|
||||
--dumpt(mythicDungeonInfo)
|
||||
local combatIcon, categoryIcon = thisCombat:GetCombatIcon()
|
||||
|
||||
gameCooltip:AddLine(broomStick .. " " .. combatName, detailsFramework:IntegerToTimer(thisCombat:GetCombatTime()), 1, dungeonColor, combatTimeColor)
|
||||
local bDesaturated = false
|
||||
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left", nil, nil, nil, nil, nil, nil, nil, nil, bDesaturated)
|
||||
gameCooltip:AddIcon(categoryIcon, "main", "left", nil, nil, nil, nil, nil, nil, nil, nil, bDesaturated)
|
||||
|
||||
--submenu
|
||||
gameCooltip:AddLine(Loc["STRING_SEGMENT_TRASH"], nil, 2, "white", "white")
|
||||
@@ -6452,7 +6451,8 @@ local buildSegmentTooltip = function(self, deltaTime)
|
||||
|
||||
elseif (combatType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
|
||||
gameCooltip:AddLine(thisCombat:GetCombatName(), detailsFramework:IntegerToTimer(endedAt - startedAt), 1, dungeonColor)
|
||||
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
|
||||
local combatIcon, categoryIcon = thisCombat:GetCombatIcon()
|
||||
gameCooltip:AddIcon(categoryIcon, "main", "left")
|
||||
gameCooltip:AddStatusBar(100, 1, .5, .1, 0, 0.55, false, false, statusBarTexture)
|
||||
local timeInCombat = thisCombat:GetCombatTime()
|
||||
|
||||
@@ -6483,6 +6483,8 @@ local buildSegmentTooltip = function(self, deltaTime)
|
||||
gameCooltip:AddStatusBar(100, 2, 0, 0, 0, 0.25, false, false, statusBarTexture)
|
||||
end
|
||||
|
||||
local combatIcon, categoryIcon = thisCombat:GetCombatIcon()
|
||||
|
||||
local skull = "|TInterface\\AddOns\\Details\\images\\icons:16:16:0:0:512:512:496:512:0:16|t"
|
||||
local skullIcon = detailsFramework:CreateAtlasString(Details:GetTextureAtlas("segment-icon-boss"))
|
||||
|
||||
@@ -6490,7 +6492,7 @@ local buildSegmentTooltip = function(self, deltaTime)
|
||||
local combatName, combatColor = thisCombat:GetCombatName()
|
||||
local r, g, b, a = detailsFramework:ParseColors(combatColor)
|
||||
gameCooltip:AddLine(skullIcon .. " " .. combatName, detailsFramework:IntegerToTimer(elapsedCombatTime), 1, dungeonColor, combatTimeColor)
|
||||
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
|
||||
gameCooltip:AddIcon(categoryIcon, "main", "left")
|
||||
addIconAndStatusBar()
|
||||
|
||||
--sub cooltip frame
|
||||
@@ -6579,7 +6581,10 @@ local buildSegmentTooltip = function(self, deltaTime)
|
||||
local tryNumber = thisCombat:GetTryNumber()
|
||||
local combatTime = thisCombat:GetCombatTime()
|
||||
local combatInstanceType = thisCombat:GetInstanceType()
|
||||
local combatName, r, g, b = thisCombat:GetCombatName()
|
||||
local bOnlyName = true
|
||||
local combatName, r, g, b = thisCombat:GetCombatName(bOnlyName)
|
||||
|
||||
local combatIcon, categoryIcon = thisCombat:GetCombatIcon()
|
||||
|
||||
if (combatInstanceType == "party") then
|
||||
gameCooltip:AddLine(combatName, formattedElapsedTime, 1, dungeonColor, combatTimeColor)
|
||||
@@ -6587,16 +6592,16 @@ local buildSegmentTooltip = function(self, deltaTime)
|
||||
elseif (bossInfo.killed) then
|
||||
gameCooltip:AddLine(combatName, formattedElapsedTime, 1, "lime", combatTimeColor)
|
||||
else
|
||||
gameCooltip:AddLine(combatName, formattedElapsedTime, 1, "red", combatTimeColor)
|
||||
gameCooltip:AddLine(combatName, formattedElapsedTime, 1, "orange", combatTimeColor)
|
||||
end
|
||||
|
||||
gameCooltip:AddIcon(combatIcon, "main", "left")
|
||||
|
||||
local portrait = thisCombat:GetBossImage()
|
||||
if (portrait) then
|
||||
gameCooltip:AddIcon(portrait, 2, "top", 128, 64)
|
||||
end
|
||||
|
||||
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
|
||||
|
||||
if (Details.tooltip.submenu_wallpaper) then
|
||||
local background = Details:GetRaidIcon(bossInfo.mapid)
|
||||
if (background and bCanUseBackgroundImage) then
|
||||
|
||||
@@ -896,7 +896,7 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
|
||||
local elapsedTime = Details222.MythicPlus.time or 1507
|
||||
readyFrame.ElapsedTimeAmountLabel.text = DetailsFramework:IntegerToTimer(elapsedTime)
|
||||
|
||||
C_Timer.After(1.5, function()
|
||||
C_Timer.After(2.5, function()
|
||||
--print("overall combat type:", overallMythicDungeonCombat:GetCombatType(), overallMythicDungeonCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL)
|
||||
if (overallMythicDungeonCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
|
||||
local combatTime = overallMythicDungeonCombat:GetCombatTime()
|
||||
|
||||
@@ -839,11 +839,12 @@ local createDropdown = function(thisFrame)
|
||||
|
||||
local flashTexture = window:CreateTexture(nil, "background")
|
||||
flashTexture:SetColorTexture(1, 1, 1)
|
||||
flashTexture:SetAllPoints()
|
||||
flashTexture:SetPoint("topleft", window, "topleft", -2, 2)
|
||||
flashTexture:SetPoint("bottomright", window, "bottomright", 2, -2)
|
||||
|
||||
local onShowAnimation = DetailsFramework:CreateAnimationHub(flashTexture, function() flashTexture:Show() end, function() flashTexture:Hide() end)
|
||||
DetailsFramework:CreateAnimation(onShowAnimation, "ALPHA", 1, .2, 0, .10)
|
||||
DetailsFramework:CreateAnimation(onShowAnimation, "ALPHA", 2, .2, .10, 0)
|
||||
DetailsFramework:CreateAnimation(onShowAnimation, "ALPHA", 1, .4, 0, .90)
|
||||
DetailsFramework:CreateAnimation(onShowAnimation, "ALPHA", 2, .4, .90, 0)
|
||||
|
||||
window:SetScript("OnShow", function(self)
|
||||
local dropdown = window.select.MyObject
|
||||
@@ -882,6 +883,8 @@ local createDropdown = function(thisFrame)
|
||||
end
|
||||
|
||||
window:RefreshRecentlyReported()
|
||||
|
||||
window:SetColor(unpack(Details.frame_background_color))
|
||||
end)
|
||||
|
||||
window:SetScript("OnHide", function(self)
|
||||
|
||||
Reference in New Issue
Block a user