Work on Ascension Backport

This commit is contained in:
andrew6180
2024-05-17 15:08:08 -07:00
parent 5de2a04b8c
commit bb7e0d2c27
325 changed files with 26995 additions and 41741 deletions
-11
View File
@@ -1,11 +0,0 @@
background.blp
border_1.blp
border_2.blp
border_3.blp
cooltip_background.blp
feedback_sites.blp
icons.blp
mail.blp
*.json
CHANGES.txt
+14 -13
View File
@@ -12,10 +12,10 @@ local tinsert = table.insert
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local lower = string.lower
local SpellBookItemTypeMap = Enum.SpellBookItemType and {[Enum.SpellBookItemType.Spell] = "SPELL", [Enum.SpellBookItemType.None] = "NONE", [Enum.SpellBookItemType.Flyout] = "FLYOUT", [Enum.SpellBookItemType.FutureSpell] = "FUTURESPELL", [Enum.SpellBookItemType.PetAction] = "PETACTION" } or {}
local GetSpellBookItemInfo = GetSpellBookItemInfo or function(...) local si = C_SpellBook.GetSpellBookItemInfo(...) if si then return SpellBookItemTypeMap[si.itemType] or "NONE", si.spellID end end
local GetSpellBookItemInfo = GetSpellBookItemInfo
local SPELLBOOK_BANK_PLAYER = Enum.SpellBookSpellBank and Enum.SpellBookSpellBank.Player or "player"
local GetNumSpellTabs = GetNumSpellTabs or C_SpellBook.GetNumSpellBookSkillLines
local GetSpellTabInfo = GetSpellTabInfo or function(tabLine) local skillLine = C_SpellBook.GetSpellBookSkillLineInfo(tabLine) if skillLine then return skillLine.name, skillLine.iconID, skillLine.itemIndexOffset, skillLine.numSpellBookItems, skillLine.isGuild, skillLine.offSpecID end end
local GetNumSpellTabs = GetNumSpellTabs
local GetSpellTabInfo = GetSpellTabInfo
local unpack = unpack
local CreateFrame = CreateFrame
local GameTooltip = GameTooltip
@@ -1046,16 +1046,17 @@ end
function DF:GetAllPlayerSpells(include_lower_case)
local playerSpells = {}
for i = 1, GetNumSpellTabs() do
local _, _, offset, numSpells = GetSpellTabInfo(i)
for i = 1, numSpells do
local index = offset + i
local spellType, spellId = GetSpellBookItemInfo(index, SPELLBOOK_BANK_PLAYER)
if (spellType == "SPELL") then
local spellName = GetSpellInfo(spellId)
tinsert(playerSpells, spellName)
if (include_lower_case) then
tinsert(playerSpells, lower(spellName))
for i = 2, GetNumSpellTabs() do
local name, _, offset, numSpells = GetSpellTabInfo(i)
if name and name ~= "Internal" and name ~= "Ascension Vanity Items" then
for i = 1, numSpells do
local index = offset + i
local spellName = GetSpellInfo(index, BOOKTYPE_SPELL)
if spellName then
tinsert(playerSpells, spellName)
if (include_lower_case) then
tinsert(playerSpells, lower(spellName))
end
end
end
end
+3 -3
View File
@@ -156,13 +156,13 @@ local createOptionHighlightTexture = function(frame, label, widgetWidth)
highlightFrame:SetScript("OnLeave", onLeaveHighlight)
local highlightTexture = highlightFrame:CreateTexture(nil, "overlay")
highlightTexture:SetColorTexture(1, 1, 1, 0.1)
highlightTexture:SetTexture(1, 1, 1, 0.1)
PixelUtil.SetPoint(highlightTexture, "topleft", highlightFrame, "topleft", 0, 0)
PixelUtil.SetPoint(highlightTexture, "bottomright", highlightFrame, "bottomright", 0, 0)
highlightTexture:Hide()
local backgroundTexture = highlightFrame:CreateTexture(nil, "artwork")
backgroundTexture:SetColorTexture(1, 1, 1)
backgroundTexture:SetTexture(1, 1, 1)
backgroundTexture:SetVertexColor(.25, .25, .25, 0.5)
PixelUtil.SetPoint(backgroundTexture, "topleft", highlightFrame, "topleft", 0, 0)
PixelUtil.SetPoint(backgroundTexture, "bottomright", highlightFrame, "bottomright", 0, 0)
@@ -1587,7 +1587,7 @@ function detailsFramework:CreateInCombatTexture(frame)
end
local inCombatBackgroundTexture = detailsFramework:CreateImage(frame)
inCombatBackgroundTexture:SetColorTexture(.6, 0, 0, .1)
inCombatBackgroundTexture:SetTexture(.6, 0, 0, .1)
inCombatBackgroundTexture:Hide()
local inCombatLabel = detailsFramework:CreateLabel(frame, "you are in combat", 24, "silver")
+10 -10
View File
@@ -418,13 +418,13 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin)
end
if (type(texture) == "string") then
local isAtlas = C_Texture.GetAtlasInfo(texture)
local isAtlas = AtlasUtil:AtlasExists(texture)
if (isAtlas) then
self.icon:SetAtlas(texture)
elseif (detailsFramework:IsHtmlColor(texture)) then
local r, g, b, a = detailsFramework:ParseColors(texture)
self.icon:SetColorTexture(r, g, b, a)
self.icon:SetTexture(r, g, b, a)
else
self.icon:SetTexture(texture, nil, nil, filterMode)
end
@@ -1134,7 +1134,7 @@ end
--texture which shows the texture color
local colorTexture = colorPickButton:CreateTexture("$parentTex", "overlay")
colorTexture:SetColorTexture(1, 1, 1)
colorTexture:SetTexture(1, 1, 1)
colorTexture:SetPoint("topleft", colorPickButton.widget, "topleft", 0, 0)
colorTexture:SetPoint("bottomright", colorPickButton.widget, "bottomright", 0, 0)
colorTexture:SetDrawLayer("background", 3)
@@ -1167,7 +1167,7 @@ end
local atlas
if (type(texture) == "string") then
atlas = C_Texture.GetAtlasInfo(texture)
atlas = AtlasUtil:AtlasExists(texture)
if (atlas) then
atlas = texture
end
@@ -1453,16 +1453,16 @@ function detailsFramework:CreateCloseButton(parent, frameName)
closeButton:SetSize(16, 16)
detailsFramework:Mixin(closeButton, detailsFramework.CloseButtonMixin)
closeButton:SetNormalAtlas("RedButton-Exit")
closeButton:SetHighlightAtlas("RedButton-Highlight")
closeButton:SetPushedAtlas("RedButton-exit-pressed")
closeButton:SetDisabledAtlas("RedButton-Exit-Disabled")
local normalTexture = closeButton:GetNormalTexture()
local pushedTexture = closeButton:GetPushedTexture()
local highlightTexture = closeButton:GetHighlightTexture()
local disabledTexture = closeButton:GetDisabledTexture()
normalTexture:SetAtlas("RedButton-Exit")
highlightTexture:SetAtlas("RedButton-Highlight")
pushedTexture:SetAtlas("RedButton-exit-pressed")
disabledTexture:SetAtlas("RedButton-Exit-Disabled")
normalTexture:SetDesaturated(true)
highlightTexture:SetDesaturated(true)
+7 -7
View File
@@ -160,7 +160,7 @@ local createVerticalAxisLabels = function(parent, amountLabels, labelsTable, red
local guideLine = parent:CreateLine("$parentYAxisLabel" .. i .. "GuideLine", "border")
guideLine:SetThickness(1)
guideLine:SetColorTexture(red, green, blue, 0.05)
guideLine:SetTexture(red, green, blue, 0.05)
label.circleTexture = circleTexture
label.guideLine = guideLine
@@ -351,8 +351,8 @@ detailsFramework.ChartFrameSharedMixin = {
--set the color of both axis lines
red, green, blue, alpha = detailsFramework:ParseColors(red, green, blue, alpha)
self.yAxisLine:SetColorTexture(red, green, blue, alpha)
self.xAxisLine:SetColorTexture(red, green, blue, alpha)
self.yAxisLine:SetTexture(red, green, blue, alpha)
self.xAxisLine:SetTexture(red, green, blue, alpha)
--iterage over all labels and set their color
for i = 1, #self.yAxisLabels do
@@ -520,10 +520,10 @@ detailsFramework.ChartFrameSharedMixin = {
thisIndicator:SetPoint("bottomright", self.plotFrame, "bottomleft", endX, 0)
thisIndicator.fieldLabel:SetText(labelText)
thisIndicator.fieldTexture:SetColorTexture(unpack(color))
thisIndicator.fieldTexture:SetTexture(unpack(color))
thisIndicator.indicatorLabel:SetText(labelText)
thisIndicator.indicatorTexture:SetColorTexture(unpack(color))
thisIndicator.indicatorTexture:SetTexture(unpack(color))
local stringWidth = thisIndicator.indicatorLabel:GetStringWidth()
local squareWidth = thisIndicator.indicatorTexture:GetWidth()
@@ -712,7 +712,7 @@ detailsFramework.ChartFrameMixin = {
for i = 1, maxLines do
local line = self:GetLine()
line:SetColorTexture(unpack(self.color))
line:SetTexture(unpack(self.color))
if (line.thickness ~= self.lineThickness) then
line:SetThickness(self.lineThickness)
@@ -971,7 +971,7 @@ detailsFramework.MultiChartFrameMixin = {
self.lineNameIndicators[nameIndicatorIndex] = thisIndicator
end
thisIndicator.Texture:SetColorTexture(red, green, blue, alpha)
thisIndicator.Texture:SetTexture(red, green, blue, alpha)
thisIndicator.Label:SetText(chartName)
local textWidth = thisIndicator.Label:GetStringWidth()
thisIndicator:SetWidth(math.max(textWidth + thisIndicator.Texture:GetWidth() + 4, 85))
+4 -13
View File
@@ -8,19 +8,6 @@ do
DF.alias_text_colors = DF.alias_text_colors or {}
local defaultColors = {
["HUNTER"] = {0.67, 0.83, 0.45},
["WARLOCK"] = {0.58, 0.51, 0.79},
["PRIEST"] = {1.0, 1.0, 1.0},
["PALADIN"] = {0.96, 0.55, 0.73},
["MAGE"] = {0.41, 0.8, 0.94},
["ROGUE"] = {1.0, 0.96, 0.41},
["DRUID"] = {1.0, 0.49, 0.04},
["SHAMAN"] = {0.0, 0.44, 0.87},
["WARRIOR"] = {0.78, 0.61, 0.43},
["DEATHKNIGHT"] = {0.77, 0.12, 0.23},
["MONK"] = {0.0, 1.00, 0.59},
["DEMONHUNTER"] = {0.64, 0.19, 0.79},
["EVOKER"] = {0.20, 0.58, 0.50},
["dark1"] = {0.1215, 0.1176, 0.1294},
["dark2"] = {0.2215, 0.2176, 0.2294},
@@ -172,6 +159,10 @@ do
["yellowgreen"] = {0.603922, 0.803922, 0.196078, 1}
}
for class, color in pairs(RAID_CLASS_COLORS) do
defaultColors[class] = { color.r, color.g, color.b }
end
function DF:GetDefaultColorList()
return defaultColors
end
+3 -3
View File
@@ -270,9 +270,9 @@ detailsFramework.FrameContainerMixin = {
frameContainer.sideResizers[i]:SetScript("OnMouseDown", frameContainer.OnResizerMouseDown)
frameContainer.sideResizers[i]:SetScript("OnMouseUp", frameContainer.OnResizerMouseUp)
frameContainer.sideResizers[i]:GetNormalTexture():SetColorTexture(1, 1, 1, 0.6)
frameContainer.sideResizers[i]:GetHighlightTexture():SetColorTexture(detailsFramework:ParseColors("aqua"))
frameContainer.sideResizers[i]:GetPushedTexture():SetColorTexture(1, 1, 1, 1)
frameContainer.sideResizers[i]:GetNormalTexture():SetTexture(1, 1, 1, 0.6)
frameContainer.sideResizers[i]:GetHighlightTexture():SetTexture(detailsFramework:ParseColors("aqua"))
frameContainer.sideResizers[i]:GetPushedTexture():SetTexture(1, 1, 1, 1)
frameContainer.sideResizers[i]:ClearAllPoints()
+11 -41
View File
@@ -259,7 +259,7 @@ function DF:CreateCoolTip()
--this texture get the color from gameCooltip:SetColor()
if (not self.frameBackgroundTexture) then
self.frameBackgroundTexture = self:CreateTexture("$parent_FrameBackgroundTexture", "BACKGROUND", nil, 2)
self.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
self.frameBackgroundTexture:SetTexture(0, 0, 0, 0)
self.frameBackgroundTexture:SetAllPoints()
end
@@ -272,7 +272,7 @@ function DF:CreateCoolTip()
if (not self.selectedTop) then
self.selectedTop = self:CreateTexture("$parent_SelectedTop", "ARTWORK")
self.selectedTop:SetColorTexture(.5, .5, .5, .75)
self.selectedTop:SetTexture(.5, .5, .5, .75)
self.selectedTop:SetHeight(3)
end
@@ -284,13 +284,13 @@ function DF:CreateCoolTip()
if (not self.selectedBottom) then
self.selectedBottom = self:CreateTexture("$parent_SelectedBottom", "ARTWORK")
self.selectedBottom:SetColorTexture(.5, .5, .5, .75)
self.selectedBottom:SetTexture(.5, .5, .5, .75)
self.selectedBottom:SetHeight(3)
end
if (not self.selectedMiddle) then
self.selectedMiddle = self:CreateTexture("$parent_Selected", "ARTWORK")
self.selectedMiddle:SetColorTexture(.5, .5, .5, .75)
self.selectedMiddle:SetTexture(.5, .5, .5, .75)
self.selectedMiddle:SetPoint("TOPLEFT", self.selectedTop, "BOTTOMLEFT")
self.selectedMiddle:SetPoint("BOTTOMRIGHT", self.selectedBottom, "TOPRIGHT")
end
@@ -623,18 +623,10 @@ function DF:CreateCoolTip()
statusbar.leftIcon:SetSize(16, 16)
statusbar.leftIcon:SetPoint("LEFT", statusbar, "LEFT", 0, 0)
statusbar.leftIconMask = statusbar:CreateMaskTexture("$parent_LeftIconMask", "artwork")
statusbar.leftIconMask:SetAllPoints(statusbar.leftIcon)
statusbar.leftIcon:AddMaskTexture(statusbar.leftIconMask)
statusbar.rightIcon = statusbar:CreateTexture("$parent_RightIcon", "OVERLAY")
statusbar.rightIcon:SetSize(16, 16)
statusbar.rightIcon:SetPoint("RIGHT", statusbar, "RIGHT", 0, 0)
statusbar.rightIconMask = statusbar:CreateMaskTexture("$parent_RightIconMask", "artwork")
statusbar.rightIconMask:SetAllPoints(statusbar.rightIcon)
statusbar.rightIcon:AddMaskTexture(statusbar.rightIconMask)
statusbar.spark2 = statusbar:CreateTexture("$parent_Spark2", "OVERLAY")
statusbar.spark2:SetSize(32, 32)
statusbar.spark2:SetPoint("LEFT", statusbar, "RIGHT", -17, -1)
@@ -677,8 +669,6 @@ function DF:CreateCoolTip()
self:RegisterForClicks("LeftButtonDown")
self.leftIcon = self.statusbar.leftIcon
self.rightIcon = self.statusbar.rightIcon
self.leftIconMask = self.statusbar.leftIconMask
self.rightIconMask = self.statusbar.rightIconMask
self.texture = self.statusbar.texture
self.spark = self.statusbar.spark
self.spark2 = self.statusbar.spark2
@@ -1176,7 +1166,7 @@ function DF:CreateCoolTip()
--check if the texture passed is a texture object
if (type(leftIconSettings[1]) == "table" and leftIconSettings[1].GetObjectType and leftIconSettings[1]:GetObjectType() == "Texture") then
menuButton.leftIcon:SetSize(leftIconSettings[2], leftIconSettings[3])
menuButton.leftIcon:SetColorTexture(0.0156, 0.047, 0.1215, 1)
menuButton.leftIcon:SetTexture(0.0156, 0.047, 0.1215, 1)
textureObject = leftIconSettings[1]
textureObject:SetParent(menuButton.leftIcon:GetParent())
textureObject:ClearAllPoints()
@@ -1203,16 +1193,6 @@ function DF:CreateCoolTip()
textureObject:SetHeight(leftIconSettings[3])
textureObject:SetTexCoord(leftIconSettings[4], leftIconSettings[5], leftIconSettings[6], leftIconSettings[7])
if (leftIconSettings[10]) then
menuButton.leftIconMask:SetTexture(leftIconSettings[10])
else
if (DF.IsDragonflightAndBeyond()) then
menuButton.leftIconMask:SetTexture([[Interface\COMMON\common-iconmask]])
else
menuButton.leftIconMask:SetTexture([[Interface\CHATFRAME\chatframebackground]])
end
end
local colorRed, colorGreen, colorBlue, colorAlpha = DF:ParseColors(leftIconSettings[8])
textureObject:SetVertexColor(colorRed, colorGreen, colorBlue, colorAlpha)
@@ -1242,7 +1222,7 @@ function DF:CreateCoolTip()
--check if the texture passed is a texture object
if (type(rightIconSettings[1]) == "table" and rightIconSettings[1].GetObjectType and rightIconSettings[1]:GetObjectType() == "Texture") then
menuButton.rightIcon:SetSize(leftIconSettings[2], leftIconSettings[3])
menuButton.rightIcon:SetColorTexture(0.0156, 0.047, 0.1215, 1)
menuButton.rightIcon:SetTexture(0.0156, 0.047, 0.1215, 1)
textureObject = rightIconSettings[1]
textureObject:SetParent(menuButton)
@@ -1270,12 +1250,6 @@ function DF:CreateCoolTip()
menuButton.rightIcon:SetHeight(rightIconSettings[3])
menuButton.rightIcon:SetTexCoord(rightIconSettings[4], rightIconSettings[5], rightIconSettings[6], rightIconSettings[7])
if (rightIconSettings[10]) then
menuButton.rightIconMask:SetTexture(rightIconSettings[10])
else
menuButton.rightIconMask:SetTexture([[Interface\COMMON\common-iconmask]])
end
local colorRed, colorGreen, colorBlue, colorAlpha = DF:ParseColors(rightIconSettings[8])
menuButton.rightIcon:SetVertexColor(colorRed, colorGreen, colorBlue, colorAlpha)
@@ -1516,7 +1490,7 @@ function DF:CreateCoolTip()
if (DF:IsHtmlColor(texture) or type(texture) == "table") then
local color = texture
local r, g, b, a = DF:ParseColors(color)
wallpaper:SetColorTexture(r, g, b, a)
wallpaper:SetTexture(r, g, b, a)
else
wallpaper:SetTexture(texture)
end
@@ -1535,9 +1509,6 @@ function DF:CreateCoolTip()
wallpaper:SetDesaturated(true)
else
wallpaper:SetDesaturated(false)
if (wallpaperTable[8]) then
wallpaper:SetDesaturation(wallpaperTable[8])
end
end
wallpaper:Show()
@@ -1942,7 +1913,6 @@ function DF:CreateCoolTip()
function gameCooltip:SetSpellByID(spellId, bShowDescriptionOnly) --~spell
if (type(spellId) == "number") then
spellId = C_SpellBook.GetOverrideSpell(spellId)
local spellName, spellRank, spellIcon, castTime, minRange, maxRange = GetSpellInfo(spellId)
--castTime zero represents an instant cast or a channeled cast
if (spellName) then
@@ -2640,7 +2610,7 @@ function DF:CreateCoolTip()
menuType = gameCooltip:ParseMenuType(menuType)
if (menuType == CONST_MENU_TYPE_MAINMENU) then
frame1.frameBackgroundTexture:SetColorTexture(colorRed, colorGreen, colorBlue, colorAlpha)
frame1.frameBackgroundTexture:SetTexture(colorRed, colorGreen, colorBlue, colorAlpha)
--hide textures from older versions if exists
if (frame1.frameBackgroundLeft) then
@@ -2650,7 +2620,7 @@ function DF:CreateCoolTip()
end
elseif (menuType == CONST_MENU_TYPE_SUBMENU) then
frame2.frameBackgroundTexture:SetColorTexture(colorRed, colorGreen, colorBlue, colorAlpha)
frame2.frameBackgroundTexture:SetTexture(colorRed, colorGreen, colorBlue, colorAlpha)
--hide textures from older versions if exists
if (frame2.frameBackgroundLeft) then
@@ -2787,8 +2757,8 @@ function DF:CreateCoolTip()
frame1.frameBackgroundCenter:Hide()
end
frame1.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
frame2.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
frame1.frameBackgroundTexture:SetTexture(0, 0, 0, 0)
frame2.frameBackgroundTexture:SetTexture(0, 0, 0, 0)
if (not fromPreset) then
gameCooltip:Preset(3, true)
-15
View File
@@ -163,20 +163,6 @@
---@field TalentExporter table
---@field FormatNumber fun(number:number) : string abbreviate a number, e.g. 1000 -> 1k 1000 -> 1천, depending on the client language
---@field UnitGroupRolesAssigned fun(unitId: unit, bUseSupport:boolean?, specId: specializationid?) : string there's no self here
---@field IsDragonflight fun():boolean
---@field IsDragonflightAndBeyond fun():boolean
---@field IsTimewalkWoW fun():boolean
---@field IsClassicWow fun():boolean
---@field IsTBCWow fun():boolean
---@field IsWotLKWow fun():boolean
---@field IsCataWow fun():boolean
---@field IsPandaWow fun():boolean
---@field IsWarlordsWow fun():boolean
---@field IsLegionWow fun():boolean
---@field IsBFAWow fun():boolean
---@field IsShadowlandsWow fun():boolean
---@field IsDragonflightWow fun():boolean
---@field IsWarWow fun():boolean
---@field LoadSpellCache fun(self:table, hashMap:table, indexTable:table, allSpellsSameName:table) : hashMap:table, indexTable:table, allSpellsSameName:table load all spells in the game and add them into the passed tables
---@field UnloadSpellCache fun(self:table) wipe the table contents filled with LoadSpellCache()
---@field GetCurrentClassName fun(self:table) : string return the name of the class the player is playing
@@ -299,7 +285,6 @@
---@field ParseTexture fun(self:table, texture:texturepath|textureid|atlasname|atlasinfo, width: number?, height: number?, leftTexCoord: number?, rightTexCoord: number?, topTexCoord: number?, bottomTexCoord: number?, vertexRed:number|string?, vertexGreenvertexRed:number?, vertexBluevertexRed:number?, vertexAlphavertexRed:number?) : any, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?
---@field IsTexture fun(self:table, texture:any, bCheckTextureObject: boolean?) : boolean
---@field CreateAtlasString fun(self:table, atlas:atlasinfo|atlasname, textureHeight:number?, textureWidth:number?) : string
---@field SetMask fun(self:table, texture:texture, maskTexture:atlasname|texturepath|textureid|table) : nil
---@field GetClientRegion fun(self:table) : string
---@field GetBestFontPathForLanguage fun(self:table, languageId:string) : string
---@field SetTemplate fun(self:table, frame:uiobject, template:string)
+1 -1
View File
@@ -1455,7 +1455,7 @@ function DF:CreateNewDropdownFrame(parent, name)
local backgroundTexture = child:CreateTexture(nil, "background")
backgroundTexture:SetAllPoints()
backgroundTexture:SetColorTexture(0, 0, 0, 1)
backgroundTexture:SetTexture(0, 0, 0, 1)
local selected = child:CreateTexture("$parent_SelectedTexture", "BACKGROUND")
selected:SetSize(150, 16)
+7 -7
View File
@@ -379,7 +379,7 @@ detailsFramework.EditorMixin = {
}
for side, texture in pairs(self.moverGuideLines) do
texture:SetColorTexture(.8, .8, .8, 0.1)
texture:SetTexture(.8, .8, .8, 0.1)
texture:SetSize(1, 1)
texture:SetDrawLayer("overlay", 7)
texture:Hide()
@@ -456,7 +456,7 @@ detailsFramework.EditorMixin = {
editorFrame.AnchorFrames:SetNotInUseForAllAnchors()
--change the color of the anchor point to show it's selected
anchorFrame.Texture:SetColorTexture(1, 0, 0, 0.5)
anchorFrame.Texture:SetTexture(1, 0, 0, 0.5)
--get the object being edited in the editor
local object = editorFrame:GetEditingObject()
@@ -502,11 +502,11 @@ detailsFramework.EditorMixin = {
end,
SetNotInUse = function(self, anchorFrame)
anchorFrame.Texture:SetColorTexture(1, 1, 1, 0.5)
anchorFrame.Texture:SetTexture(1, 1, 1, 0.5)
end,
SetInUse = function(self, anchorFrame)
anchorFrame.Texture:SetColorTexture(1, 0, 0, 0.5)
anchorFrame.Texture:SetTexture(1, 0, 0, 0.5)
end,
CreateNineAnchors = function(self)
@@ -527,7 +527,7 @@ detailsFramework.EditorMixin = {
self.anchorFrames[i] = anchorFrame
anchorFrame.Texture = anchorFrame:CreateTexture("$parentTexture", "border")
anchorFrame.Texture:SetColorTexture(1, 1, 1, 0.5)
anchorFrame.Texture:SetTexture(1, 1, 1, 0.5)
anchorFrame.Texture:SetAllPoints(anchorFrame)
end
end,
@@ -671,7 +671,7 @@ detailsFramework.EditorMixin = {
end
movers.ObjectBackgroundTexture = movers[1]:CreateTexture("$parentMoverObjectBackground", "artwork")
movers.ObjectBackgroundTexture:SetColorTexture(1, 1, 1, 0.25)
movers.ObjectBackgroundTexture:SetTexture(1, 1, 1, 0.25)
return movers
end,
@@ -1226,7 +1226,7 @@ detailsFramework.EditorMixin = {
detailsFramework:ReskinSlider(selectObjectScrollBox)
local selectionTexture = selectObjectScrollBox:CreateTexture(nil, "overlay")
selectionTexture:SetColorTexture(1, 1, 0, 0.2)
selectionTexture:SetTexture(1, 1, 0, 0.2)
selectObjectScrollBox.SelectionTexture = selectionTexture
function selectObjectScrollBox:RefreshMe()
+2 -19
View File
@@ -3,10 +3,6 @@ if (not detailsFramework) then
return
end
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
detailsFramework.CastInfo = detailsFramework.CastInfo or {}
--NOTE: This NEEDs a chance to run, as Plater is depending on this working and LibCC is not bundled neccessarily in other addons.
@@ -94,21 +90,8 @@ function detailsFramework:LoadLCC(LibCC)
end
end
if IS_WOW_PROJECT_CLASSIC_ERA and false then --disable this for now, as it appears to be working now through API changes...
local LibCC = LibStub("LibClassicCasterino", true)
if (LibCC and not _G.DetailsFrameworkLCCLoaded) then
detailsFramework:LoadLCC(LibCC)
_G.DetailsFrameworkLCCLoaded = true
elseif not LibCC then
detailsFramework.CastInfo.UnitCastingInfo = CastingInfo
detailsFramework.CastInfo.UnitChannelInfo = ChannelInfo
end
else -- end classic era
detailsFramework.CastInfo.UnitCastingInfo = UnitCastingInfo
detailsFramework.CastInfo.UnitChannelInfo = UnitChannelInfo
end
detailsFramework.CastInfo.UnitCastingInfo = UnitCastingInfo
detailsFramework.CastInfo.UnitChannelInfo = UnitChannelInfo
if (not DetailsFrameworkCanLoad) then
+5 -40
View File
@@ -26,15 +26,6 @@ local setCornerPoints = function(self, textures, width, height, xOffset, yOffset
thisTexture:SetSize(width or 16, height or 16)
thisTexture:SetTexture(self.options.corner_texture)
--set the mask
if (not thisTexture.MaskTexture and bIsBorder) then
thisTexture.MaskTexture = self:CreateMaskTexture(nil, "background")
thisTexture.MaskTexture:SetSize(74, 64)
thisTexture:AddMaskTexture(thisTexture.MaskTexture)
thisTexture.MaskTexture:SetTexture([[Interface\Azerite\AzeriteGoldRingRank2]]) --1940690
--thisTexture.MaskTexture:Hide()
end
xOffset = xOffset or 0
yOffset = yOffset or 0
@@ -44,30 +35,18 @@ local setCornerPoints = function(self, textures, width, height, xOffset, yOffset
if (cornerName == "TopLeft") then
thisTexture:SetTexCoord(0, 0.5, 0, 0.5)
thisTexture:SetPoint(cornerName, self, cornerName, -xOffset, yOffset)
if (thisTexture.MaskTexture) then
thisTexture.MaskTexture:SetPoint(cornerName, self, cornerName, -18-xOffset, 16+yOffset)
end
elseif (cornerName == "TopRight") then
thisTexture:SetTexCoord(0.5, 1, 0, 0.5)
thisTexture:SetPoint(cornerName, self, cornerName, xOffset, yOffset)
if (thisTexture.MaskTexture) then
thisTexture.MaskTexture:SetPoint(cornerName, self, cornerName, -18+xOffset, 16+yOffset)
end
elseif (cornerName == "BottomLeft") then
thisTexture:SetTexCoord(0, 0.5, 0.5, 1)
thisTexture:SetPoint(cornerName, self, cornerName, -xOffset, -yOffset)
if (thisTexture.MaskTexture) then
thisTexture.MaskTexture:SetPoint(cornerName, self, cornerName, -18-xOffset, 16-yOffset)
end
elseif (cornerName == "BottomRight") then
thisTexture:SetTexCoord(0.5, 1, 0.5, 1)
thisTexture:SetPoint(cornerName, self, cornerName, xOffset, -yOffset)
if (thisTexture.MaskTexture) then
thisTexture.MaskTexture:SetPoint(cornerName, self, cornerName, -18+xOffset, 16-yOffset)
end
end
end
end
@@ -95,7 +74,7 @@ detailsFramework.RoundedCornerPanelMixin = {
topHorizontalEdge:SetPoint("bottomleft", self.CornerTextures["TopLeft"], "bottomright", 0, 0)
topHorizontalEdge:SetPoint("topright", self.CornerTextures["TopRight"], "topleft", 0, 0)
topHorizontalEdge:SetPoint("bottomright", self.CornerTextures["TopRight"], "bottomleft", 0, 0)
topHorizontalEdge:SetColorTexture(unpack(defaultColorTable))
topHorizontalEdge:SetTexture(unpack(defaultColorTable))
--create the bottom texture which connects the bottom corners with a horizontal line
---@type texture
@@ -104,7 +83,7 @@ detailsFramework.RoundedCornerPanelMixin = {
bottomHorizontalEdge:SetPoint("bottomleft", self.CornerTextures["BottomLeft"], "bottomright", 0, 0)
bottomHorizontalEdge:SetPoint("topright", self.CornerTextures["BottomRight"], "topleft", 0, 0)
bottomHorizontalEdge:SetPoint("bottomright", self.CornerTextures["BottomRight"], "bottomleft", 0, 0)
bottomHorizontalEdge:SetColorTexture(unpack(defaultColorTable))
bottomHorizontalEdge:SetTexture(unpack(defaultColorTable))
--create the center block which connects the bottom left of the topleft corner with the top right of the bottom right corner
---@type texture
@@ -113,7 +92,7 @@ detailsFramework.RoundedCornerPanelMixin = {
centerBlock:SetPoint("bottomleft", self.CornerTextures["BottomLeft"], "topleft", 0, 0)
centerBlock:SetPoint("topright", self.CornerTextures["BottomRight"], "topright", 0, 0)
centerBlock:SetPoint("bottomright", self.CornerTextures["BottomRight"], "topright", 0, 0)
centerBlock:SetColorTexture(unpack(defaultColorTable))
centerBlock:SetTexture(unpack(defaultColorTable))
self.CenterTextures[#self.CenterTextures+1] = topHorizontalEdge
self.CenterTextures[#self.CenterTextures+1] = bottomHorizontalEdge
@@ -251,7 +230,6 @@ detailsFramework.RoundedCornerPanelMixin = {
if (self.bHasBorder) then
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture:SetSize(cornerWidth-self.cornerRoundness, cornerHeight-self.cornerRoundness)
thisTexture.MaskTexture:SetSize(74-(self.cornerRoundness*0.75), 64-self.cornerRoundness)
end
local horizontalEdgesNewSize = self:CalculateBorderEdgeSize("horizontal")
@@ -300,7 +278,7 @@ detailsFramework.RoundedCornerPanelMixin = {
---@type texture
local newBorderTexture = self:CreateTexture(nil, "background", nil, 0)
self.BorderCornerTextures[cornerNames[i]] = newBorderTexture
newBorderTexture:SetColorTexture(unpack(defaultColorTable))
newBorderTexture:SetTexture(unpack(defaultColorTable))
newBorderTexture:SetVertexColor(r, g, b, a)
self[cornerNames[i] .. "Border"] = newBorderTexture
end
@@ -341,7 +319,7 @@ detailsFramework.RoundedCornerPanelMixin = {
for edgeName, thisTexture in pairs(self.BorderEdgeTextures) do
---@cast thisTexture texture
thisTexture:SetColorTexture(unpack(defaultColorTable))
thisTexture:SetTexture(unpack(defaultColorTable))
thisTexture:SetVertexColor(r, g, b, a)
end
@@ -401,19 +379,6 @@ detailsFramework.RoundedCornerPanelMixin = {
for _, thisTexture in pairs(self.CenterTextures) do
thisTexture:SetVertexColor(red, green, blue, alpha)
end
if (self.bHasBorder) then
if (alpha < 0.98) then
--if using borders, the two border textures overlaps making the alpha be darker than it should
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture.MaskTexture:Show()
end
else
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture.MaskTexture:Hide()
end
end
end
end,
}
+144 -559
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -267,7 +267,7 @@ detailsFramework.HeaderMixin = {
if (self.options.use_line_separators) then
columnHeader.Separator:Show()
columnHeader.Separator:SetWidth(self.options.line_separator_width)
columnHeader.Separator:SetColorTexture(unpack(self.options.line_separator_color))
columnHeader.Separator:SetTexture(unpack(self.options.line_separator_color))
columnHeader.Separator:ClearAllPoints()
if (self.options.line_separator_gap_align) then
@@ -285,7 +285,7 @@ detailsFramework.HeaderMixin = {
if (self.options.use_line_separators) then
columnHeader.Separator:Show()
columnHeader.Separator:SetWidth(self.options.line_separator_width)
columnHeader.Separator:SetColorTexture(unpack(self.options.line_separator_color))
columnHeader.Separator:SetTexture(unpack(self.options.line_separator_color))
columnHeader.Separator:ClearAllPoints()
if (self.options.line_separator_gap_align) then
@@ -555,7 +555,7 @@ detailsFramework.HeaderMixin = {
resizerButton.texture = resizerButton:CreateTexture(nil, "overlay")
resizerButton.texture:SetAllPoints()
resizerButton.texture:SetColorTexture(1, 1, 1, 1)
resizerButton.texture:SetTexture(1, 1, 1, 1)
local xOffset = self.options.reziser_shown and -5 or -1
columnHeader.Arrow:SetPoint("right", columnHeader, "right", xOffset, 0)
+2 -2
View File
@@ -142,7 +142,7 @@ detailsFramework.IconMixin = {
---@type texture
iconFrame.Border = iconFrame:CreateTexture(nil, "background")
iconFrame.Border:SetAllPoints()
iconFrame.Border:SetColorTexture(0, 0, 0)
iconFrame.Border:SetTexture(0, 0, 0)
---@type fontstring
iconFrame.StackText = iconFrame:CreateFontString(nil, "overlay", "GameFontNormal")
@@ -274,7 +274,7 @@ detailsFramework.IconMixin = {
iconFrame:SetBackdropBorderColor(0, 0, 0 ,0)
end
--iconFrame.Border:SetColorTexture(0, 0, 0, 1)
--iconFrame.Border:SetTexture(0, 0, 0, 1)
if (startTime) then
CooldownFrame_Set(iconFrame.Cooldown, startTime, duration, true, true, modRate)
+1 -5
View File
@@ -149,7 +149,7 @@ detailsFramework.IconGenericMixin = {
---@type texture
newIcon.Border = newIcon:CreateTexture(nil, "background")
newIcon.Border:SetAllPoints()
newIcon.Border:SetColorTexture(0, 0, 0)
newIcon.Border:SetTexture(0, 0, 0)
---@type fontstring
newIcon.StackText = newIcon:CreateFontString(nil, "overlay", "GameFontNormal")
@@ -393,13 +393,9 @@ detailsFramework.IconGenericMixin = {
end
end
iconFrame:SetIgnoreParentAlpha(false)
if (iconSettings.color) then
local r, g, b, a = detailsFramework:ParseColors(iconSettings.color)
iconFrame.Texture:SetVertexColor(r, g, b, a)
--ignore the param alpha has the settings might have an alpha for it
iconFrame:SetIgnoreParentAlpha(true)
else
iconFrame.Texture:SetVertexColor(1, 1, 1, 1)
end
+1 -11
View File
@@ -7,18 +7,8 @@ end
--namespace
detailsFramework.Items = {}
local containerAPIVersion = 1
if (detailsFramework.IsDragonflightAndBeyond()) then
containerAPIVersion = 2
end
function detailsFramework.Items.GetContainerItemInfo(containerIndex, slotIndex)
if (containerAPIVersion == 2 and C_Container and C_Container.GetContainerItemInfo) then
local itemInfo = C_Container.GetContainerItemInfo(containerIndex, slotIndex)
return itemInfo.iconFileID, itemInfo.stackCount, itemInfo.isLocked, itemInfo.quality, itemInfo.isReadable, itemInfo.hasLoot, itemInfo.hyperlink, itemInfo.isFiltered, itemInfo.hasNoValue, itemInfo.itemID, itemInfo.isBound
else
return GetContainerItemInfo(containerIndex, slotIndex)
end
return GetContainerItemInfo(containerIndex, slotIndex)
end
function detailsFramework.Items.IsItemSoulbound(containerIndex, slotIndex)
+4 -4
View File
@@ -864,14 +864,14 @@ detailsFramework.KeybindMixin = {
line.backgroundTexture:SetAllPoints()
if (index % 2 == 0) then
line.backgroundTexture:SetColorTexture(0, 0, 0, 0.1)
line.backgroundTexture:SetTexture(0, 0, 0, 0.1)
else
line.backgroundTexture:SetColorTexture(0, 0, 0, 0)
line.backgroundTexture:SetTexture(0, 0, 0, 0)
end
line.highlightTexture = line:CreateTexture(nil, "border")
line.highlightTexture:SetAllPoints()
line.highlightTexture:SetColorTexture(1, 1, 1, .1)
line.highlightTexture:SetTexture(1, 1, 1, .1)
line.highlightTexture:Hide()
line:SetScript("OnEnter", keyBindFrame.OnEnterScrollLine)
@@ -1372,7 +1372,7 @@ detailsFramework.KeybindMixin = {
detailsFramework:ReskinSlider(editMacroEditBox.scroll)
editMacroEditBox:SetPoint("topleft", editMacroText, "bottomleft", 0, -5)
editMacroEditBox["Center"]:SetColorTexture(.1, .1, .1, .834)
editMacroEditBox["Center"]:SetTexture(.1, .1, .1, .834)
local saveButtonCallback = function()
local bIsEditing, actionIdentifier, keybindTable = self:IsEditingKeybindSettings()
+25 -431
View File
@@ -17,15 +17,10 @@ local CreateFrame = CreateFrame ---@diagnostic disable-line
local UnitIsUnit = UnitIsUnit ---@diagnostic disable-line
local UnitClass = UnitClass ---@diagnostic disable-line
local GetInstanceInfo = GetInstanceInfo ---@diagnostic disable-line
local C_ChallengeMode = C_ChallengeMode ---@diagnostic disable-line
local C_Map = C_Map ---@diagnostic disable-line
local GetTalentInfoByID = GetTalentInfoByID ---@diagnostic disable-line
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE ---@diagnostic disable-line
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE ---@diagnostic disable-line
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC ---@diagnostic disable-line
local PixelUtil = PixelUtil or DFPixelUtil ---@diagnostic disable-line
local PixelUtil = PixelUtil
local UnitGroupRolesAssigned = detailsFramework.UnitGroupRolesAssigned
local loadConditionsFrame
@@ -100,15 +95,9 @@ local default_load_conditions_frame_options = {
function detailsFramework:CreateLoadFilterParser(callback)
local filterFrame = CreateFrame("frame")
if IS_WOW_PROJECT_MAINLINE then
filterFrame:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
filterFrame:RegisterEvent("TRAIT_CONFIG_LIST_UPDATED")
filterFrame:RegisterEvent("CHALLENGE_MODE_START")
else
filterFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
filterFrame:RegisterEvent("PLAYER_TALENT_UPDATE")
end
filterFrame:RegisterEvent("MYTHIC_PLUS_STARTED")
filterFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
filterFrame:RegisterEvent("ASCENSION_KNOWN_ENTRIES_CHANGED")
filterFrame:RegisterEvent("PLAYER_ROLES_ASSIGNED")
filterFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
@@ -117,47 +106,11 @@ function detailsFramework:CreateLoadFilterParser(callback)
filterFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
filterFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
filterFrame:RegisterEvent("CHAT_MSG_LOOT")
filterFrame:SetScript("OnEvent", function(self, event, ...)
if (event == "ENCOUNTER_START") then --triggers before regen_disabled
local encounterID = ...
filterFrame.EncounterIDCached = encounterID
elseif (event == "CHAT_MSG_LOOT") then
local message = ...
local itemId = message:match("|Hitem:(%d+):")
itemId = tonumber(itemId)
if (itemId == 191140) then
xpcall(callback, geterrorhandler(), "RACE_START")
--monitor the player backpack each second to know when the item is removed from the bag
C_Timer.After(5, function()
filterFrame.FindBackpackItem = C_Timer.NewTicker(1, function()
local bFoundItem = false
for bagId = 0, 4 do
for slotId = 1, 32 do
local bagItemID = C_Container.GetContainerItemID(bagId, slotId)
if (bagItemID) then
if (bagItemID == itemId) then
--bronze timepiece is on the player backpack
return
end
end
end
end
if (not bFoundItem) then
filterFrame.FindBackpackItem:Cancel()
xpcall(callback, geterrorhandler(), "RACE_STOP")
return
end
end)
end)
end
return
elseif (event == "PLAYER_REGEN_DISABLED") then
elseif (event == "ENCOUNTER_END") then
@@ -167,7 +120,7 @@ function detailsFramework:CreateLoadFilterParser(callback)
--f.EncounterIDCached = nil
--when the player dies during an encounter, the game is triggering regen enabled
elseif (event == "PLAYER_SPECIALIZATION_CHANGED") then
elseif (event == "ASCENSION_KNOWN_ENTRIES_CHANGED") then
if (loadConditionsFrame and loadConditionsFrame:IsShown()) then
loadConditionsFrame:Refresh()
end
@@ -210,39 +163,6 @@ function detailsFramework:PassLoadFilters(loadTable, encounterID)
end
end
--spec
if (IS_WOW_PROJECT_MAINLINE and loadTable.spec.Enabled) then
local canCheckTalents = true
if (passLoadClass) then
--if is allowed to load on this class, check if the talents isn't from another class
local _, classFileName = UnitClass("player")
local specsForThisClass = detailsFramework:GetClassSpecIDs(classFileName)
canCheckTalents = false
for _, specID in ipairs(specsForThisClass) do
if (loadTable.spec[specID] or loadTable.spec[specID..""]) then
--theres a talent for this class
canCheckTalents = true
break
end
end
end
if (canCheckTalents) then
local specIndex = DetailsFramework.GetSpecialization()
if (specIndex) then
local specID = DetailsFramework.GetSpecializationInfo(specIndex)
if not specID or(not loadTable.spec[specID] and not loadTable.spec[specID .. ""]) then
return false, _G["SPECIALIZATION"]
end
else
return false, _G["SPECIALIZATION"]
end
end
end
--race
if (loadTable.race.Enabled) then
local raceName, raceFileName, raceID = UnitRace("player")
@@ -251,40 +171,6 @@ function detailsFramework:PassLoadFilters(loadTable, encounterID)
end
end
--talents
if (IS_WOW_PROJECT_MAINLINE and loadTable.talent.Enabled) then
local bOnlySelected, bUseHashTable = true, true
local talentsInUse = detailsFramework:GetCharacterTalents(bOnlySelected, bUseHashTable)
local hasTalent
for talentId in pairs(talentsInUse) do
if talentId and(loadTable.talent[talentId] or loadTable.talent[talentId .. ""]) then
hasTalent = true
break
end
end
if (not hasTalent) then
return false, _G["TALENTS"]
end
end
--pvptalent
if (IS_WOW_PROJECT_MAINLINE and loadTable.pvptalent.Enabled) then
local talentsInUse = detailsFramework:GetCharacterPvPTalents(false, true)
local hasTalent
for talentID, _ in pairs(talentsInUse) do
if talentID and(loadTable.pvptalent [talentID] or loadTable.pvptalent [talentID .. ""]) then
hasTalent = true
break
end
end
if (not hasTalent) then
return false, (_G["PVP"] or "") .. " " .. (_G["TALENTS"] or "")
end
end
--group
if (loadTable.group.Enabled) then
local _, zoneType = GetInstanceInfo()
@@ -308,15 +194,15 @@ function detailsFramework:PassLoadFilters(loadTable, encounterID)
end
--affix
if (IS_WOW_PROJECT_MAINLINE and loadTable.affix.Enabled) then
local isInMythicDungeon = C_ChallengeMode.IsChallengeModeActive()
if (loadTable.affix.Enabled) then
local isInMythicDungeon = C_MythicPlus.IsKeystoneActive()
if (not isInMythicDungeon) then
return false, "M+ Affix"
end
local level, affixes, wasEnergized = C_ChallengeMode.GetActiveKeystoneInfo()
local activeKeystone = C_MythicPlus.GetActiveKeystoneInfo()
local hasAffix = false
for _, affixID in ipairs(affixes) do
for _, affixID in ipairs(activeKeystone.activeAffixes) do
if affixID and(loadTable.affix[affixID] or loadTable.affix[affixID .. ""]) then
hasAffix = true
break
@@ -460,26 +346,6 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
classGroup.DBKey = "class"
table.insert(loadConditionsFrame.AllRadioGroups, classGroup)
--create the radio group for character spec
if IS_WOW_PROJECT_MAINLINE then
local specs = {}
for _, specID in ipairs(detailsFramework:GetClassSpecIDs(select(2, UnitClass("player")))) do
local specID, specName, specDescription, specIcon, specBackground, specRole, specClass = DetailsFramework.GetSpecializationInfoByID(specID)
table.insert(specs, {
name = specName,
set = loadConditionsFrame.OnRadioCheckboxClick,
param = specID,
get = function() return loadConditionsFrame.OptionsTable.spec[specID] or loadConditionsFrame.OptionsTable.spec[specID..""] end,
texture = specIcon,
})
end
local specGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, specs, nil, {width = 200, height = 200, title = "Character Spec", backdrop_color = {0, 0, 0, 0}}, {offset_x = 120, amount_per_line = 4})
specGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.spec[1], anchorPositions.spec[2])
specGroup.DBKey = "spec"
table.insert(loadConditionsFrame.AllRadioGroups, specGroup)
end
--create radio group for character races
local raceList = {}
for _, raceTable in ipairs(detailsFramework:GetCharacterRaceList()) do
@@ -496,221 +362,6 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
raceGroup.DBKey = "race"
table.insert(loadConditionsFrame.AllRadioGroups, raceGroup)
--create radio group for talents
if IS_WOW_PROJECT_MAINLINE then
--[=[ 7.0 to 9.0 talents schema
local talentList = {}
for _, talentTable in ipairs(detailsFramework:GetCharacterTalents()) do
if talentTable.ID then
table.insert(talentList, {
name = talentTable.Name:sub(1, 15),
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.talent[talentTable.ID] or loadConditionsFrame.OptionsTable.talent[talentTable.ID .. ""] end,
texture = talentTable.Texture,
})
end
end
--]=]
--10.0 talents schema
local talentList = {}
local talentGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, talentList, nil, {width = 200, height = 200, title = "Character Talents", backdrop_color = {0, 0, 0, 0}}, {offset_x = 64, amount_per_line = 16})
talentGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.talent[1], anchorPositions.talent[2])
talentGroup.DBKey = "talent"
table.insert(loadConditionsFrame.AllRadioGroups, talentGroup)
loadConditionsFrame.TalentGroup = talentGroup
do
if (false) then --disabled, isn't in use
--create a frame to show talents selected in other specs or characters
local otherTalents = CreateFrame("frame", nil, loadConditionsFrame, "BackdropTemplate")
otherTalents:SetSize(26, 26)
otherTalents:SetPoint("left", talentGroup.Title.widget, "right", 10, -2)
otherTalents.Texture = detailsFramework:CreateImage(otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
otherTalents.Texture:SetAllPoints()
local removeTalent = function(_, _, talentID)
loadConditionsFrame.OptionsTable.talent[talentID] = nil
GameCooltip2:Hide()
loadConditionsFrame.OnRadioStateChanged(talentGroup, loadConditionsFrame.OptionsTable[talentGroup.DBKey])
--loadConditionsFrame.CanShowTalentWarning()
end
local buildTalentMenu = function()
local playerTalents = detailsFramework:GetCharacterTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
table.insert(indexedTalents, talentTable.ID)
end
--talents selected to load
GameCooltip2:AddLine("select a talent to remove it (added from a different spec or character)", "", 1, "orange", "orange", 9)
GameCooltip2:AddLine("$div", nil, nil, -1, -1)
for talentID, _ in pairs(loadConditionsFrame.OptionsTable.talent) do
if (type(talentID) == "number" and not detailsFramework.table.find(indexedTalents, talentID)) then
local talentID, name, texture, selected, available = GetTalentInfoByID(talentID)
if (name) then
GameCooltip2:AddLine(name)
GameCooltip2:AddIcon(texture, 1, 1, 16, 16, .1, .9, .1, .9)
GameCooltip2:AddMenu(1, removeTalent, talentID)
end
end
end
end
otherTalents.CoolTip = {
Type = "menu",
BuildFunc = buildTalentMenu,
OnEnterFunc = function(self) end,
OnLeaveFunc = function(self) end,
FixedValue = "none",
ShowSpeed = 0.05,
Options = function()
GameCooltip2:SetOption("TextFont", "Friz Quadrata TT")
GameCooltip2:SetOption("TextColor", "orange")
GameCooltip2:SetOption("TextSize", 12)
GameCooltip2:SetOption("FixedWidth", 220)
GameCooltip2:SetOption("ButtonsYMod", -4)
GameCooltip2:SetOption("YSpacingMod", -4)
GameCooltip2:SetOption("IgnoreButtonAutoHeight", true)
GameCooltip2:SetColor(1, 0.5, 0.5, 0.5, 0)
local preset2_backdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true, edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local gray_table = {0.37, 0.37, 0.37, 0.95}
local black_table = {0.2, 0.2, 0.2, 1}
GameCooltip2:SetBackdrop(1, preset2_backdrop, gray_table, black_table)
GameCooltip2:SetBackdrop(2, preset2_backdrop, gray_table, black_table)
end,
}
GameCooltip2:CoolTipInject(otherTalents)
--[=[
function loadConditionsFrame.CanShowTalentWarning() --not in use
local playerTalents = detailsFramework:GetCharacterTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
table.insert(indexedTalents, talentTable.ID)
end
for talentID, _ in pairs(loadConditionsFrame.OptionsTable.talent) do
if (type(talentID) == "number" and not detailsFramework.table.find(indexedTalents, talentID)) then
otherTalents:Show()
return
end
end
otherTalents:Hide()
end
--]=]
end
end
end
--create radio group for pvp talents
if IS_WOW_PROJECT_MAINLINE then
local pvpTalentList = {}
for _, talentTable in ipairs(detailsFramework:GetCharacterPvPTalents()) do
table.insert(pvpTalentList, {
name = talentTable.Name:sub(1, 15),
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.pvptalent [talentTable.ID] or loadConditionsFrame.OptionsTable.pvptalent [talentTable.ID .. ""] end,
texture = talentTable.Texture,
})
end
local pvpTalentGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, pvpTalentList, nil, {width = 200, height = 200, title = "Characer PvP Talents", backdrop_color = {0, 0, 0, 0}}, {offset_x = 160, amount_per_line = 3})
pvpTalentGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.pvptalent [1], anchorPositions.pvptalent [2])
pvpTalentGroup.DBKey = "pvptalent"
table.insert(loadConditionsFrame.AllRadioGroups, pvpTalentGroup)
loadConditionsFrame.PvPTalentGroup = pvpTalentGroup
do
if (false) then
--create a frame to show talents selected in other specs or characters
local otherTalents = CreateFrame("frame", nil, loadConditionsFrame, "BackdropTemplate")
otherTalents:SetSize(26, 26)
otherTalents:SetPoint("left", pvpTalentGroup.Title.widget, "right", 10, -2)
otherTalents.Texture = detailsFramework:CreateImage(otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
otherTalents.Texture:SetAllPoints()
local removeTalent = function(_, _, talentID)
loadConditionsFrame.OptionsTable.pvptalent [talentID] = nil
GameCooltip2:Hide()
loadConditionsFrame.OnRadioStateChanged(pvpTalentGroup, loadConditionsFrame.OptionsTable [pvpTalentGroup.DBKey])
--loadConditionsFrame.CanShowPvPTalentWarning()
end
local buildTalentMenu = function()
local playerTalents = detailsFramework:GetCharacterPvPTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
table.insert(indexedTalents, talentTable.ID)
end
--talents selected to load
GameCooltip2:AddLine("select a talent to remove it(added from a different spec or character)", "", 1, "orange", "orange", 9)
GameCooltip2:AddLine("$div", nil, nil, -1, -1)
for talentID, _ in pairs(loadConditionsFrame.OptionsTable.pvptalent) do
if (type(talentID) == "number" and not detailsFramework.table.find(indexedTalents, talentID)) then
local _, name, texture = GetPvpTalentInfoByID(talentID)
if (name) then
GameCooltip2:AddLine(name)
GameCooltip2:AddIcon(texture, 1, 1, 16, 16, .1, .9, .1, .9)
GameCooltip2:AddMenu(1, removeTalent, talentID)
end
end
end
end
otherTalents.CoolTip = {
Type = "menu",
BuildFunc = buildTalentMenu,
OnEnterFunc = function(self) end,
OnLeaveFunc = function(self) end,
FixedValue = "none",
ShowSpeed = 0.05,
Options = function()
GameCooltip2:SetOption("TextFont", "Friz Quadrata TT")
GameCooltip2:SetOption("TextColor", "orange")
GameCooltip2:SetOption("TextSize", 12)
GameCooltip2:SetOption("FixedWidth", 220)
GameCooltip2:SetOption("ButtonsYMod", -4)
GameCooltip2:SetOption("YSpacingMod", -4)
GameCooltip2:SetOption("IgnoreButtonAutoHeight", true)
GameCooltip2:SetColor(1, 0.5, 0.5, 0.5, 0)
local preset2_backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true, edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local gray_table = {0.37, 0.37, 0.37, 0.95}
local black_table = {0.2, 0.2, 0.2, 1}
GameCooltip2:SetBackdrop(1, preset2_backdrop, gray_table, black_table)
GameCooltip2:SetBackdrop(2, preset2_backdrop, gray_table, black_table)
end,
}
GameCooltip2:CoolTipInject(otherTalents)
function loadConditionsFrame.CanShowPvPTalentWarning()
local playerTalents = detailsFramework:GetCharacterPvPTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
table.insert(indexedTalents, talentTable.ID)
end
for talentID, _ in pairs(loadConditionsFrame.OptionsTable.pvptalent) do
if (type(talentID) == "number" and not detailsFramework.table.find(indexedTalents, talentID)) then
otherTalents:Show()
return
end
end
otherTalents:Hide()
end
--]=]
end
end
end
--create radio for group types
local groupTypes = {}
for _, groupTable in ipairs(detailsFramework:GetGroupTypes()) do
@@ -743,26 +394,24 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
table.insert(loadConditionsFrame.AllRadioGroups, roleTypesGroup)
--create radio group for mythic+ affixes
if IS_WOW_PROJECT_MAINLINE then
local affixes = {}
for i = 2, 1000 do
local affixName, desc, texture = C_ChallengeMode.GetAffixInfo(i)
if (affixName and not deprecatedAffixes[i]) then
table.insert(affixes, {
name = affixName,
set = loadConditionsFrame.OnRadioCheckboxClick,
param = i,
get = function() return loadConditionsFrame.OptionsTable.affix[i] or loadConditionsFrame.OptionsTable.affix[i .. ""] end,
texture = texture,
})
end
local affixes = {}
for _, affixID in ipairs(C_MythicPlus.GetCurrentAffixes()) do
local affixName, desc, texture = GetSpellInfo(affixID)
if (affixName and not deprecatedAffixes[affixID]) then
table.insert(affixes, {
name = affixName,
set = loadConditionsFrame.OnRadioCheckboxClick,
param = affixID,
get = function() return loadConditionsFrame.OptionsTable.affix[affixID] or loadConditionsFrame.OptionsTable.affix[affixID .. ""] end,
texture = texture,
})
end
local affixTypesGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, affixes, nil, {width = 200, height = 200, title = "M+ Affixes", backdrop_color = {0, 0, 0, 0}}, {offset_x = 125})
affixTypesGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.affix [1], anchorPositions.affix [2])
affixTypesGroup.DBKey = "affix"
table.insert(loadConditionsFrame.AllRadioGroups, affixTypesGroup)
end
local affixTypesGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, affixes, nil, {width = 200, height = 200, title = "M+ Affixes", backdrop_color = {0, 0, 0, 0}}, {offset_x = 125})
affixTypesGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.affix [1], anchorPositions.affix [2])
affixTypesGroup.DBKey = "affix"
table.insert(loadConditionsFrame.AllRadioGroups, affixTypesGroup)
--text entries functions
local textEntryRefresh = function(self)
@@ -818,56 +467,6 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
table.insert(loadConditionsFrame.AllTextEntries, mapIDEditbox)
function loadConditionsFrame.Refresh(self)
if IS_WOW_PROJECT_MAINLINE then
---@type {Name: string, ID: number, Texture: any, IsSelected: boolean}[]
local allTalents = detailsFramework:GetAllTalents()
local talentList = {}
for _, talentTable in ipairs(allTalents) do
if (talentTable.ID) then
table.insert(talentList, {
name = "", --talentTable.Name:sub(1, 15),
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.talent[talentTable.ID] or loadConditionsFrame.OptionsTable.talent[talentTable.ID .. ""] end,
texture = talentTable.Texture,
tooltip = talentTable.Name,
})
end
end
--[=[]]
--update the talents(might have changed if the player changed its specializationid)
local talentList = {}
for _, talentTable in ipairs(detailsFramework:GetCharacterTalents()) do
if talentTable.ID then
table.insert(talentList, {
name = talentTable.Name,
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.talent [talentTable.ID] or loadConditionsFrame.OptionsTable.talent [talentTable.ID .. ""] end,
texture = talentTable.Texture,
})
end
end
--]=]
loadConditionsFrame.TalentGroup:SetOptions(talentList)
end
if IS_WOW_PROJECT_MAINLINE then
local pvpTalentList = {}
for _, talentTable in ipairs(detailsFramework:GetCharacterPvPTalents()) do
table.insert(pvpTalentList, {
name = talentTable.Name:sub(1, 15),
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.pvptalent [talentTable.ID] or loadConditionsFrame.OptionsTable.pvptalent [talentTable.ID .. ""] end,
texture = talentTable.Texture,
})
end
loadConditionsFrame.PvPTalentGroup:SetOptions(pvpTalentList)
end
--refresh the radio group
for _, radioGroup in ipairs(loadConditionsFrame.AllRadioGroups) do
radioGroup:Refresh()
@@ -878,11 +477,6 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
for _, textEntry in ipairs(loadConditionsFrame.AllTextEntries) do
textEntry:Refresh()
end
if IS_WOW_PROJECT_MAINLINE then
--loadConditionsFrame.CanShowTalentWarning()
--loadConditionsFrame.CanShowPvPTalentWarning()
end
end
end
+1 -1
View File
@@ -113,7 +113,7 @@ function DF.Math.GetNinePoints(object)
local point = ninePoints[i]
local t = f:CreateTexture(nil, "overlay")
t:SetColorTexture(1, 0, 0, 1)
t:SetTexture(1, 0, 0, 1)
t:SetSize(2, 2)
t:SetPoint("bottomleft", UIParent, "bottomleft", point.x, point.y)
end
+5 -129
View File
@@ -738,13 +738,6 @@ detailsFramework.ValueMixin = {
---@field GetTexCoord fun(self: table) : number, number, number, number
---@field SetColor fun(self: table, ...)
---@field GetColor fun(self: table) : number, number, number, number
---@field SetMaskTexture fun(self: table, texture: string)
---@field GetMaskTexture fun(self: table) : string
---@field SetMaskTexCoord fun(self: table, ...)
---@field GetMaskTexCoord fun(self: table) : number, number, number, number
---@field SetMaskAtlas fun(self: table, atlasName: string)
---@field GetMaskAtlas fun(self: table) : string
---@field AddMaskTexture fun(self: table, texture: string)
---@field SetBorderTexture fun(self: table, texture: string)
---@field GetBorderTexture fun(self: table) : string
---@field SetBorderColor fun(self: table, ...)
@@ -775,7 +768,7 @@ detailsFramework.StatusBarFunctions = {
end,
SetDesaturation = function(self, desaturationAmount)
self.barTexture:SetDesaturation(desaturationAmount)
self.barTexture:SetDesaturated(desaturationAmount > 0.5 and true or false)
end,
IsDesaturated = function(self)
@@ -817,136 +810,19 @@ detailsFramework.StatusBarFunctions = {
return self:GetStatusBarColor()
end,
SetMaskTexture = function(self, ...)
if (not self:HasTextureMask()) then
return
end
self.barTextureMask:SetTexture(...)
end,
GetMaskTexture = function(self)
if (not self:HasTextureMask()) then
return
end
self.barTextureMask:GetTexture()
end,
SetMaskAtlas = function(self, atlasName)
if (not self:HasTextureMask()) then
return
end
self.barTextureMask:SetAtlas(atlasName)
end,
GetMaskAtlas = function(self)
if (not self:HasTextureMask()) then
return
end
self.barTextureMask:GetAtlas()
end,
AddMaskTexture = function(self, object)
if (not self:HasTextureMask()) then
return
end
if (object.GetObjectType and object:GetObjectType() == "Texture") then
object:AddMaskTexture(self.barTextureMask)
else
detailsFramework:Msg("Invalid 'Texture' to object:AddMaskTexture(Texture)", debugstack())
end
end,
CreateTextureMask = function(self)
local barTexture = self:GetStatusBarTexture() or self.barTexture
if (not barTexture) then
detailsFramework:Msg("Object doesn't not have a statubar texture, create one and object:SetStatusBarTexture(textureObject)", debugstack())
return
end
if (self.barTextureMask) then
return self.barTextureMask
end
--statusbar texture mask
self.barTextureMask = self:CreateMaskTexture(nil, "artwork")
self.barTextureMask:SetAllPoints()
self.barTextureMask:SetTexture([[Interface\CHATFRAME\CHATFRAMEBACKGROUND]])
--border texture
self.barBorderTextureForMask = self:CreateTexture(nil, "overlay", nil, 7)
self.barBorderTextureForMask:SetAllPoints()
--self.barBorderTextureForMask:SetPoint("topleft", self, "topleft", -1, 1)
--self.barBorderTextureForMask:SetPoint("bottomright", self, "bottomright", 1, -1)
self.barBorderTextureForMask:Hide()
barTexture:AddMaskTexture(self.barTextureMask)
return self.barTextureMask
end,
HasTextureMask = function(self)
if (not self.barTextureMask) then
detailsFramework:Msg("Object doesn't not have a texture mask, create one using object:CreateTextureMask()", debugstack())
return false
end
return true
end,
SetBorderTexture = function(self, texture)
if (not self:HasTextureMask()) then
return
end
texture = texture or ""
self.barBorderTextureForMask:SetTexture(texture)
if (texture == "") then
self.barBorderTextureForMask:Hide()
else
self.barBorderTextureForMask:Show()
end
return
end,
GetBorderTexture = function(self)
if (not self:HasTextureMask()) then
return
end
return self.barBorderTextureForMask:GetTexture()
return
end,
SetBorderColor = function(self, r, g, b, a)
r, g, b, a = detailsFramework:ParseColors(r, g, b, a)
if (self.barBorderTextureForMask and self.barBorderTextureForMask:IsShown()) then
self.barBorderTextureForMask:SetVertexColor(r, g, b, a)
--if there's a square border on the widget, remove its color
if (self.border and self.border.UpdateSizes and self.border.SetVertexColor) then
self.border:SetVertexColor(0, 0, 0, 0)
end
return
end
if (self.border and self.border.UpdateSizes and self.border.SetVertexColor) then
self.border:SetVertexColor(r, g, b, a)
--adjust the mask border texture ask well in case the user set the mask color texture before setting a texture on it
if (self.barBorderTextureForMask) then
self.barBorderTextureForMask:SetVertexColor(r, g, b, a)
end
return
end
return
end,
GetBorderColor = function(self)
if (self.barBorderTextureForMask and self.barBorderTextureForMask:IsShown()) then
return self.barBorderTextureForMask:GetVertexColor()
end
if (self.border and self.border.UpdateSizes and self.border.GetVertexColor) then
return self.border:GetVertexColor()
end
return
end,
}
+22 -49
View File
@@ -17,22 +17,11 @@ local CreateFrame = CreateFrame
-- TWW compatibility:
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetNumSpellTabs = GetNumSpellTabs or C_SpellBook.GetNumSpellBookSkillLines
local GetSpellTabInfo = GetSpellTabInfo or function(tabLine) local skillLine = C_SpellBook.GetSpellBookSkillLineInfo(tabLine) if skillLine then return skillLine.name, skillLine.iconID, skillLine.itemIndexOffset, skillLine.numSpellBookItems, skillLine.isGuild, skillLine.offSpecID end end
local SpellBookItemTypeMap = Enum.SpellBookItemType and {[Enum.SpellBookItemType.Spell] = "SPELL", [Enum.SpellBookItemType.None] = "NONE", [Enum.SpellBookItemType.Flyout] = "FLYOUT", [Enum.SpellBookItemType.FutureSpell] = "FUTURESPELL", [Enum.SpellBookItemType.PetAction] = "PETACTION" } or {}
local GetSpellBookItemInfo = GetSpellBookItemInfo or function(...) local si = C_SpellBook.GetSpellBookItemInfo(...) if si then return SpellBookItemTypeMap[si.itemType] or "NONE", si.spellID end end
local GetNumSpellTabs = GetNumSpellTabs
local GetSpellTabInfo = GetSpellTabInfo
local GetSpellBookItemInfo = GetSpellBookItemInfo
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local CastInfo = detailsFramework.CastInfo
local PixelUtil = PixelUtil or DFPixelUtil
local UnitGroupRolesAssigned = detailsFramework.UnitGroupRolesAssigned
local cleanfunction = function() end
local PixelUtil = PixelUtil
local APIFrameFunctions
do
@@ -1631,7 +1620,7 @@ function detailsFramework:IconPick (callback, close_when_select, param1, param2)
local preview_image_bg = detailsFramework:NewImage(detailsFramework.IconPickFrame.preview, nil, 76, 76)
preview_image_bg:SetDrawLayer("background", 0)
preview_image_bg:SetAllPoints(detailsFramework.IconPickFrame.preview)
preview_image_bg:SetColorTexture(0, 0, 0)
preview_image_bg:SetTexture(0, 0, 0)
local preview_image = detailsFramework:NewImage(detailsFramework.IconPickFrame.preview, nil, 76, 76)
preview_image:SetAllPoints(detailsFramework.IconPickFrame.preview)
@@ -1998,7 +1987,6 @@ function detailsFramework:CreateScaleBar(frame, config, bNoRightClick) --~scale
local scaleBar, text = detailsFramework:CreateSlider(frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", detailsFramework:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"), detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
scaleBar.thumb:SetWidth(24)
scaleBar:SetValueStep(0.05)
scaleBar:SetObeyStepOnDrag(true)
scaleBar.mouseDown = false
rawset(scaleBar, "lockdown", true)
@@ -2512,7 +2500,7 @@ function detailsFramework:ShowPromptPanel(message, trueCallback, falseCallback,
detailsFramework:CreateAnimation(promptFrame.ShowAnimation, "scale", 2, .075, 1, 1, .90, .90, "center", 0, 0)
promptFrame.FlashTexture = promptFrame:CreateTexture(nil, "overlay")
promptFrame.FlashTexture:SetColorTexture(1, 1, 1, 1)
promptFrame.FlashTexture:SetTexture(1, 1, 1, 1)
promptFrame.FlashTexture:SetAllPoints()
promptFrame.FlashAnimation = detailsFramework:CreateAnimationHub(promptFrame.FlashTexture, function() promptFrame.FlashTexture:Show() end, function() promptFrame.FlashTexture:Hide() end)
@@ -2878,7 +2866,7 @@ local chart_panel_add_label = function(self, color, name, type, number)
thisbox.type = type
thisbox.index = number
thisbox.box:SetColorTexture(unpack(color))
thisbox.box:SetTexture(unpack(color))
thisbox.text:SetText(name)
thisbox.check:Show()
@@ -2919,7 +2907,7 @@ local draw_overlay = function(self, this_overlay, overlayData, color)
this_block:SetWidth(pixel*5)
end
this_block:SetColorTexture(r, g, b, a or 0.25)
this_block:SetTexture(r, g, b, a or 0.25)
this_block:Show()
index = index + 1
@@ -3321,7 +3309,7 @@ function detailsFramework:CreateChartPanel(parent, width, height, name)
--div lines
for i = 1, 8, 1 do
local line = g:CreateTexture(nil, "overlay")
line:SetColorTexture(1, 1, 1, .05)
line:SetTexture(1, 1, 1, .05)
line:SetWidth(670)
line:SetHeight(1.1)
@@ -3347,14 +3335,14 @@ function detailsFramework:CreateChartPanel(parent, width, height, name)
local line = chartFrame:CreateTexture(nil, "border")
line:SetSize(1, height-45)
line:SetColorTexture(1, 1, 1, .1)
line:SetTexture(1, 1, 1, .1)
line:SetPoint("bottomleft", timeString, "topright", 0, -10)
line:Hide()
timeString.line = line
end
local bottom_texture = detailsFramework:NewImage(chartFrame, nil, 702, 25, "background", nil, nil, "$parentBottomTexture")
bottom_texture:SetColorTexture(.1, .1, .1, .7)
bottom_texture:SetTexture(.1, .1, .1, .7)
bottom_texture:SetPoint("topright", g, "bottomright", 0, 0)
bottom_texture:SetPoint("bottomleft", chartFrame, "bottomleft", 8, 12)
@@ -3433,7 +3421,7 @@ local gframe_create_line = function(self)
t:SetWidth(1)
t:SetPoint("topright", f, "topright")
t:SetPoint("bottomright", f, "bottomright")
t:SetColorTexture(1, 1, 1, .1)
t:SetTexture(1, 1, 1, .1)
f.grid = t
local b = f:CreateTexture(nil, "overlay")
@@ -3452,7 +3440,7 @@ local gframe_create_line = function(self)
local text = f:CreateFontString(nil, "overlay", "GameFontNormal")
local textBackground = f:CreateTexture(nil, "artwork")
textBackground:SetSize(30, 16)
textBackground:SetColorTexture(0, 0, 0, 0.5)
textBackground:SetTexture(0, 0, 0, 0.5)
textBackground:SetPoint("bottom", f.ball, "top", 0, -6)
text:SetPoint("center", textBackground, "center")
detailsFramework:SetFontSize(text, 10)
@@ -3959,7 +3947,7 @@ function detailsFramework:ApplyStandardBackdrop(frame, bUseSolidColor, alphaScal
if (not frame.__background) then
frame.__background = frame:CreateTexture(nil, "border", nil, -6)
frame.__background:SetColorTexture(red, green, blue)
frame.__background:SetTexture(red, green, blue)
frame.__background:SetAllPoints()
end
@@ -4254,21 +4242,6 @@ detailsFramework.RadioGroupCoreFunctions = {
else
checkbox.Icon:SetTexCoord(0, 1, 0, 1)
end
if (optionTable.mask) then
if (not checkbox.Icon.Mask) then
checkbox.Icon.Mask = checkbox:CreateMaskTexture(nil, "overlay")
checkbox.Icon.Mask:SetAllPoints(checkbox.Icon.widget)
checkbox.Icon.Mask:SetTexture(optionTable.mask)
checkbox.Icon:AddMaskTexture(checkbox.Icon.Mask)
end
checkbox.Icon.Mask:SetTexture(optionTable.mask)
else
--checkbox.Icon:SetMask("")
if (checkbox.Icon.Mask) then
checkbox.Icon.Mask:SetTexture("")
end
end
else
checkbox.Icon:SetTexture("")
if (self.options.text_padding) then
@@ -4810,7 +4783,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
--create left border
local leftBorder = f:CreateTexture(nil, "overlay")
leftBorder:SetDrawLayer("overlay", 7)
leftBorder:SetColorTexture(1, 1, 1, 1)
leftBorder:SetTexture(1, 1, 1, 1)
table.insert(f.allTextures, leftBorder)
f.leftBorder = leftBorder
PixelUtil.SetPoint(leftBorder, "topright", f, "topleft", 0, 1, 0, 1)
@@ -4820,7 +4793,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
--create right border
local rightBorder = f:CreateTexture(nil, "overlay")
rightBorder:SetDrawLayer("overlay", 7)
rightBorder:SetColorTexture(1, 1, 1, 1)
rightBorder:SetTexture(1, 1, 1, 1)
table.insert(f.allTextures, rightBorder)
f.rightBorder = rightBorder
PixelUtil.SetPoint(rightBorder, "topleft", f, "topright", 0, 1, 0, 1)
@@ -4830,7 +4803,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
--create top border
local topBorder = f:CreateTexture(nil, "overlay")
topBorder:SetDrawLayer("overlay", 7)
topBorder:SetColorTexture(1, 1, 1, 1)
topBorder:SetTexture(1, 1, 1, 1)
table.insert(f.allTextures, topBorder)
f.topBorder = topBorder
PixelUtil.SetPoint(topBorder, "bottomleft", f, "topleft", 0, 0, 0, 0)
@@ -4840,7 +4813,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
--create border
local bottomBorder = f:CreateTexture(nil, "overlay")
bottomBorder:SetDrawLayer("overlay", 7)
bottomBorder:SetColorTexture(1, 1, 1, 1)
bottomBorder:SetTexture(1, 1, 1, 1)
table.insert(f.allTextures, bottomBorder)
f.bottomBorder = bottomBorder
PixelUtil.SetPoint(bottomBorder, "topleft", f, "bottomleft", 0, 0, 0, 0)
@@ -4924,7 +4897,7 @@ detailsFramework.TimeLineElapsedTimeFunctions = {
if (not label) then
label = self:CreateFontString(nil, "artwork", "GameFontNormal")
label.line = self:CreateTexture(nil, "artwork")
label.line:SetColorTexture(1, 1, 1)
label.line:SetTexture(1, 1, 1)
label.line:SetPoint("topleft", label, "bottomleft", 0, -2)
self.labels [index] = label
end
@@ -5149,7 +5122,7 @@ detailsFramework.TimeLineBlockFunctions = {
self.blocks [index] = block
local background = block:CreateTexture(nil, "background")
background:SetColorTexture(1, 1, 1, 1)
background:SetTexture(1, 1, 1, 1)
local icon = block:CreateTexture(nil, "artwork")
local text = block:CreateFontString(nil, "artwork")
local auraLength = block:CreateTexture(nil, "border")
@@ -5159,7 +5132,7 @@ detailsFramework.TimeLineBlockFunctions = {
text:SetPoint("left", icon, "left", 2, 0)
auraLength:SetPoint("topleft", icon, "topleft", 0, 0)
auraLength:SetPoint("bottomleft", icon, "bottomleft", 0, 0)
auraLength:SetColorTexture(1, 1, 1, 1)
auraLength:SetTexture(1, 1, 1, 1)
auraLength:SetVertexColor(1, 1, 1, 0.1)
block.icon = icon
@@ -5575,7 +5548,7 @@ function detailsFramework:ShowErrorMessage (errorMessage, titleText)
detailsFramework:CreateAnimation(f.ShowAnimation, "scale", 2, .075, 1, 1, .90, .90, "center", 0, 0)
f.FlashTexture = f:CreateTexture(nil, "overlay")
f.FlashTexture:SetColorTexture(1, 1, 1, 1)
f.FlashTexture:SetTexture(1, 1, 1, 1)
f.FlashTexture:SetAllPoints()
f.FlashAnimation = detailsFramework:CreateAnimationHub (f.FlashTexture, function() f.FlashTexture:Show() end, function() f.FlashTexture:Hide() end)
+10 -61
View File
@@ -144,7 +144,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
--color
local smember_color = function(object, value)
local red, green, blue, alpha = detailsFramework:ParseColors(value)
object.image:SetColorTexture(red, green, blue, alpha)
object.image:SetTexture(red, green, blue, alpha)
end
--vertex color
@@ -181,7 +181,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
--gradient
local smember_gradient = function(object, value)
if (type(value) == "table" and value.gradient and value.fromColor and value.toColor) then
object.image:SetColorTexture(1, 1, 1, 1)
object.image:SetTexture(1, 1, 1, 1)
local fromColor = detailsFramework:FormatColor("tablemembers", value.fromColor)
local toColor = detailsFramework:FormatColor("tablemembers", value.toColor)
object.image:SetGradient(value.gradient, fromColor, toColor)
@@ -346,20 +346,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
---@type df_gradienttable
local gradientTable = texture
if (detailsFramework.IsDragonflight() or detailsFramework.IsNonRetailWowWithRetailAPI() or detailsFramework.IsWarWow()) then
ImageObject.image:SetColorTexture(1, 1, 1, 1)
local fromColor = detailsFramework:FormatColor("tablemembers", gradientTable.fromColor)
local toColor = detailsFramework:FormatColor("tablemembers", gradientTable.toColor)
if (gradientTable.invert) then
local temp = fromColor
fromColor = toColor
toColor = temp
end
ImageObject.image:SetGradient(gradientTable.gradient, fromColor, toColor)
else
local fromR, fromG, fromB, fromA = detailsFramework:ParseColors(gradientTable.fromColor)
local fromR, fromG, fromB, fromA = detailsFramework:ParseColors(gradientTable.fromColor)
local toR, toG, toB, toA = detailsFramework:ParseColors(gradientTable.toColor)
if (gradientTable.invert) then
@@ -377,22 +364,21 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
toA = temp
end
ImageObject.image:SetColorTexture(1, 1, 1, 1)
ImageObject.image:SetTexture(1, 1, 1, 1)
ImageObject.image:SetGradientAlpha(gradientTable.gradient, fromR, fromG, fromB, fromA, toR, toG, toB, toA)
end
else
local r, g, b, a = detailsFramework:ParseColors(texture)
ImageObject.image:SetColorTexture(r, g, b, a)
ImageObject.image:SetTexture(r, g, b, a)
end
elseif (type(texture) == "string") then
local isAtlas = C_Texture.GetAtlasInfo(texture)
local isAtlas = AtlasUtil:AtlasExists(texture)
if (isAtlas) then
ImageObject.image:SetAtlas(texture)
else
if (detailsFramework:IsHtmlColor(texture)) then
local r, g, b = detailsFramework:ParseColors(texture)
ImageObject.image:SetColorTexture(r, g, b)
ImageObject.image:SetTexture(r, g, b)
else
ImageObject.image:SetTexture(texture)
end
@@ -452,7 +438,7 @@ end
---@param filterMode texturefilter?
---@param resetTexCoords boolean?
function detailsFramework:SetAtlas(textureObject, atlas, useAtlasSize, filterMode, resetTexCoords)
local isAtlas = C_Texture.GetAtlasInfo(type(atlas) == "string" and atlas or "--")
local isAtlas = AtlasUtil:AtlasExists(type(atlas) == "string" and atlas or "--")
if (isAtlas and type(atlas) == "string") then
textureObject:SetAtlas(atlas, useAtlasSize, filterMode, resetTexCoords)
return
@@ -464,7 +450,7 @@ function detailsFramework:SetAtlas(textureObject, atlas, useAtlasSize, filterMod
local atlasName = atlas.atlas
if (atlasName) then
isAtlas = C_Texture.GetAtlasInfo(atlasName)
isAtlas = AtlasUtil:AtlasExists(atlasName)
if (isAtlas) then
textureObject:SetAtlas(atlasName, useAtlasSize, filterMode, resetTexCoords)
return
@@ -490,9 +476,6 @@ function detailsFramework:SetAtlas(textureObject, atlas, useAtlasSize, filterMod
textureObject:SetDesaturated(true)
else
textureObject:SetDesaturated(false)
if (atlasInfo.desaturation) then
textureObject:SetDesaturation(atlasInfo.desaturation)
end
end
if (atlasInfo.colorName) then
@@ -570,7 +553,7 @@ end
function detailsFramework:ParseTexture(texture, width, height, leftTexCoord, rightTexCoord, topTexCoord, bottomTexCoord, vertexRed, vertexGreen, vertexBlue, vertexAlpha)
local isAtlas
if (type(texture) == "string") then
isAtlas = C_Texture.GetAtlasInfo(texture)
isAtlas = AtlasUtil:AtlasExists(texture)
end
if (isAtlas) then
@@ -706,37 +689,3 @@ function detailsFramework:TableIsAtlas(atlasTale)
end
return false
end
---Receives a texture object and a texture to use as mask
---If the mask texture is not created, it will be created and added to a key named MaskTexture
---@param self table
---@param texture texture
---@param maskTexture string|number|table
function detailsFramework:SetMask(texture, maskTexture)
if (not texture.MaskTexture) then
local parent = texture:GetParent()
local maskTextureObject = parent:CreateMaskTexture(nil, "artwork")
maskTextureObject:SetAllPoints(texture)
texture:AddMaskTexture(maskTextureObject)
texture.MaskTexture = maskTextureObject
end
--is this a game texture atlas?
if (type(maskTexture) == "string") then
local isAtlas = C_Texture.GetAtlasInfo(maskTexture)
if (isAtlas) then
texture.MaskTexture:SetAtlas(maskTexture)
return
end
elseif (type(maskTexture) == "table") then
local bIsAtlas = detailsFramework:TableIsAtlas(maskTexture)
if (bIsAtlas) then
detailsFramework:SetAtlas(texture.MaskTexture, maskTexture)
return
end
end
texture.MaskTexture:SetTexture(maskTexture)
end
+12 -12
View File
@@ -67,7 +67,7 @@ local CreateImageEditorFrame = function()
local topCoordTexture = DF:NewImage(editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageTopCoord")
topCoordTexture:SetPoint("topleft", editorWindow, "topleft")
topCoordTexture:SetPoint("topright", editorWindow, "topright")
topCoordTexture:SetColorTexture(1, 0, 0)
topCoordTexture:SetTexture(1, 0, 0)
topCoordTexture.height = 1
topCoordTexture.alpha = .2
@@ -80,7 +80,7 @@ local CreateImageEditorFrame = function()
topSlider:SetHook("OnLeave", function() return true end)
local topSliderThumpTexture = topSlider:CreateTexture(nil, "overlay")
topSliderThumpTexture:SetColorTexture(1, 1, 1)
topSliderThumpTexture:SetTexture(1, 1, 1)
topSliderThumpTexture:SetWidth(512)
topSliderThumpTexture:SetHeight(1)
topSlider:SetThumbTexture (topSliderThumpTexture)
@@ -98,7 +98,7 @@ local CreateImageEditorFrame = function()
local bottomCoordTexture = DF:NewImage(editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageBottomCoord")
bottomCoordTexture:SetPoint("bottomleft", editorWindow, "bottomleft", 0, 0)
bottomCoordTexture:SetPoint("bottomright", editorWindow, "bottomright", 0, 0)
bottomCoordTexture:SetColorTexture(1, 0, 0)
bottomCoordTexture:SetTexture(1, 0, 0)
bottomCoordTexture.height = 1
bottomCoordTexture.alpha = .2
@@ -111,7 +111,7 @@ local CreateImageEditorFrame = function()
bottomSlider:SetHook("OnLeave", function() return true end)
local bottomSliderThumpTexture = bottomSlider:CreateTexture(nil, "overlay")
bottomSliderThumpTexture:SetColorTexture(1, 1, 1)
bottomSliderThumpTexture:SetTexture(1, 1, 1)
bottomSliderThumpTexture:SetWidth(512)
bottomSliderThumpTexture:SetHeight(1)
bottomSlider:SetThumbTexture (bottomSliderThumpTexture)
@@ -130,7 +130,7 @@ local CreateImageEditorFrame = function()
local leftCoordTexture = DF:NewImage(editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageLeftCoord")
leftCoordTexture:SetPoint("topleft", editorWindow, "topleft", 0, 0)
leftCoordTexture:SetPoint("bottomleft", editorWindow, "bottomleft", 0, 0)
leftCoordTexture:SetColorTexture(1, 0, 0)
leftCoordTexture:SetTexture(1, 0, 0)
leftCoordTexture.width = 1
leftCoordTexture.alpha = .2
@@ -142,7 +142,7 @@ local CreateImageEditorFrame = function()
leftSlider:SetHook("OnLeave", function() return true end)
local leftSliderThumpTexture = leftSlider:CreateTexture(nil, "overlay")
leftSliderThumpTexture:SetColorTexture(1, 1, 1)
leftSliderThumpTexture:SetTexture(1, 1, 1)
leftSliderThumpTexture:SetWidth(1)
leftSliderThumpTexture:SetHeight(512)
leftSlider:SetThumbTexture (leftSliderThumpTexture)
@@ -160,7 +160,7 @@ local CreateImageEditorFrame = function()
local rightCoordTexture = DF:NewImage(editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageRightCoord")
rightCoordTexture:SetPoint("topright", editorWindow, "topright", 0, 0)
rightCoordTexture:SetPoint("bottomright", editorWindow, "bottomright", 0, 0)
rightCoordTexture:SetColorTexture(1, 0, 0)
rightCoordTexture:SetTexture(1, 0, 0)
rightCoordTexture.width = 1
rightCoordTexture.alpha = .2
@@ -172,7 +172,7 @@ local CreateImageEditorFrame = function()
rightSlider:SetHook("OnLeave", function() return true end)
--[
local rightSliderThumpTexture = rightSlider:CreateTexture(nil, "overlay")
rightSliderThumpTexture:SetColorTexture(1, 1, 1)
rightSliderThumpTexture:SetTexture(1, 1, 1)
rightSliderThumpTexture:SetWidth(1)
rightSliderThumpTexture:SetHeight(512)
rightSlider:SetThumbTexture (rightSliderThumpTexture)
@@ -431,19 +431,19 @@ local CreateImageEditorFrame = function()
local selectionBoxUp = dragFrame:CreateTexture(nil, "overlay")
selectionBoxUp:SetHeight(1)
selectionBoxUp:SetColorTexture(1, 1, 1)
selectionBoxUp:SetTexture(1, 1, 1)
local selectionBoxDown = dragFrame:CreateTexture(nil, "overlay")
selectionBoxDown:SetHeight(1)
selectionBoxDown:SetColorTexture(1, 1, 1)
selectionBoxDown:SetTexture(1, 1, 1)
local selectionBoxLeft = dragFrame:CreateTexture(nil, "overlay")
selectionBoxLeft:SetWidth(1)
selectionBoxLeft:SetColorTexture(1, 1, 1)
selectionBoxLeft:SetTexture(1, 1, 1)
local selectionBoxRight = dragFrame:CreateTexture(nil, "overlay")
selectionBoxRight:SetWidth(1)
selectionBoxRight:SetColorTexture(1, 1, 1)
selectionBoxRight:SetTexture(1, 1, 1)
function dragFrame.ClearSelectionBoxPoints()
selectionBoxUp:ClearAllPoints()
+5 -40
View File
@@ -113,15 +113,6 @@ local setCornerPoints = function(self, textures, width, height, xOffset, yOffset
PixelUtil.SetSize(thisTexture, width or 16, height or 16)
thisTexture:SetTexture(self.options.corner_texture, "CLAMP", "CLAMP", "TRILINEAR")
--set the mask
if (not thisTexture.MaskTexture and bIsBorder) then
thisTexture.MaskTexture = self:CreateMaskTexture(nil, "background")
thisTexture.MaskTexture:SetSize(74, 64)
thisTexture:AddMaskTexture(thisTexture.MaskTexture)
thisTexture.MaskTexture:SetTexture([[Interface\Azerite\AzeriteGoldRingRank2]], "CLAMP", "CLAMP", "TRILINEAR") --1940690
--thisTexture.MaskTexture:Hide()
end
xOffset = xOffset or 0
yOffset = yOffset or 0
@@ -131,30 +122,18 @@ local setCornerPoints = function(self, textures, width, height, xOffset, yOffset
if (cornerName == "TopLeft") then
thisTexture:SetTexCoord(0, 0.5, 0, 0.5)
PixelUtil.SetPoint(thisTexture, cornerName, self, cornerName, -xOffset, yOffset)
if (thisTexture.MaskTexture) then
PixelUtil.SetPoint(thisTexture.MaskTexture, cornerName, self, cornerName, -18-xOffset, 16+yOffset)
end
elseif (cornerName == "TopRight") then
thisTexture:SetTexCoord(0.5, 1, 0, 0.5)
PixelUtil.SetPoint(thisTexture, cornerName, self, cornerName, xOffset, yOffset)
if (thisTexture.MaskTexture) then
PixelUtil.SetPoint(thisTexture.MaskTexture, cornerName, self, cornerName, -18+xOffset, 16+yOffset)
end
elseif (cornerName == "BottomLeft") then
thisTexture:SetTexCoord(0, 0.5, 0.5, 1)
PixelUtil.SetPoint(thisTexture, cornerName, self, cornerName, -xOffset, -yOffset)
if (thisTexture.MaskTexture) then
PixelUtil.SetPoint(thisTexture.MaskTexture, cornerName, self, cornerName, -18-xOffset, 16-yOffset)
end
elseif (cornerName == "BottomRight") then
thisTexture:SetTexCoord(0.5, 1, 0.5, 1)
PixelUtil.SetPoint(thisTexture, cornerName, self, cornerName, xOffset, -yOffset)
if (thisTexture.MaskTexture) then
PixelUtil.SetPoint(thisTexture.MaskTexture, cornerName, self, cornerName, -18+xOffset, 16-yOffset)
end
end
end
end
@@ -181,7 +160,7 @@ detailsFramework.RoundedCornerPanelMixin = {
PixelUtil.SetPoint(topHorizontalEdge, "bottomleft", self.CornerTextures["TopLeft"], "bottomright", 0, 0)
PixelUtil.SetPoint(topHorizontalEdge, "topright", self.CornerTextures["TopRight"], "topleft", 0, 0)
PixelUtil.SetPoint(topHorizontalEdge, "bottomright", self.CornerTextures["TopRight"], "bottomleft", 0, 0)
topHorizontalEdge:SetColorTexture(unpack(defaultColorTable))
topHorizontalEdge:SetTexture(unpack(defaultColorTable))
--create the bottom texture which connects the bottom corners with a horizontal line
---@type texture
@@ -190,7 +169,7 @@ detailsFramework.RoundedCornerPanelMixin = {
PixelUtil.SetPoint(bottomHorizontalEdge, "bottomleft", self.CornerTextures["BottomLeft"], "bottomright", 0, 0)
PixelUtil.SetPoint(bottomHorizontalEdge, "topright", self.CornerTextures["BottomRight"], "topleft", 0, 0)
PixelUtil.SetPoint(bottomHorizontalEdge, "bottomright", self.CornerTextures["BottomRight"], "bottomleft", 0, 0)
bottomHorizontalEdge:SetColorTexture(unpack(defaultColorTable))
bottomHorizontalEdge:SetTexture(unpack(defaultColorTable))
--create the center block which connects the bottom left of the topleft corner with the top right of the bottom right corner
---@type texture
@@ -199,7 +178,7 @@ detailsFramework.RoundedCornerPanelMixin = {
PixelUtil.SetPoint(centerBlock, "bottomleft", self.CornerTextures["BottomLeft"], "topleft", 0, 0)
PixelUtil.SetPoint(centerBlock, "topright", self.CornerTextures["BottomRight"], "topright", 0, 0)
PixelUtil.SetPoint(centerBlock, "bottomright", self.CornerTextures["BottomRight"], "topright", 0, 0)
centerBlock:SetColorTexture(unpack(defaultColorTable))
centerBlock:SetTexture(unpack(defaultColorTable))
self:CreateBorder()
self:SetBorderCornerColor(0, 0, 0, 0)
@@ -345,7 +324,6 @@ detailsFramework.RoundedCornerPanelMixin = {
if (self.bHasBorder) then
for _, thisTexture in pairs(self.BorderCornerTextures) do
PixelUtil.SetSize(thisTexture, cornerWidth-self.cornerRoundness, cornerHeight-self.cornerRoundness)
thisTexture.MaskTexture:SetSize(74-(self.cornerRoundness*0.75), 64-self.cornerRoundness)
end
local horizontalEdgesNewSize = self:CalculateBorderEdgeSize("horizontal")
@@ -443,7 +421,7 @@ detailsFramework.RoundedCornerPanelMixin = {
---@type texture
local newBorderTexture = self:CreateTexture(nil, "background", nil, 0)
self.BorderCornerTextures[cornerNames[i]] = newBorderTexture
newBorderTexture:SetColorTexture(unpack(defaultColorTable))
newBorderTexture:SetTexture(unpack(defaultColorTable))
newBorderTexture:SetVertexColor(r, g, b, a)
self[cornerNames[i] .. "Border"] = newBorderTexture
end
@@ -484,7 +462,7 @@ detailsFramework.RoundedCornerPanelMixin = {
for edgeName, thisTexture in pairs(self.BorderEdgeTextures) do
---@cast thisTexture texture
thisTexture:SetColorTexture(unpack(defaultColorTable))
thisTexture:SetTexture(unpack(defaultColorTable))
thisTexture:SetVertexColor(r, g, b, a)
end
@@ -547,19 +525,6 @@ detailsFramework.RoundedCornerPanelMixin = {
for _, thisTexture in pairs(self.CenterTextures) do
thisTexture:SetVertexColor(red, green, blue, alpha)
end
if (self.bHasBorder) then
if (alpha < 0.979) then
--if using borders, the two border textures overlaps making the alpha be darker than it should
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture.MaskTexture:Show()
end
else
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture.MaskTexture:Hide()
end
end
end
end,
}
+1 -1
View File
@@ -27,7 +27,7 @@ local createOptionFrameFunc = function(line, lineIndex, columnIndex)
local highlightTexture = optionButton:CreateTexture(nil, "highlight")
highlightTexture:SetAllPoints()
highlightTexture:SetColorTexture(1, 1, 1, 0.2)
highlightTexture:SetTexture(1, 1, 1, 0.2)
DetailsFramework:ApplyStandardBackdrop(optionButton)
-1
View File
@@ -298,7 +298,6 @@ detailsFramework.ScrollBoxFunctions = {
end
scrollBar:SetMinMaxValues(0, maxRange);
scrollBar:SetValueStep(buttonHeight);
scrollBar:SetStepsPerPage(numToDisplay-1);
scrollChildFrame:SetHeight(scrollChildHeight);
-- Arrow button handling
-1
View File
@@ -1255,7 +1255,6 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue,
SliderObject.slider:SetValueStep(0.01)
else
SliderObject.slider:SetValueStep(step)
SliderObject.slider:SetObeyStepOnDrag(true)
end
if (not APISliderFunctions) then
+103 -698
View File
@@ -4,9 +4,6 @@ if (not DF or not DetailsFrameworkCanLoad) then
return
end
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
DF_COOLDOWN_RAID = 4
DF_COOLDOWN_EXTERNAL = 3
@@ -489,206 +486,6 @@ DF.CooldownsBySpec = {
},
}
--additional CDs / modifications for classic
if (IS_WOW_PROJECT_NOT_MAINLINE) then
--WARRIOR
--Arms
DF.CooldownsBySpec[71][12292] = 1 --Death Wish (BCC)
--ROGUE
--Outlaw
DF.CooldownsBySpec[260][13877] = 1 --Blade Flurry (talent) (BBC)
--MAGE
--fire
DF.CooldownsBySpec[63][28682] = 1 --Combustion (talent) (BCC)
--HUNTER
--marksmanship
DF.CooldownsBySpec[254][3045] = 1 --Rapid Fire (BCC)
DF.CooldownsBySpec[254][34471] = 1 --The Beast Within (talent) (BCC)
--auto-generated spell-ranks
--SHAMAN - 262
--SHAMAN - 263
--SHAMAN - 264
--WARRIOR - 71
--WARRIOR - 72
--WARRIOR - 73
--HUNTER - 253
--HUNTER - 254
--HUNTER - 255
--MAGE - 62
--MAGE - 63
--MAGE - 64
DF.CooldownsBySpec[64][13031] = 5 --ice barrier Rank 2
DF.CooldownsBySpec[64][13032] = 5 --ice barrier Rank 3
DF.CooldownsBySpec[64][13033] = 5 --ice barrier Rank 4
DF.CooldownsBySpec[64][27134] = 5 --ice barrier Rank 5
DF.CooldownsBySpec[64][33405] = 5 --ice barrier Rank 6
--PALADIN - 65
DF.CooldownsBySpec[65][1020] = 2 --divine shield Rank 2
DF.CooldownsBySpec[65][2800] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[65][9257] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[65][10310] = 3 --lay on hands Rank 3
DF.CooldownsBySpec[65][20236] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[65][27154] = 3 --lay on hands Rank 4
DF.CooldownsBySpec[65][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[65][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[65][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[65][10326] = 5 --Turn Evil
DF.CooldownsBySpec[65][20729] = 3 --blessing of sacrifice Rank 2
DF.CooldownsBySpec[65][27147] = 3 --blessing of sacrifice Rank 3
DF.CooldownsBySpec[65][27148] = 3 --blessing of sacrifice Rank 4
DF.CooldownsBySpec[65][5573] = 2 --divine protection Rank 2
DF.CooldownsBySpec[65][5599] = 3 --blessing of protection Rank 2
DF.CooldownsBySpec[65][10278] = 3 --blessing of protection Rank 3
--PALADIN - 66
DF.CooldownsBySpec[66][31851] = 2 --ardent defender Rank 2
DF.CooldownsBySpec[66][31852] = 2 --ardent defender Rank 3
DF.CooldownsBySpec[66][31853] = 2 --ardent defender Rank 4
DF.CooldownsBySpec[66][31854] = 2 --ardent defender Rank 5
DF.CooldownsBySpec[66][20729] = 3 --blessing of sacrifice Rank 2
DF.CooldownsBySpec[66][27147] = 3 --blessing of sacrifice Rank 3
DF.CooldownsBySpec[66][27148] = 3 --blessing of sacrifice Rank 4
DF.CooldownsBySpec[66][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[66][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[66][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[66][10326] = 5 --Turn Evil
DF.CooldownsBySpec[66][5599] = 3 --blessing of protection Rank 2
DF.CooldownsBySpec[66][10278] = 3 --blessing of protection Rank 3
--PALADIN - 70
DF.CooldownsBySpec[70][1020] = 2 --divine shield Rank 2
DF.CooldownsBySpec[70][2800] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[70][9257] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[70][10310] = 3 --lay on hands Rank 3
DF.CooldownsBySpec[70][20236] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[70][27154] = 3 --lay on hands Rank 4
DF.CooldownsBySpec[70][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[70][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[70][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[70][10326] = 5 --Turn Evil
DF.CooldownsBySpec[70][5599] = 3 --blessing of protection Rank 2
DF.CooldownsBySpec[70][10278] = 3 --blessing of protection Rank 3
DF.CooldownsBySpec[70][20729] = 3 --blessing of sacrifice Rank 2
DF.CooldownsBySpec[70][27147] = 3 --blessing of sacrifice Rank 3
DF.CooldownsBySpec[70][27148] = 3 --blessing of sacrifice Rank 4
--PRIEST - 256
DF.CooldownsBySpec[256][8124] = 5 --psychic scream Rank 2
DF.CooldownsBySpec[256][10888] = 5 --psychic scream Rank 3
DF.CooldownsBySpec[256][10890] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[256][27610] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[256][19236] = 5 --desperate prayer Rank 2
DF.CooldownsBySpec[256][19238] = 5 --desperate prayer Rank 3
DF.CooldownsBySpec[256][19240] = 5 --desperate prayer Rank 4
DF.CooldownsBySpec[256][19241] = 5 --desperate prayer Rank 5
DF.CooldownsBySpec[256][19242] = 5 --desperate prayer Rank 6
DF.CooldownsBySpec[256][19243] = 5 --desperate prayer Rank 7
DF.CooldownsBySpec[256][25437] = 5 --desperate prayer Rank 8
--PRIEST - 257
DF.CooldownsBySpec[257][2052] = 5 --lesser heal Rank 2
DF.CooldownsBySpec[257][2053] = 5 --lesser heal Rank 3
DF.CooldownsBySpec[257][34863] = 5 --circle of healing Rank 2
DF.CooldownsBySpec[257][34864] = 5 --circle of healing Rank 3
DF.CooldownsBySpec[257][34865] = 5 --circle of healing Rank 4
DF.CooldownsBySpec[257][34866] = 5 --circle of healing Rank 5
DF.CooldownsBySpec[257][8124] = 5 --psychic scream Rank 2
DF.CooldownsBySpec[257][10888] = 5 --psychic scream Rank 3
DF.CooldownsBySpec[257][10890] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[257][27610] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[257][19236] = 5 --desperate prayer Rank 2
DF.CooldownsBySpec[257][19238] = 5 --desperate prayer Rank 3
DF.CooldownsBySpec[257][19240] = 5 --desperate prayer Rank 4
DF.CooldownsBySpec[257][19241] = 5 --desperate prayer Rank 5
DF.CooldownsBySpec[257][19242] = 5 --desperate prayer Rank 6
DF.CooldownsBySpec[257][19243] = 5 --desperate prayer Rank 7
DF.CooldownsBySpec[257][25437] = 5 --desperate prayer Rank 8
--PRIEST - 258
DF.CooldownsBySpec[258][8124] = 5 --psychic scream Rank 2
DF.CooldownsBySpec[258][10888] = 5 --psychic scream Rank 3
DF.CooldownsBySpec[258][10890] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[258][27610] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[258][19236] = 5 --desperate prayer Rank 2
DF.CooldownsBySpec[258][19238] = 5 --desperate prayer Rank 3
DF.CooldownsBySpec[258][19240] = 5 --desperate prayer Rank 4
DF.CooldownsBySpec[258][19241] = 5 --desperate prayer Rank 5
DF.CooldownsBySpec[258][19242] = 5 --desperate prayer Rank 6
DF.CooldownsBySpec[258][19243] = 5 --desperate prayer Rank 7
DF.CooldownsBySpec[258][25437] = 5 --desperate prayer Rank 8
DF.CooldownsBySpec[258][15286] = not IS_WOW_PROJECT_CLASSIC_WRATH and 5 or nil --vampiric embrace is a debuff in classic, not a buff; a 30min buff in wotlk (don't track it...)
--ROGUE - 259
DF.CooldownsBySpec[259][1857] = 2 --vanish Rank 2
DF.CooldownsBySpec[259][11329] = 2 --vanish Rank 2
DF.CooldownsBySpec[259][26888] = 2 --vanish Rank 3
DF.CooldownsBySpec[259][26889] = 2 --vanish Rank 3
DF.CooldownsBySpec[259][27617] = 2 --vanish Rank 2
DF.CooldownsBySpec[259][26669] = 2 --evasion Rank 2
--ROGUE - 260
DF.CooldownsBySpec[260][1857] = 2 --vanish Rank 2
DF.CooldownsBySpec[260][11329] = 2 --vanish Rank 2
DF.CooldownsBySpec[260][26888] = 2 --vanish Rank 3
DF.CooldownsBySpec[260][26889] = 2 --vanish Rank 3
DF.CooldownsBySpec[260][27617] = 2 --vanish Rank 2
DF.CooldownsBySpec[260][26669] = 2 --evasion Rank 2
--ROGUE - 261
DF.CooldownsBySpec[261][1857] = 2 --vanish Rank 2
DF.CooldownsBySpec[261][11329] = 2 --vanish Rank 2
DF.CooldownsBySpec[261][26888] = 2 --vanish Rank 3
DF.CooldownsBySpec[261][26889] = 2 --vanish Rank 3
DF.CooldownsBySpec[261][27617] = 2 --vanish Rank 2
DF.CooldownsBySpec[261][26669] = 2 --evasion Rank 2
--WARLOCK - 265
DF.CooldownsBySpec[265][30413] = 5 --shadowfury Rank 2
DF.CooldownsBySpec[265][30414] = 5 --shadowfury Rank 3
DF.CooldownsBySpec[265][17928] = 5 --howl of terror Rank 2
DF.CooldownsBySpec[265][17925] = 5 --death coil Rank 2
DF.CooldownsBySpec[265][17926] = 5 --death coil Rank 3
DF.CooldownsBySpec[265][27223] = 5 --death coil Rank 4
--WARLOCK - 266
DF.CooldownsBySpec[266][30413] = 5 --shadowfury Rank 2
DF.CooldownsBySpec[266][30414] = 5 --shadowfury Rank 3
DF.CooldownsBySpec[266][17928] = 5 --howl of terror Rank 2
DF.CooldownsBySpec[266][17925] = 5 --death coil Rank 2
DF.CooldownsBySpec[266][17926] = 5 --death coil Rank 3
DF.CooldownsBySpec[266][27223] = 5 --death coil Rank 4
--WARLOCK - 267
DF.CooldownsBySpec[267][17925] = 5 --death coil Rank 2
DF.CooldownsBySpec[267][17926] = 5 --death coil Rank 3
DF.CooldownsBySpec[267][27223] = 5 --death coil Rank 4
DF.CooldownsBySpec[267][17928] = 5 --howl of terror Rank 2
DF.CooldownsBySpec[267][30413] = 5 --shadowfury Rank 2
DF.CooldownsBySpec[267][30414] = 5 --shadowfury Rank 3
--DRUID - 102
DF.CooldownsBySpec[102][99] = nil --demoralizing roar disabled, no CC in tbc
--DRUID - 103
--DRUID - 104
DF.CooldownsBySpec[104][99] = nil --demoralizing roar disabled, no CC in tbc
--DRUID - 105
DF.CooldownsBySpec[105][8918] = 4 --tranquility Rank 2
DF.CooldownsBySpec[105][9862] = 4 --tranquility Rank 3
DF.CooldownsBySpec[105][9863] = 4 --tranquility Rank 4
DF.CooldownsBySpec[105][26983] = 4 --tranquility Rank 5
end
-- tells the duration, requirements and cooldown of a cooldown
DF.CooldownsInfo = {
--paladin
@@ -915,322 +712,74 @@ DF.CooldownsInfo = {
-- {cooldown = , duration = , talent = false, charges = 1}
DF.CrowdControlSpells = {
[5246] = "WARRIOR", --Intimidating Shout
[132168] = "WARRIOR", --Shockwave (debuff spellid)
[6552] = "WARRIOR", --Pummel
[132169] = "WARRIOR", --Storm Bolt (talent debuff spellid)
[118699] = "WARLOCK", --Fear (debuff spellid)
[6789] = "WARLOCK", --Mortal Coil
[19647] = "WARLOCK", --Spelllock
[30283] = "WARLOCK", --Shadowfury
[710] = "WARLOCK", --Banish
[212619] = "WARLOCK", --Call Fellhunt
[5484] = "WARLOCK", --Howl of Terror (talent)
[118] = "MAGE", --Polymorph
[61305] = "MAGE", --Polymorph (black cat)
[28271] = "MAGE", --Polymorph Turtle
[161354] = "MAGE", --Polymorph Monkey
[161353] = "MAGE", --Polymorph Polar Bear Cub
[126819] = "MAGE", --Polymorph Porcupine
[277787] = "MAGE", --Polymorph Direhorn
[61721] = "MAGE", --Polymorph Rabbit
[28272] = "MAGE", --Polymorph Pig
[277792] = "MAGE", --Polymorph Bumblebee
[391622] = "MAGE", --Polymorph Duck
[2139] = "MAGE", --Counterspell
[82691] = "MAGE", --Ring of Frost (debuff spellid)
[122] = "MAGE", --Frost Nova
[157997] = "MAGE", --Ice Nova
[31661] = "MAGE", --Dragon's Breath
[157981] = "MAGE", --Blast Wave
[205364] = "PRIEST", --Mind Control (talent)
[605] = "PRIEST", --Mind Control
[8122] = "PRIEST", --Psychic Scream
[9484] = "PRIEST", --Shackle Undead
[200196] = "PRIEST", --Holy Word: Chastise (debuff spellid)
[200200] = "PRIEST", --Holy Word: Chastise (talent debuff spellid)
[226943] = "PRIEST", --Mind Bomb (talent)
[64044] = "PRIEST", --Psychic Horror (talent)
[15487] = "PRIEST", --Silence
[2094] = "ROGUE", --Blind
[427773] = "ROGUE", --Blind (AoE)
[1833] = "ROGUE", --Cheap Shot
[408] = "ROGUE", --Kidney Shot
[1766] = "ROGUE", --Kick
[6770] = "ROGUE", --Sap
[1776] = "ROGUE", --Gouge
[853] = "PALADIN", --Hammer of Justice
[96231] = "PALADIN", --Rebuke (tank)
[20066] = "PALADIN", --Repentance (talent)
[105421] = "PALADIN", --Blinding Light (talent)
[31935] = "PALADIN", --Avengers Shield
[217824] = "PALADIN", --Shield of Virtue
[10326] = "PALADIN", --Turn Evil
[221562] = "DEATHKNIGHT", --Asphyxiate
[108194] = "DEATHKNIGHT", --Asphyxiate (talent)
[47528] = "DEATHKNIGHT", --Mind Frezer
[91807] = "DEATHKNIGHT", --Shab Rush
[207167] = "DEATHKNIGHT", --Blinding Sleet
[334693] = "DEAHTKNIGHT", --Absolute Zero (legendary)
[339] = "DRUID", --Entangling Roots
[2637] = "DRUID", --Hibernate
[61391] = "DRUID", --Typhoon
[102359] = "DRUID", --Mass Entanglement
[99] = "DRUID", --Incapacitating Roar
[236748] = "DRUID", --Intimidating Roar
[5211] = "DRUID", --Mighty Bash
[45334] = "DRUID", --Immobilized
[203123] = "DRUID", --Maim
[50259] = "DRUID", --Dazed (from Wild Charge)
[209753] = "DRUID", --Cyclone (from pvp talent)
[33786] = "DRUID", --Cyclone (from pvp talent - resto druid)
[93985] = "DRUID", --Skullbash
[163505] = "DRUID", --Rake
[127797] = "DRUID", --Ursol's Vortex
[147362] = "HUNTER", --Countershot
[187707] = "HUNTER", --Muzzle
[3355] = "HUNTER", --Freezing Trap / Diamond Ice (from pvp talent)
[19577] = "HUNTER", --Intimidation
[190927] = "HUNTER", --Harpoon
[162480] = "HUNTER", --Steel Trap
[24394] = "HUNTER", --Intimidation
[117405] = "HUNTER", --Binding Shot (trigger)
[117526] = "HUNTER", --Binding Shot (triggered)
[1513] = "HUNTER", --Scare Beast
[119381] = "MONK", --Leg Sweep
[115078] = "MONK", --Paralysis
[198909] = "MONK", --Song of Chi-Ji (talent)
[116706] = "MONK", --Disable
[107079] = "MONK", --Quaking Palm (racial)
[116705] = "MONK", --Spear kick
[118905] = "SHAMAN", --Static Charge (Capacitor Totem)
[51514] = "SHAMAN", --Hex
[210873] = "SHAMAN", --Hex (Compy)
[211004] = "SHAMAN", --Hex (Spider)
[211010] = "SHAMAN", --Hex (Snake)
[211015] = "SHAMAN", --Hex (Cockroach)
[269352] = "SHAMAN", --Hex (Skeletal Hatchling)
[277778] = "SHAMAN", --Hex (Zandalari Tendonripper)
[277784] = "SHAMAN", --Hex (Wicker Mongrel)
[309328] = "SHAMAN", --Hex (Living Honey)
[57994] = "SHAMAN", --Wind Shear
[64695] = "SHAMAN", --Earthgrab (talent)
[197214] = "SHAMAN", --Sundering (talent)
[179057] = "DEMONHUNTER", --Chaos Nova
[217832] = "DEMONHUNTER", --Imprison
[200166] = "DEMONHUNTER", --Metamorphosis
[207685] = "DEMONHUNTER", --Sigil of Misery
[211881] = "DEMONHUNTER", -- Fel Eruption
[183752] = "DEMONHUNTER", --Disrupt
[331866] = "COVENANT|VENTHYR", --Agent of Chaos (Nadia soulbind)
[372245] = "EVOKER", --Terror of the Skies
[360806] = "EVOKER", --Sleep Walk
}
-- additionals for classic
if (IS_WOW_PROJECT_NOT_MAINLINE) then
DF.CrowdControlSpells[99] = nil --demoralizing roar disabled, no CC in tbc
--auto-generated
DF.CrowdControlSpells[18657] = "DRUID" --hibernate Rank 2
DF.CrowdControlSpells[18658] = "DRUID" --hibernate Rank 3
DF.CrowdControlSpells[6798] = "DRUID" --bash Rank 2
DF.CrowdControlSpells[8983] = "DRUID" --bash Rank 3
DF.CrowdControlSpells[1062] = "DRUID" --entangling roots Rank 2
DF.CrowdControlSpells[5195] = "DRUID" --entangling roots Rank 3
DF.CrowdControlSpells[5196] = "DRUID" --entangling roots Rank 4
DF.CrowdControlSpells[9852] = "DRUID" --entangling roots Rank 5
DF.CrowdControlSpells[9853] = "DRUID" --entangling roots Rank 6
DF.CrowdControlSpells[19970] = "DRUID" --entangling roots Rank 6
DF.CrowdControlSpells[19971] = "DRUID" --entangling roots Rank 5
DF.CrowdControlSpells[19972] = "DRUID" --entangling roots Rank 4
DF.CrowdControlSpells[19973] = "DRUID" --entangling roots Rank 3
DF.CrowdControlSpells[19974] = "DRUID" --entangling roots Rank 2
DF.CrowdControlSpells[26989] = "DRUID" --entangling roots Rank 7
DF.CrowdControlSpells[27010] = "DRUID" --entangling roots Rank 7
DF.CrowdControlSpells[14310] = "HUNTER" --freezing trap Rank 2
DF.CrowdControlSpells[14311] = "HUNTER" --freezing trap Rank 3
DF.CrowdControlSpells[27753] = "HUNTER" --freezing trap Rank 3
DF.CrowdControlSpells[14308] = "HUNTER" --freezing trap effect Rank 2
DF.CrowdControlSpells[14309] = "HUNTER" --freezing trap effect Rank 3
DF.MageFireWardSpells = {
[543] = 30 , -- Fire Ward (Mage) Rank 1
[8457] = 30,
[8458] = 30,
[10223] = 30,
[10225] = 30,
[27128] = 30,
[43010] = 30, -- Rank 7
}
DF.CrowdControlSpells[865] = "MAGE" --frost nova Rank 2
DF.CrowdControlSpells[6131] = "MAGE" --frost nova Rank 3
DF.CrowdControlSpells[9915] = "MAGE" --frost nova Rank 3
DF.CrowdControlSpells[10230] = "MAGE" --frost nova Rank 4
DF.CrowdControlSpells[27088] = "MAGE" --frost nova Rank 5
DF.CrowdControlSpells[33041] = "MAGE" --dragon's breath Rank 2
DF.CrowdControlSpells[33042] = "MAGE" --dragon's breath Rank 3
DF.CrowdControlSpells[33043] = "MAGE" --dragon's breath Rank 4
DF.CrowdControlSpells[12824] = "MAGE" --polymorph Rank 2
DF.CrowdControlSpells[12825] = "MAGE" --polymorph Rank 3
DF.CrowdControlSpells[12826] = "MAGE" --polymorph Rank 4
DF.CrowdControlSpells[1090] = "MAGE" --sleep Rank 2
DF.MageFrostWardSpells = {
[6143] = 30, -- Frost Ward (Mage) Rank 1
[8461] = 30,
[8462] = 30,
[10177] = 30,
[28609] = 30,
[32796] = 30,
[43012] = 30, -- Rank 7
}
DF.CrowdControlSpells[5588] = "PALADIN" --hammer of justice Rank 2
DF.CrowdControlSpells[5589] = "PALADIN" --hammer of justice Rank 3
DF.CrowdControlSpells[10308] = "PALADIN" --hammer of justice Rank 4
DF.CrowdControlSpells[10326] = "PALADIN" --Turn Evil
DF.WarlockShadowWardSpells = {
[6229] = 30, -- Shadow Ward (warlock) Rank 1
[11739] = 30,
[11740] = 30,
[28610] = 30,
[47890] = 30,
[47891] = 30, -- Rank 6
}
DF.CrowdControlSpells[8124] = "PRIEST" --psychic scream Rank 2
DF.CrowdControlSpells[10888] = "PRIEST" --psychic scream Rank 3
DF.CrowdControlSpells[10890] = "PRIEST" --psychic scream Rank 4
DF.CrowdControlSpells[27610] = "PRIEST" --psychic scream Rank 4
DF.CrowdControlSpells[9485] = "PRIEST" --shackle undead Rank 2
DF.CrowdControlSpells[10955] = "PRIEST" --shackle undead Rank 3
DF.CrowdControlSpells[10911] = "PRIEST" --mind control Rank 2
DF.CrowdControlSpells[10912] = "PRIEST" --mind control Rank 3
DF.MageIceBarrierSpells = {
[11426] = 60, -- Ice Barrier (Mage) Rank 1
[13031] = 60,
[13032] = 60,
[13033] = 60,
[27134] = 60,
[33405] = 60,
[43038] = 60,
[43039] = 60, -- Rank 8
}
DF.CrowdControlSpells[1777] = "ROGUE" --gouge Rank 2
DF.CrowdControlSpells[8629] = "ROGUE" --gouge Rank 3
DF.CrowdControlSpells[11285] = "ROGUE" --gouge Rank 4
DF.CrowdControlSpells[11286] = "ROGUE" --gouge Rank 5
DF.CrowdControlSpells[38764] = "ROGUE" --gouge Rank 6
DF.CrowdControlSpells[2070] = "ROGUE" --sap Rank 2
DF.CrowdControlSpells[11297] = "ROGUE" --sap Rank 3
DF.CrowdControlSpells[8643] = "ROGUE" --kidney shot Rank 2
DF.CrowdControlSpells[27615] = "ROGUE" --kidney shot Rank 2
DF.CrowdControlSpells[30621] = "ROGUE" --kidney shot Rank 2
DF.WarlockSacrificeSpells = {
[7812] = 30, -- Sacrifice (warlock) Rank 1
[19438] = 30,
[19440] = 30,
[19441] = 30,
[19442] = 30,
[19443] = 30,
[27273] = 30,
[47985] = 30,
[47986] = 30, -- rank 9
}
DF.CrowdControlSpells[17925] = "WARLOCK" --death coil Rank 2
DF.CrowdControlSpells[17926] = "WARLOCK" --death coil Rank 3
DF.CrowdControlSpells[27223] = "WARLOCK" --death coil Rank 4
DF.CrowdControlSpells[18647] = "WARLOCK" --banish Rank 2
DF.CrowdControlSpells[30413] = "WARLOCK" --shadowfury Rank 2
DF.CrowdControlSpells[30414] = "WARLOCK" --shadowfury Rank 3
DF.CrowdControlSpells[6213] = "WARLOCK" --fear Rank 2
DF.CrowdControlSpells[6215] = "WARLOCK" --fear Rank 3
DF.CrowdControlSpells[17928] = "WARLOCK" --howl of terror Rank 2
DF.SpecIds = {}
DF.ClassSpecIds = {}
for _, class in ipairs(CLASS_SORT_ORDER) do
local specs = C_ClassInfo.GetAllSpecs(class)
DF.ClassSpecIds[class] = {}
for _, spec in ipairs(specs) do
local specInfo = C_ClassInfo.GetSpecInfo(class, spec)
DF.SpecIds[specInfo.ID] = class
DF.ClassSpecIds[specInfo.ID] = true
end
end
DF.SpecIds = {
[577] = "DEMONHUNTER",
[581] = "DEMONHUNTER",
[250] = "DEATHKNIGHT",
[251] = "DEATHKNIGHT",
[252] = "DEATHKNIGHT",
[71] = "WARRIOR",
[72] = "WARRIOR",
[73] = "WARRIOR",
[62] = "MAGE",
[63] = "MAGE",
[64] = "MAGE",
[259] = "ROGUE",
[260] = "ROGUE",
[261] = "ROGUE",
[102] = "DRUID",
[103] = "DRUID",
[104] = "DRUID",
[105] = "DRUID",
[253] = "HUNTER",
[254] = "HUNTER",
[255] = "HUNTER",
[262] = "SHAMAN",
[263] = "SHAMAN",
[264] = "SHAMAN",
[256] = "PRIEST",
[257] = "PRIEST",
[258] = "PRIEST",
[265] = "WARLOCK",
[266] = "WARLOCK",
[267] = "WARLOCK",
[65] = "PALADIN",
[66] = "PALADIN",
[70] = "PALADIN",
[268] = "MONK",
[269] = "MONK",
[270] = "MONK",
}
DF.ClassSpecIds = { --private
["DEMONHUNTER"] = {
[577] = true,
[581] = true,
},
["DEATHKNIGHT"] = {
[250] = true,
[251] = true,
[252] = true,
},
["WARRIOR"] = {
[71] = true,
[72] = true,
[73] = true,
},
["MAGE"] = {
[62] = true,
[63] = true,
[64] = true,
},
["ROGUE"] = {
[259] = true,
[260] = true,
[261] = true,
},
["DRUID"] = {
[102] = true,
[103] = true,
[104] = true,
[105] = true,
},
["HUNTER"] = {
[253] = true,
[254] = true,
[255] = true,
},
["SHAMAN"] = {
[262] = true,
[263] = true,
[264] = true,
},
["PRIEST"] = {
[256] = true,
[257] = true,
[258] = true,
},
["WARLOCK"] = {
[265] = true,
[266] = true,
[267] = true,
},
["PALADIN"] = {
[65] = true,
[66] = true,
[70] = true,
},
["MONK"] = {
[268] = true,
[269] = true,
[270] = true,
},
}
DF.CooldownToClass = {}
DF.CooldownsAttack = {}
@@ -1283,146 +832,50 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--consumables
if (DF.IsShadowlandsWow() or DF.IsDragonflight()) then --Temporary IsDragonFlight until I get the items together
DF.WeaponEnchantIds = {
[6188] = true, --shadowcore oil
[6190] = true, --embalmer's oil
[6201] = true, --weighted
[6200] = true, --sharpened
[5400] = true, --flametongue
[5401] = true, --windfury
}
DF.WeaponEnchantIds = {
[5400] = true, --flametongue
[5401] = true, --windfury
}
DF.FlaskIDs = {
[46377] = true, -- Flask of Endless Rage
[46376] = true, -- Flask of the Frost Wyrm
[54213] = true, -- Flask of Pure Mojo
[46379] = true, -- Flask of Stoneblood
[53899] = true, -- Lesser Flask of Toughness
}
DF.FoodIDs = {
[57367] = true, --(Agi +40, Stam +40) Blackended Dragonfin
[57294] = true, --(AP +60, SP +35, Stam +30) Dalaran Clam Chowder / Great Feast
[57365] = true, --(Spirit +40, Stam +40) Cuttlesteak
[57360] = true, --(Hit+40, Stam +40) Worg Tartare / Snapper Extreme
[57358] = true, --(ArmorPen +40, Stam +40) Hearty Rhino
[57356] = true, --(Expertise +40, Stam +40) Rhinolicious Wormsteak
[57334] = true, --(Mana per 5s +20, Stam +40) Spicy Fried Herring / Mighty Rhino Dogs
[57332] = true, --(Haste +40, Stam +40) Imperial Manta Steak / Very Burnt Worg
[57329] = true, --(Crit +40, Stam +40) Spicy Blue Nettlefish / Spicy Worm Burger
[57327] = true, --(SP +46, Stam +40) Firecracker Salmon / Tender Shoveltusk Steak
[57325] = true, --(AP +80, Stam +40) Poached Northern Sculpin / Mega Mammoth Head
[57291] = true, --(Mana per 5s +15, Stam +30) Rhino Dogs / Pickled Fangtooth
[57288] = true, --(Haste +30, Stam +30) Baked Manta Ray / Roasted Worg
[57286] = true, --(Crit +30, Stam +30) Poached Nettlefish / Worm Delight
[57139] = true, --(SP +35, Stam +30) Smoked Salmon / Shoveltusk Steak
[57111] = true, --(AP +60, Stam +30) Grilled Sculpin / Mammoth Meal
}
DF.FlaskIDs = {
--Shadowlands
[307185] = true, --Spectral Flask of Power
[307187] = true, --Spectral Stamina Flask
[307166] = true, --Eternal Flask
}
DF.FoodIDs = {
--shadowlands tier 1
[259454] = 1, -- (agility) Feast of Gluttonous Hedonism
[308434] = 1, -- (critical) Phantasmal Souffle and Fries
[308397] = 1, --(critical +18) Butterscotch Marinated Ribs
[308400] = 1, --(critical +30) Spinefin Souffle and Fries
[308488] = 1, -- (haste) Tenebrous Crown Roast Aspic
[308404] = 1, -- (haste +18) Cinnamon Bonefish Stew
[308405] = 1, -- (haste +30) Tenebrous Crown Roast Aspic
[308506] = 1, -- (mastery) Crawler Ravioli with Apple Sauce
[308412] = 1, -- (mastery +18) Meaty Apple Dumplings
[308413] = 1, -- (mastery +30) Iridescent Ravioli with Apple Sauce
[308525] = 1, -- (stamina) Banana Beef Pudding
[308414] = 1, -- (stamina +14) Pickled Meat Smoothie
[308415] = 1, -- (stamina +22) Banana Beef Pudding
[308514] = 1, -- (versatility) Steak a la Mode
[308425] = 1, -- (versatility +18) Sweet Silvergill Sausages
[308426] = 1, -- (versatility +30) Steak a la Mode
[308419] = 1, -- (periodicaly damage) Smothered Shank
[327715] = 1, -- (speed) Fried Bonefish
--feasts
[327706] = 2, --strength +20
[327707] = 2, --stamina +20
[327708] = 2, --intellect +20
[327709] = 2, --agility +20
[327704] = 2, --intellect +18
[327701] = 2, --strength +18
[327705] = 2, --agility +18
}
DF.PotionIDs = {
--Shadowlands
[307159] = true, --Potion of Spectral Agility
[307163] = true, --Potion of Spectral Stamina
[307164] = true, --Potion of Spectral Strength
[307160] = true, --Potion of Hardened Shadows
[307162] = true, --Potion of Spectral Intellect
[307494] = true, --Potion of Empowered Exorcisms
[307495] = true, --Potion of Phantom Fire
[307161] = true, --Potion of Spiritual Clarity
[307496] = true, --Potion of Divine Awakening
[307501] = true, --Potion of Specter Swiftness
[322302] = true, --Potion of Sacrificial Anima
[307497] = true, --Potion of Deathly Fixation
[307195] = true, --Potion of the Hidden Spirit
[307199] = true, --Potion of Soul Purity
[307196] = true, --Potion of Shadow Sight
[307192] = true, --Spiritual Healing Potion
[307194] = true, --Spiritual Rejuvenation Potion
[307193] = true, --Spiritual Mana Potion
[323436] = true, --Purify Soul (greek convent)
-- [] = true, --
[307165] = true, --Spiritual Anti-Venom
}
DF.FeastIDs = {
[308462] = true, --Feast of Gluttonous Hedonism
[307153] = true, --Eternal Cauldron
}
DF.RuneIDs = {
[347901] = true, --Veiled Augmentation
[367405] = true, --Eternal Augmentation
}
elseif (DF.IsWotLKWow()) then
DF.WeaponEnchantIds = {
[5400] = true, --flametongue
[5401] = true, --windfury
}
DF.FlaskIDs = {
[46377] = true, -- Flask of Endless Rage
[46376] = true, -- Flask of the Frost Wyrm
[54213] = true, -- Flask of Pure Mojo
[46379] = true, -- Flask of Stoneblood
[53899] = true, -- Lesser Flask of Toughness
}
DF.FoodIDs = {
[57367] = true, --(Agi +40, Stam +40) Blackended Dragonfin
[57294] = true, --(AP +60, SP +35, Stam +30) Dalaran Clam Chowder / Great Feast
[57365] = true, --(Spirit +40, Stam +40) Cuttlesteak
[57360] = true, --(Hit+40, Stam +40) Worg Tartare / Snapper Extreme
[57358] = true, --(ArmorPen +40, Stam +40) Hearty Rhino
[57356] = true, --(Expertise +40, Stam +40) Rhinolicious Wormsteak
[57334] = true, --(Mana per 5s +20, Stam +40) Spicy Fried Herring / Mighty Rhino Dogs
[57332] = true, --(Haste +40, Stam +40) Imperial Manta Steak / Very Burnt Worg
[57329] = true, --(Crit +40, Stam +40) Spicy Blue Nettlefish / Spicy Worm Burger
[57327] = true, --(SP +46, Stam +40) Firecracker Salmon / Tender Shoveltusk Steak
[57325] = true, --(AP +80, Stam +40) Poached Northern Sculpin / Mega Mammoth Head
[57291] = true, --(Mana per 5s +15, Stam +30) Rhino Dogs / Pickled Fangtooth
[57288] = true, --(Haste +30, Stam +30) Baked Manta Ray / Roasted Worg
[57286] = true, --(Crit +30, Stam +30) Poached Nettlefish / Worm Delight
[57139] = true, --(SP +35, Stam +30) Smoked Salmon / Shoveltusk Steak
[57111] = true, --(AP +60, Stam +30) Grilled Sculpin / Mammoth Meal
}
DF.PotionIDs = {
[53762] = true, --Indestructable Potion
[53908] = true, --Potion of Speed
[53909] = true, --Potion of Wild Magic
[53753] = true, --Potion of Nightmares
[43185] = true, -- Runic Healing Potion
[67489] = true, -- Runic Healing Injector
[53761] = true, -- Powerful Rejuvenation Potion
[53750] = true, -- Crazy Alchemist's Potion
[43186] = true, -- Runic Mana Potion
[67490] = true, -- Runic Mana Injector
}
DF.FeastIDs = {}
DF.RuneIDs = {}
--~Cata temp
elseif (DF.IsClassicWow() or DF.IsCataWow()) then
DF.PotionIDs = {}
DF.FeastIDs = {}
DF.RuneIDs = {}
DF.FoodIDs = {}
DF.FlaskIDs = {}
end
DF.PotionIDs = {
[53762] = true, --Indestructable Potion
[53908] = true, --Potion of Speed
[53909] = true, --Potion of Wild Magic
[53753] = true, --Potion of Nightmares
[43185] = true, -- Runic Healing Potion
[67489] = true, -- Runic Healing Injector
[53761] = true, -- Powerful Rejuvenation Potion
[53750] = true, -- Crazy Alchemist's Potion
[43186] = true, -- Runic Mana Potion
[67490] = true, -- Runic Mana Injector
}
DF.FeastIDs = {}
DF.RuneIDs = {}
-- /dump UnitAura ("player", 1)
-- /dump UnitAura ("player", 2)
@@ -1469,53 +922,5 @@ function DF:GetSpellsForEncounterFromJournal (instanceEJID, encounterEJID)
end
--default spells to use in the range check
DF.SpellRangeCheckListBySpec = {
-- 185245 spellID for Torment, it is always failing to check range with IsSpellInRange()
[577] = 278326, --havoc demon hunter - Consume Magic
[581] = 278326, --vengeance demon hunter - Consume Magic
[250] = 56222, --blood dk - dark command
[251] = 56222, --frost dk - dark command
[252] = 56222, --unholy dk - dark command
[102] = 8921, -- druid balance - Moonfire (45 yards)
[103] = 8921, -- druid feral - Moonfire (40 yards)
[104] = 6795, -- druid guardian - Growl
[105] = 8921, -- druid resto - Moonfire (40 yards)
[253] = 193455, -- hunter bm - Cobra Shot
[254] = 19434, --hunter marks - Aimed Shot
[255] = 271788, --hunter survivor - Serpent Sting
[62] = 227170, --mage arcane - arcane blast
[63] = 133, --mage fire - fireball
[64] = 228597, --mage frost - frostbolt
[268] = 115546 , --monk bm - Provoke
[269] = 117952, --monk ww - Crackling Jade Lightning (40 yards)
[270] = 117952, --monk mw - Crackling Jade Lightning (40 yards)
[65] = 20473, --paladin holy - Holy Shock (40 yards)
[66] = 62124, --paladin protect - Hand of Reckoning
[70] = 62124, --paladin ret - Hand of Reckoning
[256] = 585, --priest disc - Smite
[257] = 585, --priest holy - Smite
[258] = 8092, --priest shadow - Mind Blast
[259] = 185565, --rogue assassination - Poisoned Knife (30 yards)
[260] = 185763, --rogue outlaw - Pistol Shot (20 yards)
[261] = 114014, --rogue sub - Shuriken Toss (30 yards)
[262] = 188196, --shaman elemental - Lightning Bolt
[263] = 187837, --shaman enhancement - Lightning Bolt (instance cast)
[264] = 403, --shaman resto - Lightning Bolt
[265] = 686, --warlock aff - Shadow Bolt
[266] = 686, --warlock demo - Shadow Bolt
[267] = 116858, --warlock destro - Chaos Bolt
[71] = 355, --warrior arms - Taunt
[72] = 355, --warrior fury - Taunt
[73] = 355, --warrior protect - Taunt
}
-- [specID] = spellID
DF.SpellRangeCheckListBySpec = {}
+1 -1
View File
@@ -626,7 +626,7 @@ function detailsFramework:NewTextEntry(parent, container, name, member, width, h
--editbox
newTextEntryObject.editbox = CreateFrame("EditBox", name, parent,"BackdropTemplate")
newTextEntryObject.editbox:SetSize(232, 20)
newTextEntryObject.editbox:SetBackdrop({bgFile = [["Interface\DialogFrame\UI-DialogBox-Background"]], tileSize = 64, tile = true, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 0}})
newTextEntryObject.editbox:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 0}})
newTextEntryObject.editbox:SetTextInsets(3, 0, 0, -3)
newTextEntryObject.editbox:SetWidth(width)
newTextEntryObject.editbox:SetHeight(height)
+1 -7
View File
@@ -321,12 +321,6 @@ function TimeBarMetaFunctions:SetTimer(currentTime, startTime, endTime)
self.statusBar:SetMinMaxValues(self.statusBar.startTime, self.statusBar.endTime)
if (self.direction == "right") then
self.statusBar:SetReverseFill(false)
else
self.statusBar:SetReverseFill(true)
end
if (self.statusBar.dontShowSpark) then
self.statusBar.spark:Hide()
else
@@ -418,7 +412,7 @@ function DF:CreateTimeBar(parent, texture, width, height, value, member, name)
timeBar.statusBar:EnableMouse(false)
timeBar.statusBar.backgroundTexture = timeBar.statusBar:CreateTexture(nil, "border")
timeBar.statusBar.backgroundTexture:SetColorTexture(.1, .1, .1, .6)
timeBar.statusBar.backgroundTexture:SetTexture(.1, .1, .1, .6)
timeBar.statusBar.backgroundTexture:SetAllPoints()
timeBar.statusBar.barTexture = timeBar.statusBar:CreateTexture(nil, "artwork")
+15 -50
View File
@@ -33,18 +33,12 @@ local UnitIsTapDenied = UnitIsTapDenied
local max = math.max
local min = math.min
local abs = math.abs
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetSpellInfo = GetSpellInfo
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local CastInfo = detailsFramework.CastInfo
local PixelUtil = PixelUtil or DFPixelUtil
local UnitGroupRolesAssigned = detailsFramework.UnitGroupRolesAssigned
local cleanfunction = function() end
local PixelUtil = PixelUtil
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--health bar frame
@@ -163,10 +157,9 @@ local cleanfunction = function() end
{"PLAYER_ENTERING_WORLD"},
{"UNIT_HEALTH", true},
{"UNIT_MAXHEALTH", true},
{(IS_WOW_PROJECT_NOT_MAINLINE) and "UNIT_HEALTH_FREQUENT", true}, -- this one is classic-only...
{"UNIT_HEAL_PREDICTION", true},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_ABSORB_AMOUNT_CHANGED", true},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_HEAL_ABSORB_AMOUNT_CHANGED", true},
{"UNIT_ABSORB_AMOUNT_CHANGED", true},
--{"UNIT_HEAL_ABSORB_AMOUNT_CHANGED", true},
}
--setup the castbar to be used by another unit
@@ -195,16 +188,12 @@ local cleanfunction = function() end
--check for settings and update some events
if (not self.Settings.ShowHealingPrediction) then
self:UnregisterEvent("UNIT_HEAL_PREDICTION")
if IS_WOW_PROJECT_MAINLINE then
self:UnregisterEvent("UNIT_HEAL_ABSORB_AMOUNT_CHANGED")
end
self:UnregisterEvent("UNIT_HEAL_ABSORB_AMOUNT_CHANGED")
self.incomingHealIndicator:Hide()
self.healAbsorbIndicator:Hide()
end
if (not self.Settings.ShowShields) then
if IS_WOW_PROJECT_MAINLINE then
self:UnregisterEvent("UNIT_ABSORB_AMOUNT_CHANGED")
end
self:UnregisterEvent("UNIT_ABSORB_AMOUNT_CHANGED")
self.shieldAbsorbIndicator:Hide()
self.shieldAbsorbGlow:Hide()
end
@@ -241,7 +230,7 @@ local cleanfunction = function() end
self:SetTexture(self.Settings.Texture)
self.background:SetAllPoints()
self.background:SetColorTexture(self.Settings.BackgroundColor:GetColor())
self.background:SetTexture(self.Settings.BackgroundColor:GetColor())
--setpoint of these widgets are set inside the function that updates the incoming heal
self.incomingHealIndicator:SetTexture(self:GetTexture())
@@ -321,9 +310,9 @@ local cleanfunction = function() end
if (self.Settings.ShowHealingPrediction) then
--incoming heal on the unit from all sources
local unitHealIncoming = self.displayedUnit and UnitGetIncomingHeals(self.displayedUnit) or 0
local unitHealIncoming = 0--self.displayedUnit and UnitGetIncomingHeals(self.displayedUnit) or 0
--heal absorbs
local unitHealAbsorb = IS_WOW_PROJECT_MAINLINE and self.displayedUnit and UnitGetTotalHealAbsorbs(self.displayedUnit) or 0
local unitHealAbsorb = 0--self.displayedUnit and UnitGetTotalHealAbsorbs(self.displayedUnit) or 0
if (unitHealIncoming > 0) then
--calculate what is the percent of health incoming based on the max health the player has
@@ -347,7 +336,7 @@ local cleanfunction = function() end
end
end
if (self.Settings.ShowShields and IS_WOW_PROJECT_MAINLINE) then
if (self.Settings.ShowShields) then
--damage absorbs
local unitDamageAbsorb = self.displayedUnit and UnitGetTotalAbsorbs (self.displayedUnit) or 0
@@ -616,7 +605,7 @@ detailsFramework.PowerFrameFunctions = {
self:SetTexture(self.Settings.Texture)
self.background:SetAllPoints()
self.background:SetColorTexture(self.Settings.BackgroundColor:GetColor())
self.background:SetTexture(self.Settings.BackgroundColor:GetColor())
if (self.Settings.ShowPercentText) then
self.percentText:Show()
@@ -672,18 +661,6 @@ detailsFramework.PowerFrameFunctions = {
--when a event different from unit_power_update is triggered, update which type of power the unit should show
UpdatePowerInfo = function(self)
if (IS_WOW_PROJECT_MAINLINE and self.Settings.ShowAlternatePower) then -- not available in classic
local barID = UnitPowerBarID(self.displayedUnit)
local barInfo = GetUnitPowerBarInfoByID(barID)
--local name, tooltip, cost = GetUnitPowerBarStringsByID(barID);
--barInfo.barType,barInfo.minPower, barInfo.startInset, barInfo.endInset, barInfo.smooth, barInfo.hideFromOthers, barInfo.showOnRaid, barInfo.opaqueSpark, barInfo.opaqueFlash, barInfo.anchorTop, name, tooltip, cost, barInfo.ID, barInfo.forcePercentage, barInfo.sparkUnderFrame;
if (barInfo and barInfo.showOnRaid and IsInGroup()) then
self.powerType = ALTERNATE_POWER_INDEX
self.minPower = barInfo.minPower
return
end
end
self.powerType = UnitPowerType (self.displayedUnit)
self.minPower = 0
end,
@@ -695,7 +672,7 @@ detailsFramework.PowerFrameFunctions = {
return
end
if (self.powerType == ALTERNATE_POWER_INDEX) then
if (self.powerType == Enum.PowerType.Focus) then
--don't change this, keep the same color as the game tints on CompactUnitFrame.lua
self:SetStatusBarColor(0.7, 0.7, 0.6)
return
@@ -907,15 +884,9 @@ detailsFramework.CastFrameFunctions = {
CastBarEvents = {
{"UNIT_SPELLCAST_INTERRUPTED"},
{"UNIT_SPELLCAST_DELAYED"},
{"UNIT_SPELLCAST_CHANNEL_START"},
{"UNIT_SPELLCAST_CHANNEL_UPDATE"},
{"UNIT_SPELLCAST_CHANNEL_STOP"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_START"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_UPDATE"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_STOP"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_INTERRUPTIBLE"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_NOT_INTERRUPTIBLE"},
{"PLAYER_ENTERING_WORLD"},
{"UNIT_SPELLCAST_START", true},
{"UNIT_SPELLCAST_STOP", true},
@@ -978,9 +949,9 @@ detailsFramework.CastFrameFunctions = {
PixelUtil.SetWidth (self, self.Settings.Width)
PixelUtil.SetHeight(self, self.Settings.Height)
self.background:SetColorTexture(self.Settings.BackgroundColor:GetColor())
self.background:SetTexture(self.Settings.BackgroundColor:GetColor())
self.background:SetAllPoints()
self.extraBackground:SetColorTexture(0, 0, 0, 1)
self.extraBackground:SetTexture(0, 0, 0, 1)
self.extraBackground:SetVertexColor(self.Settings.BackgroundColor:GetColor())
self.extraBackground:SetAllPoints()
@@ -1948,7 +1919,7 @@ function detailsFramework:CreateCastBar(parent, name, settingsOverride)
--animatios flash
local flashTexture = castBar:CreateTexture(nil, "overlay", nil, 7)
flashTexture:SetColorTexture(1, 1, 1, 1)
flashTexture:SetTexture(1, 1, 1, 1)
flashTexture:SetAllPoints()
flashTexture:SetAlpha(0)
flashTexture:Hide()
@@ -1965,12 +1936,6 @@ function detailsFramework:CreateCastBar(parent, name, settingsOverride)
detailsFramework:Mixin(castBar, detailsFramework.CastFrameFunctions)
detailsFramework:Mixin(castBar, detailsFramework.StatusBarFunctions)
castBar:CreateTextureMask()
castBar:AddMaskTexture(castBar.flashTexture)
castBar:AddMaskTexture(castBar.background)
castBar:AddMaskTexture(castBar.extraBackground)
castBar:SetTexture([[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])
--settings and hooks