8.3.0 > 9.0.1
This commit is contained in:
+119
-109
@@ -654,7 +654,7 @@ function DF:NewPanel (parent, container, name, member, w, h, backdrop, backdropc
|
||||
PanelObject.container = container
|
||||
PanelObject.rightButtonClose = false
|
||||
|
||||
PanelObject.frame = CreateFrame ("frame", name, parent)
|
||||
PanelObject.frame = CreateFrame ("frame", name, parent,"BackdropTemplate")
|
||||
PanelObject.frame:SetSize (100, 100)
|
||||
PanelObject.frame.Gradient = {
|
||||
["OnEnter"] = {0.3, 0.3, 0.3, 0.5},
|
||||
@@ -773,7 +773,8 @@ local align_rows = function (self)
|
||||
end
|
||||
|
||||
local cur_width = 0
|
||||
local row_width = self._width / rows_shown
|
||||
local row_width = self._width / max (rows_shown, 0.0001)
|
||||
|
||||
|
||||
local sindex = 1
|
||||
|
||||
@@ -1074,13 +1075,11 @@ local create_panel_entry = function (self, row)
|
||||
pcall (editbox.onleave_func, editbox)
|
||||
end
|
||||
end)
|
||||
|
||||
editbox:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], edgeFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeSize = 1})
|
||||
editbox:SetBackdropColor (1, 1, 1, 0.1)
|
||||
editbox:SetBackdropBorderColor (1, 1, 1, 0.1)
|
||||
|
||||
editbox.editbox.current_bordercolor = {1, 1, 1, 0.1}
|
||||
|
||||
editbox:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
editbox:SetBackdropColor (.2, .2, .2, 0.7)
|
||||
|
||||
tinsert (row.entry_available, editbox)
|
||||
end
|
||||
@@ -1121,7 +1120,6 @@ end
|
||||
local create_panel_icon = function (self, row)
|
||||
row.icon_total = row.icon_total + 1
|
||||
local iconbutton = DF:NewButton (row, nil, "$parentIconButton" .. row.icon_total, "iconbutton", 22, 20)
|
||||
iconbutton:InstallCustomTexture()
|
||||
|
||||
iconbutton:SetHook ("OnEnter", button_on_enter)
|
||||
iconbutton:SetHook ("OnLeave", button_on_leave)
|
||||
@@ -1324,6 +1322,7 @@ function DF:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ro
|
||||
if (type (results [index]) == "string") then
|
||||
local result = results [index]:gsub (".-%\\", "")
|
||||
iconwidget._icon.texture = results [index]
|
||||
iconwidget._icon:SetTexCoord (0.1, .9, 0.1, .9)
|
||||
|
||||
elseif (type (results [index]) == "table") then
|
||||
iconwidget._icon:SetTexture (results [index].texture)
|
||||
@@ -1332,7 +1331,7 @@ function DF:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ro
|
||||
if (textCoord) then
|
||||
iconwidget._icon:SetTexCoord (unpack(textCoord))
|
||||
else
|
||||
iconwidget._icon:SetTexCoord (0, 1, 0, 1)
|
||||
iconwidget._icon:SetTexCoord (0.1, .9, 0.1, .9)
|
||||
end
|
||||
|
||||
local color = results [index].color
|
||||
@@ -1344,6 +1343,7 @@ function DF:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ro
|
||||
end
|
||||
else
|
||||
iconwidget._icon:SetTexture (results [index])
|
||||
iconwidget._icon:SetTexCoord (0.1, .9, 0.1, .9)
|
||||
end
|
||||
|
||||
iconwidget:Show()
|
||||
@@ -1408,7 +1408,7 @@ function DF:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ro
|
||||
panel.scrollframe:Show()
|
||||
end
|
||||
|
||||
local scrollframe = CreateFrame ("scrollframe", name .. "Scroll", panel.widget, "FauxScrollFrameTemplate")
|
||||
local scrollframe = CreateFrame ("scrollframe", name .. "Scroll", panel.widget, "FauxScrollFrameTemplate", "BackdropTemplate")
|
||||
scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, panel.Refresh) end)
|
||||
scrollframe:SetPoint ("topleft", panel.widget, "topleft", 0, -21)
|
||||
scrollframe:SetPoint ("topright", panel.widget, "topright", -23, -21)
|
||||
@@ -1426,7 +1426,7 @@ function DF:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ro
|
||||
local amount = math.floor (((panel._height-21) / size))
|
||||
|
||||
for i = #scrollframe.lines+1, amount do
|
||||
local row = CreateFrame ("frame", panel:GetName() .. "Row_" .. i, panel.widget)
|
||||
local row = CreateFrame ("frame", panel:GetName() .. "Row_" .. i, panel.widget,"BackdropTemplate")
|
||||
row:SetSize (1, size)
|
||||
row.color = {1, 1, 1, .2}
|
||||
|
||||
@@ -1518,7 +1518,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
|
||||
local string_lower = string.lower
|
||||
|
||||
DF.IconPickFrame = CreateFrame ("frame", "DetailsFrameworkIconPickFrame", UIParent)
|
||||
DF.IconPickFrame = CreateFrame ("frame", "DetailsFrameworkIconPickFrame", UIParent, "BackdropTemplate")
|
||||
tinsert (UISpecialFrames, "DetailsFrameworkIconPickFrame")
|
||||
DF.IconPickFrame:SetFrameStrata ("TOOLTIP")
|
||||
|
||||
@@ -1553,7 +1553,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
DF.IconPickFrame.emptyFunction = function() end
|
||||
DF.IconPickFrame.callback = DF.IconPickFrame.emptyFunction
|
||||
|
||||
DF.IconPickFrame.preview = CreateFrame ("frame", nil, UIParent)
|
||||
DF.IconPickFrame.preview = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
|
||||
DF.IconPickFrame.preview:SetFrameStrata ("tooltip")
|
||||
DF.IconPickFrame.preview:SetFrameLevel (6001)
|
||||
DF.IconPickFrame.preview:SetSize (76, 76)
|
||||
@@ -1612,7 +1612,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
end)
|
||||
|
||||
--> close button
|
||||
local close_button = CreateFrame ("button", nil, DF.IconPickFrame, "UIPanelCloseButton")
|
||||
local close_button = CreateFrame ("button", nil, DF.IconPickFrame, "UIPanelCloseButton", "BackdropTemplate")
|
||||
close_button:SetWidth (32)
|
||||
close_button:SetHeight (32)
|
||||
close_button:SetPoint ("TOPRIGHT", DF.IconPickFrame, "TOPRIGHT", -8, -7)
|
||||
@@ -1651,8 +1651,9 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
for j = offset, tabEnd - 1 do
|
||||
--to get spell info by slot, you have to pass in a pet argument
|
||||
local spellType, ID = GetSpellBookItemInfo (j, "player")
|
||||
if (spellType ~= "FUTURESPELL") then
|
||||
if (spellType ~= "FLYOUT") then
|
||||
MACRO_ICON_FILENAMES [index] = GetSpellBookItemTexture (j, "player") or 0
|
||||
SPELLNAMES_CACHE [index] = GetSpellInfo (ID)
|
||||
index = index + 1
|
||||
|
||||
elseif (spellType == "FLYOUT") then
|
||||
@@ -1662,6 +1663,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
local spellID, overrideSpellID, isKnown = GetFlyoutSlotInfo (ID, k)
|
||||
if (isKnown) then
|
||||
MACRO_ICON_FILENAMES [index] = GetSpellTexture (spellID) or 0
|
||||
SPELLNAMES_CACHE [index] = GetSpellInfo (spellID)
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
@@ -1684,6 +1686,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
|
||||
DF.IconPickFrame:SetScript ("OnHide", function()
|
||||
wipe (MACRO_ICON_FILENAMES)
|
||||
wipe (SPELLNAMES_CACHE)
|
||||
DF.IconPickFrame.preview:Hide()
|
||||
collectgarbage()
|
||||
end)
|
||||
@@ -1714,7 +1717,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10}
|
||||
|
||||
for i = 0, 9 do
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..(i+1), DF.IconPickFrame)
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..(i+1), DF.IconPickFrame, "BackdropTemplate")
|
||||
local image = newcheck:CreateTexture ("DetailsFrameworkIconPickFrameButton"..(i+1).."Icon", "overlay")
|
||||
newcheck.icon = image
|
||||
image:SetPoint ("topleft", newcheck, "topleft", 2, -2) image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
|
||||
@@ -1731,7 +1734,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
newcheck:SetScript ("OnLeave", onleave)
|
||||
end
|
||||
for i = 11, 20 do
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame)
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame, "BackdropTemplate")
|
||||
local image = newcheck:CreateTexture ("DetailsFrameworkIconPickFrameButton"..i.."Icon", "overlay")
|
||||
newcheck.icon = image
|
||||
image:SetPoint ("topleft", newcheck, "topleft", 2, -2) image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
|
||||
@@ -1748,7 +1751,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
newcheck:SetScript ("OnLeave", onleave)
|
||||
end
|
||||
for i = 21, 30 do
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame)
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame, "BackdropTemplate")
|
||||
local image = newcheck:CreateTexture ("DetailsFrameworkIconPickFrameButton"..i.."Icon", "overlay")
|
||||
newcheck.icon = image
|
||||
image:SetPoint ("topleft", newcheck, "topleft", 2, -2) image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
|
||||
@@ -1765,7 +1768,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
newcheck:SetScript ("OnLeave", onleave)
|
||||
end
|
||||
for i = 31, 40 do
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame)
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame, "BackdropTemplate")
|
||||
local image = newcheck:CreateTexture ("DetailsFrameworkIconPickFrameButton"..i.."Icon", "overlay")
|
||||
newcheck.icon = image
|
||||
image:SetPoint ("topleft", newcheck, "topleft", 2, -2) image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
|
||||
@@ -1782,7 +1785,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
newcheck:SetScript ("OnLeave", onleave)
|
||||
end
|
||||
for i = 41, 50 do
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame)
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame, "BackdropTemplate")
|
||||
local image = newcheck:CreateTexture ("DetailsFrameworkIconPickFrameButton"..i.."Icon", "overlay")
|
||||
newcheck.icon = image
|
||||
image:SetPoint ("topleft", newcheck, "topleft", 2, -2) image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
|
||||
@@ -1799,7 +1802,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
newcheck:SetScript ("OnLeave", onleave)
|
||||
end
|
||||
for i = 51, 60 do
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame)
|
||||
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..i, DF.IconPickFrame, "BackdropTemplate")
|
||||
local image = newcheck:CreateTexture ("DetailsFrameworkIconPickFrameButton"..i.."Icon", "overlay")
|
||||
newcheck.icon = image
|
||||
image:SetPoint ("topleft", newcheck, "topleft", 2, -2) image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
|
||||
@@ -1816,7 +1819,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
newcheck:SetScript ("OnLeave", onleave)
|
||||
end
|
||||
|
||||
local scroll = CreateFrame ("ScrollFrame", "DetailsFrameworkIconPickFrameScroll", DF.IconPickFrame, "ListScrollFrameTemplate")
|
||||
local scroll = CreateFrame ("ScrollFrame", "DetailsFrameworkIconPickFrameScroll", DF.IconPickFrame, "ListScrollFrameTemplate", "BackdropTemplate")
|
||||
DF:ReskinSlider (scroll)
|
||||
|
||||
local ChecksFrame_Update = function (self)
|
||||
@@ -1836,23 +1839,10 @@ function DF:IconPick (callback, close_when_select, param1, param2)
|
||||
local shown = 0
|
||||
|
||||
if (filter and filter ~= "") then
|
||||
if (#SPELLNAMES_CACHE == 0) then
|
||||
--build name cache
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
for i = 1, #MACRO_ICON_FILENAMES do
|
||||
local spellName = GetSpellInfo (MACRO_ICON_FILENAMES [i])
|
||||
if (spellName) then
|
||||
SPELLNAMES_CACHE [i] = spellName
|
||||
else
|
||||
SPELLNAMES_CACHE [i] = MACRO_ICON_FILENAMES [i]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--do the filter
|
||||
pool = {}
|
||||
for i = 1, #SPELLNAMES_CACHE do
|
||||
if (SPELLNAMES_CACHE [i]:find (filter)) then
|
||||
if (SPELLNAMES_CACHE [i] and SPELLNAMES_CACHE [i]:lower():find (filter)) then
|
||||
pool [#pool+1] = MACRO_ICON_FILENAMES [i]
|
||||
shown = shown + 1
|
||||
end
|
||||
@@ -1917,7 +1907,7 @@ end
|
||||
|
||||
function DF:ShowPanicWarning (text)
|
||||
if (not DF.PanicWarningWindow) then
|
||||
DF.PanicWarningWindow = CreateFrame ("frame", "DetailsFrameworkPanicWarningWindow", UIParent)
|
||||
DF.PanicWarningWindow = CreateFrame ("frame", "DetailsFrameworkPanicWarningWindow", UIParent, "BackdropTemplate")
|
||||
DF.PanicWarningWindow:SetHeight (80)
|
||||
DF.PanicWarningWindow:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
DF.PanicWarningWindow:SetBackdropColor (1, 0, 0, 0.2)
|
||||
@@ -2015,7 +2005,7 @@ function DF:CreateSimplePanel (parent, w, h, title, name, panel_options, db)
|
||||
|
||||
panel_options = panel_options or no_options
|
||||
|
||||
local f = CreateFrame ("frame", name, UIParent)
|
||||
local f = CreateFrame ("frame", name, UIParent,"BackdropTemplate")
|
||||
f:SetSize (w or 400, h or 250)
|
||||
f:SetPoint ("center", UIParent, "center", 0, 0)
|
||||
f:SetFrameStrata ("FULLSCREEN")
|
||||
@@ -2031,7 +2021,7 @@ function DF:CreateSimplePanel (parent, w, h, title, name, panel_options, db)
|
||||
tinsert (UISpecialFrames, name)
|
||||
end
|
||||
|
||||
local title_bar = CreateFrame ("frame", name .. "TitleBar", f)
|
||||
local title_bar = CreateFrame ("frame", name .. "TitleBar", f,"BackdropTemplate")
|
||||
title_bar:SetPoint ("topleft", f, "topleft", 2, -3)
|
||||
title_bar:SetPoint ("topright", f, "topright", -2, -3)
|
||||
title_bar:SetHeight (20)
|
||||
@@ -2190,7 +2180,7 @@ local Panel1PxHasPosition = function (self)
|
||||
end
|
||||
|
||||
function DF:Create1PxPanel (parent, w, h, title, name, config, title_anchor, no_special_frame)
|
||||
local f = CreateFrame ("frame", name, parent or UIParent)
|
||||
local f = CreateFrame ("frame", name, parent or UIParent, "BackdropTemplate")
|
||||
f:SetSize (w or 100, h or 75)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
|
||||
@@ -2213,7 +2203,7 @@ function DF:Create1PxPanel (parent, w, h, title, name, config, title_anchor, no_
|
||||
--print (config.position.x, config.position.x)
|
||||
Panel1PxReadConfig (f)
|
||||
|
||||
local close = CreateFrame ("button", name and name .. "CloseButton", f)
|
||||
local close = CreateFrame ("button", name and name .. "CloseButton", f, "BackdropTemplate")
|
||||
close:SetSize (16, 16)
|
||||
close:SetNormalTexture (DF.folder .. "icons")
|
||||
close:SetHighlightTexture (DF.folder .. "icons")
|
||||
@@ -2223,7 +2213,7 @@ function DF:Create1PxPanel (parent, w, h, title, name, config, title_anchor, no_
|
||||
close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
close:SetAlpha (0.7)
|
||||
|
||||
local lock = CreateFrame ("button", name and name .. "LockButton", f)
|
||||
local lock = CreateFrame ("button", name and name .. "LockButton", f, "BackdropTemplate")
|
||||
lock:SetSize (16, 16)
|
||||
lock:SetNormalTexture (DF.folder .. "icons")
|
||||
lock:SetHighlightTexture (DF.folder .. "icons")
|
||||
@@ -2272,7 +2262,7 @@ end
|
||||
function DF:ShowPromptPanel (message, func_true, func_false, no_repeated, width)
|
||||
|
||||
if (not DetailsFrameworkPromptSimple) then
|
||||
local f = CreateFrame ("frame", "DetailsFrameworkPromptSimple", UIParent)
|
||||
local f = CreateFrame ("frame", "DetailsFrameworkPromptSimple", UIParent, "BackdropTemplate")
|
||||
f:SetSize (400, 80)
|
||||
f:SetFrameStrata ("DIALOG")
|
||||
f:SetPoint ("center", UIParent, "center", 0, 300)
|
||||
@@ -2373,7 +2363,7 @@ function DF:ShowTextPromptPanel (message, callback)
|
||||
|
||||
if (not DF.text_prompt_panel) then
|
||||
|
||||
local f = CreateFrame ("frame", "DetailsFrameworkPrompt", UIParent)
|
||||
local f = CreateFrame ("frame", "DetailsFrameworkPrompt", UIParent, "BackdropTemplate")
|
||||
f:SetSize (400, 120)
|
||||
f:SetFrameStrata ("FULLSCREEN")
|
||||
f:SetPoint ("center", UIParent, "center", 0, 100)
|
||||
@@ -2446,7 +2436,7 @@ end
|
||||
--> options button -- ~options
|
||||
function DF:CreateOptionsButton (parent, callback, name)
|
||||
|
||||
local b = CreateFrame ("button", name, parent)
|
||||
local b = CreateFrame ("button", name, parent, "BackdropTemplate")
|
||||
b:SetSize (14, 14)
|
||||
b:SetNormalTexture (DF.folder .. "icons")
|
||||
b:SetHighlightTexture (DF.folder .. "icons")
|
||||
@@ -2474,7 +2464,7 @@ end
|
||||
--> feedback panel -- ~feedback
|
||||
|
||||
function DF:CreateFeedbackButton (parent, callback, name)
|
||||
local b = CreateFrame ("button", name, parent)
|
||||
local b = CreateFrame ("button", name, parent, "BackdropTemplate")
|
||||
b:SetSize (12, 13)
|
||||
b:SetNormalTexture (DF.folder .. "mail")
|
||||
b:SetPushedTexture (DF.folder .. "mail")
|
||||
@@ -2543,7 +2533,7 @@ local feedback_get_fb_line = function (self)
|
||||
|
||||
local line = self.feedback_lines [self.next_feedback]
|
||||
if (not line) then
|
||||
line = CreateFrame ("frame", "AddonFeedbackPanelFB" .. self.next_feedback, self)
|
||||
line = CreateFrame ("frame", "AddonFeedbackPanelFB" .. self.next_feedback, self, "BackdropTemplate")
|
||||
line:SetBackdrop (backdrop_fb_line)
|
||||
line:SetBackdropColor (0, 0, 0, 0.3)
|
||||
line:SetSize (390, 42)
|
||||
@@ -2664,7 +2654,7 @@ local feedback_get_addons_line = function (self)
|
||||
local line = self.addons_lines [self.next_addons]
|
||||
if (not line) then
|
||||
|
||||
line = CreateFrame ("frame", "AddonFeedbackPanelSA" .. self.next_addons, self)
|
||||
line = CreateFrame ("frame", "AddonFeedbackPanelSA" .. self.next_addons, self, "BackdropTemplate")
|
||||
line:SetSize (128, 64)
|
||||
|
||||
if (self.next_addons == 1) then
|
||||
@@ -2977,7 +2967,7 @@ local create_box = function (self, next_box)
|
||||
thisbox.check = checktexture
|
||||
thisbox.enabled = true
|
||||
|
||||
local button = CreateFrame ("button", nil, self.Graphic)
|
||||
local button = CreateFrame ("button", nil, self.Graphic, "BackdropTemplate")
|
||||
button:SetSize (20, 20)
|
||||
button:SetScript ("OnClick", function()
|
||||
chart_panel_enable_line (self, thisbox)
|
||||
@@ -3475,7 +3465,7 @@ function DF:CreateChartPanel (parent, w, h, name)
|
||||
w = w or 800
|
||||
h = h or 500
|
||||
|
||||
local f = CreateFrame ("frame", name, parent)
|
||||
local f = CreateFrame ("frame", name, parent, "BackdropTemplate")
|
||||
f:SetSize (w or 500, h or 400)
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
@@ -3486,7 +3476,7 @@ function DF:CreateChartPanel (parent, w, h, name)
|
||||
f:SetBackdrop (chart_panel_backdrop)
|
||||
f:SetBackdropColor (.3, .3, .3, .3)
|
||||
|
||||
local c = CreateFrame ("Button", nil, f, "UIPanelCloseButton")
|
||||
local c = CreateFrame ("Button", nil, f, "UIPanelCloseButton", "BackdropTemplate")
|
||||
c:SetWidth (32)
|
||||
c:SetHeight (32)
|
||||
c:SetPoint ("TOPRIGHT", f, "TOPRIGHT", -3, -7)
|
||||
@@ -3625,7 +3615,7 @@ end
|
||||
local gframe_create_line = function (self)
|
||||
local index = #self._lines+1
|
||||
|
||||
local f = CreateFrame ("frame", nil, self)
|
||||
local f = CreateFrame ("frame", nil, self, "BackdropTemplate")
|
||||
self._lines [index] = f
|
||||
f.id = index
|
||||
f:SetScript ("OnEnter", gframe_on_enter_line)
|
||||
@@ -3653,7 +3643,7 @@ local gframe_create_line = function (self)
|
||||
b:SetTexture ([[Interface\COMMON\Indicator-Yellow]])
|
||||
b:SetSize (16, 16)
|
||||
f.ball = b
|
||||
local anchor = CreateFrame ("frame", nil, f)
|
||||
local anchor = CreateFrame ("frame", nil, f, "BackdropTemplate")
|
||||
anchor:SetAllPoints (b)
|
||||
b.tooltip_anchor = anchor
|
||||
|
||||
@@ -3760,7 +3750,7 @@ local gframe_update = function (self, lines)
|
||||
end
|
||||
|
||||
function DF:CreateGFrame (parent, w, h, linewidth, onenter, onleave, member, name)
|
||||
local f = CreateFrame ("frame", name, parent)
|
||||
local f = CreateFrame ("frame", name, parent, "BackdropTemplate")
|
||||
f:SetSize (w or 450, h or 150)
|
||||
--f.CustomLine = [[Interface\AddOns\Details\Libs\LibGraph-2.0\line]]
|
||||
|
||||
@@ -3791,7 +3781,7 @@ end
|
||||
-- ~buttoncontainer
|
||||
|
||||
function DF:CreateButtonContainer (parent, name)
|
||||
local f = CreateFrame ("frame", name, parent)
|
||||
local f = CreateFrame ("frame", name, parent, "BackdropTemplate")
|
||||
-- f.
|
||||
end
|
||||
|
||||
@@ -3923,7 +3913,7 @@ function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_t
|
||||
local button_anchor_y = options_table.button_y or -32
|
||||
local button_text_size = options_table.button_text_size or 10
|
||||
|
||||
local mainFrame = CreateFrame ("frame", frame_name, parent.widget or parent)
|
||||
local mainFrame = CreateFrame ("frame", frame_name, parent.widget or parent, "BackdropTemplate")
|
||||
mainFrame:SetAllPoints()
|
||||
DF:Mixin (mainFrame, DF.TabContainerFunctions)
|
||||
|
||||
@@ -3946,7 +3936,7 @@ function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_t
|
||||
end
|
||||
|
||||
for i, frame in ipairs (frame_list) do
|
||||
local f = CreateFrame ("frame", "$parent" .. frame.name, mainFrame)
|
||||
local f = CreateFrame ("frame", "$parent" .. frame.name, mainFrame, "BackdropTemplate")
|
||||
f:SetAllPoints()
|
||||
f:SetFrameLevel (210)
|
||||
f:Hide()
|
||||
@@ -4163,7 +4153,7 @@ local simple_list_box_SetData = function (self, t)
|
||||
end
|
||||
|
||||
function DF:CreateSimpleListBox (parent, name, title, empty_text, list_table, onclick, options)
|
||||
local f = CreateFrame ("frame", name, parent)
|
||||
local f = CreateFrame ("frame", name, parent, "BackdropTemplate")
|
||||
|
||||
f.ResetWidgets = simple_list_box_ResetWidgets
|
||||
f.GetOrCreateWidget = simple_list_box_GetOrCreateWidget
|
||||
@@ -4380,7 +4370,7 @@ DF.ScrollBoxFunctions.OnSizeChanged = function (self)
|
||||
end
|
||||
|
||||
function DF:CreateScrollBox (parent, name, refresh_func, data, width, height, line_amount, line_height, create_line_func, auto_amount, no_scroll)
|
||||
local scroll = CreateFrame ("scrollframe", name, parent, "FauxScrollFrameTemplate")
|
||||
local scroll = CreateFrame ("scrollframe", name, parent, "FauxScrollFrameTemplate,BackdropTemplate")
|
||||
|
||||
DF:ApplyStandardBackdrop (scroll)
|
||||
|
||||
@@ -4413,8 +4403,8 @@ function DF:CreateResizeGrips (parent)
|
||||
if (parent) then
|
||||
local parentName = parent:GetName()
|
||||
|
||||
local leftResizer = CreateFrame ("button", parentName and parentName .. "LeftResizer" or nil, parent)
|
||||
local rightResizer = CreateFrame ("button", parentName and parentName .. "RightResizer" or nil, parent)
|
||||
local leftResizer = CreateFrame ("button", parentName and parentName .. "LeftResizer" or nil, parent, "BackdropTemplate")
|
||||
local rightResizer = CreateFrame ("button", parentName and parentName .. "RightResizer" or nil, parent, "BackdropTemplate")
|
||||
|
||||
leftResizer:SetPoint ("bottomleft", parent, "bottomleft")
|
||||
rightResizer:SetPoint ("bottomright", parent, "bottomright")
|
||||
@@ -4509,11 +4499,11 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
|
||||
local SCROLL_ROLL_AMOUNT = line_amount
|
||||
|
||||
--keybind set frame
|
||||
local new_keybind_frame = CreateFrame ("frame", name, parent)
|
||||
local new_keybind_frame = CreateFrame ("frame", name, parent, "BackdropTemplate")
|
||||
new_keybind_frame:SetSize (width, height)
|
||||
|
||||
-- keybind scrollframe
|
||||
local keybindScroll = CreateFrame ("scrollframe", "$parentScrollFrame", new_keybind_frame, "FauxScrollFrameTemplate")
|
||||
local keybindScroll = CreateFrame ("scrollframe", "$parentScrollFrame", new_keybind_frame, "FauxScrollFrameTemplate, BackdropTemplate")
|
||||
keybindScroll:SetSize (1019, 348)
|
||||
keybindScroll.Frames = {}
|
||||
new_keybind_frame.keybindScroll = keybindScroll
|
||||
@@ -4607,7 +4597,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
|
||||
spec4:SetPoint ("topleft", specsTitle, "bottomleft", 0, -70)
|
||||
end
|
||||
|
||||
local enter_the_key = CreateFrame ("frame", nil, new_keybind_frame)
|
||||
local enter_the_key = CreateFrame ("frame", nil, new_keybind_frame, "BackdropTemplate")
|
||||
enter_the_key:SetFrameStrata ("tooltip")
|
||||
enter_the_key:SetSize (200, 60)
|
||||
enter_the_key:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
@@ -4817,7 +4807,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
|
||||
local font = "GameFontHighlightSmall"
|
||||
|
||||
for i = 1, SCROLL_ROLL_AMOUNT do
|
||||
local f = CreateFrame ("frame", "$KeyBindFrame" .. i, keybindScroll)
|
||||
local f = CreateFrame ("frame", "$KeyBindFrame" .. i, keybindScroll, "BackdropTemplate")
|
||||
f:SetSize (1009, 20)
|
||||
f:SetPoint ("topleft", keybindScroll, "topleft", 0, -(i-1)*29)
|
||||
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
@@ -4866,7 +4856,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
|
||||
f.ActionText:SetAsAutoComplete ("WordList")
|
||||
end
|
||||
|
||||
local header = CreateFrame ("frame", "$parentOptionsPanelFrameHeader", keybindScroll)
|
||||
local header = CreateFrame ("frame", "$parentOptionsPanelFrameHeader", keybindScroll, "BackdropTemplate")
|
||||
header:SetPoint ("bottomleft", keybindScroll, "topleft", 0, 2)
|
||||
header:SetPoint ("bottomright", keybindScroll, "topright", 0, 2)
|
||||
header:SetHeight (16)
|
||||
@@ -5009,6 +4999,10 @@ end
|
||||
function DF:ApplyStandardBackdrop (f, darkTheme, alphaScale)
|
||||
alphaScale = alphaScale or 1.0
|
||||
|
||||
if(not f.SetBackdrop)then
|
||||
print(debugstack(1,2,1))
|
||||
end
|
||||
|
||||
if (darkTheme) then
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Cooldown\cooldown2]], tileSize = 32, tile = true})
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
@@ -5058,7 +5052,7 @@ DF.TitleFunctions = {
|
||||
|
||||
function DF:CreateTitleBar (f, titleText)
|
||||
|
||||
local titleBar = CreateFrame ("frame", f:GetName() and f:GetName() .. "TitleBar" or nil, f)
|
||||
local titleBar = CreateFrame ("frame", f:GetName() and f:GetName() .. "TitleBar" or nil, f,"BackdropTemplate")
|
||||
titleBar:SetPoint ("topleft", f, "topleft", 2, -3)
|
||||
titleBar:SetPoint ("topright", f, "topright", -2, -3)
|
||||
titleBar:SetHeight (20)
|
||||
@@ -5066,7 +5060,7 @@ function DF:CreateTitleBar (f, titleText)
|
||||
titleBar:SetBackdropColor (.2, .2, .2, 1)
|
||||
titleBar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
local closeButton = CreateFrame ("button", titleBar:GetName() and titleBar:GetName() .. "CloseButton" or nil, titleBar)
|
||||
local closeButton = CreateFrame ("button", titleBar:GetName() and titleBar:GetName() .. "CloseButton" or nil, titleBar, "BackdropTemplate")
|
||||
closeButton:SetSize (16, 16)
|
||||
closeButton:SetNormalTexture (DF.folder .. "icons")
|
||||
closeButton:SetHighlightTexture (DF.folder .. "icons")
|
||||
@@ -5090,6 +5084,9 @@ function DF:CreateTitleBar (f, titleText)
|
||||
f.CloseButton = closeButton
|
||||
f.TitleLabel = titleLabel
|
||||
|
||||
titleBar.CloseButton = closeButton
|
||||
titleBar.Text = titleLabel
|
||||
|
||||
DF:Mixin (f, DF.TitleFunctions)
|
||||
|
||||
return titleBar
|
||||
@@ -5105,7 +5102,7 @@ DF.IconRowFunctions = {
|
||||
local iconFrame = self.IconPool [self.NextIcon]
|
||||
|
||||
if (not iconFrame) then
|
||||
local newIconFrame = CreateFrame ("frame", "$parentIcon" .. self.NextIcon, self)
|
||||
local newIconFrame = CreateFrame ("frame", "$parentIcon" .. self.NextIcon, self, "BackdropTemplate")
|
||||
|
||||
newIconFrame.Texture = newIconFrame:CreateTexture (nil, "artwork")
|
||||
PixelUtil.SetPoint (newIconFrame.Texture, "topleft", newIconFrame, "topleft", 1, -1)
|
||||
@@ -5119,7 +5116,7 @@ DF.IconRowFunctions = {
|
||||
newIconFrame:SetBackdropBorderColor (0, 0, 0, 0)
|
||||
newIconFrame:EnableMouse (false)
|
||||
|
||||
local cooldownFrame = CreateFrame ("cooldown", "$parentIconCooldown" .. self.NextIcon, newIconFrame, "CooldownFrameTemplate")
|
||||
local cooldownFrame = CreateFrame ("cooldown", "$parentIconCooldown" .. self.NextIcon, newIconFrame, "CooldownFrameTemplate, BackdropTemplate")
|
||||
cooldownFrame:SetAllPoints()
|
||||
cooldownFrame:EnableMouse (false)
|
||||
cooldownFrame:SetFrameLevel (newIconFrame:GetFrameLevel()+1)
|
||||
@@ -5352,7 +5349,7 @@ local default_icon_row_options = {
|
||||
}
|
||||
|
||||
function DF:CreateIconRow (parent, name, options)
|
||||
local f = CreateFrame ("frame", name, parent)
|
||||
local f = CreateFrame("frame", name, parent, "BackdropTemplate")
|
||||
f.IconPool = {}
|
||||
f.NextIcon = 1
|
||||
|
||||
@@ -5696,7 +5693,7 @@ DF.HeaderCoreFunctions = {
|
||||
|
||||
if (not columnHeader) then
|
||||
--create a new column header
|
||||
local newHeader = CreateFrame ("button", "$parentHeaderIndex" .. nextHeader, self)
|
||||
local newHeader = CreateFrame ("button", "$parentHeaderIndex" .. nextHeader, self,"BackdropTemplate")
|
||||
newHeader:SetScript ("OnClick", DF.HeaderFunctions.OnClick)
|
||||
|
||||
--header icon
|
||||
@@ -5764,7 +5761,7 @@ local default_header_options = {
|
||||
}
|
||||
|
||||
function DF:CreateHeader (parent, headerTable, options, frameName)
|
||||
local f = CreateFrame ("frame", frameName or "$parentHeaderLine", parent)
|
||||
local f = CreateFrame ("frame", frameName or "$parentHeaderLine", parent,"BackdropTemplate")
|
||||
|
||||
DF:Mixin (f, DF.OptionsFunctions)
|
||||
DF:Mixin (f, DF.HeaderCoreFunctions)
|
||||
@@ -5929,7 +5926,7 @@ DF.RadioGroupCoreFunctions = {
|
||||
anchorOptions: override options for default_framelayout_options table
|
||||
--]=]
|
||||
function DF:CreateRadionGroup (parent, radioOptions, name, options, anchorOptions)
|
||||
local f = CreateFrame ("frame", name, parent)
|
||||
local f = CreateFrame ("frame", name, parent, "BackdropTemplate")
|
||||
|
||||
DF:Mixin (f, DF.OptionsFunctions)
|
||||
DF:Mixin (f, DF.RadioGroupCoreFunctions)
|
||||
@@ -6233,8 +6230,8 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
|
||||
pvptalent = {x2StartAt, -70},
|
||||
group = {x2StartAt, -210},
|
||||
affix = {x2StartAt, -270},
|
||||
encounter_ids = {x2StartAt, -360},
|
||||
map_ids = {x2StartAt, -400},
|
||||
encounter_ids = {x2StartAt, -400},
|
||||
map_ids = {x2StartAt, -440},
|
||||
}
|
||||
|
||||
local editingLabel = DF:CreateLabel (f, "Load Conditions For:")
|
||||
@@ -6336,7 +6333,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
|
||||
|
||||
do
|
||||
--create a frame to show talents selected in other specs or characters
|
||||
local otherTalents = CreateFrame ("frame", nil, f)
|
||||
local otherTalents = CreateFrame ("frame", nil, f, "BackdropTemplate")
|
||||
otherTalents:SetSize (26, 26)
|
||||
otherTalents:SetPoint ("left", talentGroup.Title.widget, "right", 10, -2)
|
||||
otherTalents.Texture = DF:CreateImage (otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
|
||||
@@ -6434,7 +6431,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
|
||||
|
||||
do
|
||||
--create a frame to show talents selected in other specs or characters
|
||||
local otherTalents = CreateFrame ("frame", nil, f)
|
||||
local otherTalents = CreateFrame ("frame", nil, f, "BackdropTemplate")
|
||||
otherTalents:SetSize (26, 26)
|
||||
otherTalents:SetPoint ("left", pvpTalentGroup.Title.widget, "right", 10, -2)
|
||||
otherTalents.Texture = DF:CreateImage (otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
|
||||
@@ -6713,7 +6710,7 @@ DF.DataScrollFunctions = {
|
||||
|
||||
CreateLine = function (self, index)
|
||||
--create a new line
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self)
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
|
||||
line.Update = self.options.update_line_func
|
||||
|
||||
--set its parameters
|
||||
@@ -6944,7 +6941,6 @@ end
|
||||
]]
|
||||
|
||||
function DF:BuildStatusbarAuthorInfo (f, addonBy, authorsNameString)
|
||||
|
||||
local authorName = DF:CreateLabel (f, "" .. (addonBy or "An addon by") .. "|cFFFFFFFF" .. (authorsNameString or "Terciob") .. "|r")
|
||||
authorName.textcolor = "silver"
|
||||
local discordLabel = DF:CreateLabel (f, "Discord: ")
|
||||
@@ -6969,6 +6965,9 @@ function DF:BuildStatusbarAuthorInfo (f, addonBy, authorsNameString)
|
||||
discordTextEntry:HighlightText()
|
||||
end)
|
||||
|
||||
f.authorName = authorName
|
||||
f.discordLabel = discordLabel
|
||||
f.discordTextEntry = discordTextEntry
|
||||
end
|
||||
|
||||
local statusbar_default_options = {
|
||||
@@ -6976,7 +6975,7 @@ local statusbar_default_options = {
|
||||
}
|
||||
|
||||
function DF:CreateStatusBar(f, options)
|
||||
local statusBar = CreateFrame ("frame", nil, f)
|
||||
local statusBar = CreateFrame ("frame", nil, f, "BackdropTemplate")
|
||||
|
||||
DF:Mixin (statusBar, DF.OptionsFunctions)
|
||||
DF:Mixin (statusBar, DF.LayoutFrame)
|
||||
@@ -7109,6 +7108,7 @@ DF.StatusBarFunctions = {
|
||||
|
||||
dversion = DF.dversion,
|
||||
}
|
||||
|
||||
--check if there's a metaPrototype already existing
|
||||
if (_G[DF.GlobalWidgetControlNames["healthBar"]]) then
|
||||
--get the already existing metaPrototype
|
||||
@@ -7163,9 +7163,9 @@ DF.StatusBarFunctions = {
|
||||
|
||||
healthBarMetaFunctions.HealthBarEvents = {
|
||||
{"PLAYER_ENTERING_WORLD"},
|
||||
--{"UNIT_HEALTH", true},
|
||||
{"UNIT_HEALTH", true},
|
||||
{"UNIT_MAXHEALTH", true},
|
||||
{"UNIT_HEALTH_FREQUENT", true},
|
||||
--{"UNIT_HEALTH_FREQUENT", true},
|
||||
{"UNIT_HEAL_PREDICTION", true},
|
||||
{"UNIT_ABSORB_AMOUNT_CHANGED", true},
|
||||
{"UNIT_HEAL_ABSORB_AMOUNT_CHANGED", true},
|
||||
@@ -7401,7 +7401,7 @@ function DF:CreateHealthBar (parent, name, settingsOverride)
|
||||
|
||||
assert (name or parent:GetName(), "DetailsFramework:CreateHealthBar parameter 'name' omitted and parent has no name.")
|
||||
|
||||
local healthBar = CreateFrame ("StatusBar", name or (parent:GetName() .. "HealthBar"), parent)
|
||||
local healthBar = CreateFrame ("StatusBar", name or (parent:GetName() .. "HealthBar"), parent, "BackdropTemplate")
|
||||
do --layers
|
||||
--background
|
||||
healthBar.background = healthBar:CreateTexture (nil, "background")
|
||||
@@ -7599,10 +7599,13 @@ DF.PowerFrameFunctions = {
|
||||
--> when a event different from unit_power_update is triggered, update which type of power the unit should show
|
||||
UpdatePowerInfo = function (self)
|
||||
if (self.Settings.ShowAlternatePower) then
|
||||
local _, minPower, _, _, _, _, showOnRaid = UnitAlternatePowerInfo (self.displayedUnit)
|
||||
if (showOnRaid and IsInGroup()) then
|
||||
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 = minPower
|
||||
self.minPower = barInfo.minPower
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -7672,7 +7675,7 @@ function DF:CreatePowerBar (parent, name, settingsOverride)
|
||||
|
||||
assert (name or parent:GetName(), "DetailsFramework:CreatePowerBar parameter 'name' omitted and parent has no name.")
|
||||
|
||||
local powerBar = CreateFrame ("StatusBar", name or (parent:GetName() .. "PowerBar"), parent)
|
||||
local powerBar = CreateFrame ("StatusBar", name or (parent:GetName() .. "PowerBar"), parent, "BackdropTemplate")
|
||||
do --layers
|
||||
--background
|
||||
powerBar.background = powerBar:CreateTexture (nil, "background")
|
||||
@@ -8300,7 +8303,7 @@ DF.CastFrameFunctions = {
|
||||
|
||||
self.flashTexture:Hide()
|
||||
self:Animation_StopAllAnimations()
|
||||
|
||||
|
||||
self:SetAlpha (1)
|
||||
|
||||
--> set the statusbar color
|
||||
@@ -8312,7 +8315,7 @@ DF.CastFrameFunctions = {
|
||||
|
||||
self.Spark:Show()
|
||||
self:Show()
|
||||
|
||||
|
||||
--> update the interrupt cast border
|
||||
self:UpdateInterruptState()
|
||||
|
||||
@@ -8362,14 +8365,14 @@ DF.CastFrameFunctions = {
|
||||
|
||||
--> set the statusbar color
|
||||
self:UpdateCastColor()
|
||||
|
||||
|
||||
if (not self:IsShown()) then
|
||||
self:Animation_FadeIn()
|
||||
end
|
||||
|
||||
self.Spark:Show()
|
||||
self:Show()
|
||||
|
||||
|
||||
--> update the interrupt cast border
|
||||
self:UpdateInterruptState()
|
||||
|
||||
@@ -8539,7 +8542,7 @@ function DF:CreateCastBar (parent, name, settingsOverride)
|
||||
|
||||
assert (name or parent:GetName(), "DetailsFramework:CreateCastBar parameter 'name' omitted and parent has no name.")
|
||||
|
||||
local castBar = CreateFrame ("StatusBar", name or (parent:GetName() .. "CastBar"), parent)
|
||||
local castBar = CreateFrame ("StatusBar", name or (parent:GetName() .. "CastBar"), parent, "BackdropTemplate")
|
||||
|
||||
do --layers
|
||||
|
||||
@@ -8657,7 +8660,7 @@ function DF:CreateBorderFrame (parent, name)
|
||||
|
||||
local parentName = name or "DetailsFrameworkBorderFrame" .. tostring (math.random (1, 100000000))
|
||||
|
||||
local f = CreateFrame ("frame", parentName, parent)
|
||||
local f = CreateFrame ("frame", parentName, parent, "BackdropTemplate")
|
||||
f:SetFrameLevel (f:GetFrameLevel()+1)
|
||||
f:SetAllPoints()
|
||||
|
||||
@@ -9162,7 +9165,7 @@ function DF:CreateUnitFrame (parent, name, unitFrameSettingsOverride, healthBarS
|
||||
local parentName = name or ("DetailsFrameworkUnitFrame" .. tostring (math.random (1, 100000000)))
|
||||
|
||||
--> create the main unit frame
|
||||
local f = CreateFrame ("button", parentName, parent)
|
||||
local f = CreateFrame ("button", parentName, parent, "BackdropTemplate")
|
||||
|
||||
--> base level
|
||||
local baseFrameLevel = f:GetFrameLevel()
|
||||
@@ -9188,7 +9191,7 @@ function DF:CreateUnitFrame (parent, name, unitFrameSettingsOverride, healthBarS
|
||||
f.border = borderFrame
|
||||
|
||||
--> overlay frame (widgets that need to stay above the unit frame)
|
||||
local overlayFrame = CreateFrame ("frame", "$parentOverlayFrame", f)
|
||||
local overlayFrame = CreateFrame ("frame", "$parentOverlayFrame", f, "BackdropTemplate")
|
||||
borderFrame:SetFrameLevel (f:GetFrameLevel() + 6)
|
||||
f.overlayFrame = overlayFrame
|
||||
|
||||
@@ -9362,7 +9365,7 @@ DF.TimeLineElapsedTimeFunctions = {
|
||||
|
||||
--creates a frame to show the elapsed time in a row
|
||||
function DF:CreateElapsedTimeFrame (parent, name, options)
|
||||
local elapsedTimeFrame = CreateFrame ("frame", name, parent)
|
||||
local elapsedTimeFrame = CreateFrame ("frame", name, parent, "BackdropTemplate")
|
||||
|
||||
DF:Mixin (elapsedTimeFrame, DF.OptionsFunctions)
|
||||
DF:Mixin (elapsedTimeFrame, DF.LayoutFrame)
|
||||
@@ -9429,7 +9432,7 @@ DF.TimeLineBlockFunctions = {
|
||||
else
|
||||
self.icon:SetTexture (nil)
|
||||
self.text:SetText (lineData.text or "")
|
||||
text:SetPoint ("left", self, "left", 2, 0)
|
||||
self.text:SetPoint ("left", self, "left", 2, 0)
|
||||
end
|
||||
|
||||
if (self.dataIndex % 2 == 1) then
|
||||
@@ -9439,12 +9442,14 @@ DF.TimeLineBlockFunctions = {
|
||||
self:SetBackdropColor (r, g, b, a)
|
||||
end
|
||||
|
||||
self:SetWidth (5000)
|
||||
self:SetWidth(5000)
|
||||
|
||||
local timelineData = lineData.timeline
|
||||
local spellId = lineData.spellId
|
||||
local useIconOnBlock = data.useIconOnBlocks
|
||||
|
||||
local baseFrameLevel = parent:GetFrameLevel() + 10
|
||||
|
||||
for i = 1, #timelineData do
|
||||
local blockInfo = timelineData [i]
|
||||
|
||||
@@ -9453,6 +9458,8 @@ DF.TimeLineBlockFunctions = {
|
||||
local isAura = blockInfo [3]
|
||||
local auraDuration = blockInfo [4]
|
||||
|
||||
local payload = blockInfo.payload
|
||||
|
||||
local xOffset = pixelPerSecond * time
|
||||
local width = pixelPerSecond * length
|
||||
|
||||
@@ -9460,13 +9467,16 @@ DF.TimeLineBlockFunctions = {
|
||||
xOffset = xOffset / 2.5
|
||||
end
|
||||
|
||||
local block = self:GetBlock (i)
|
||||
local block = self:GetBlock(i)
|
||||
block:Show()
|
||||
PixelUtil.SetPoint (block, "left", self, "left", xOffset + headerWidth, 0)
|
||||
block:SetFrameLevel(baseFrameLevel + i)
|
||||
|
||||
PixelUtil.SetPoint(block, "left", self, "left", xOffset + headerWidth, 0)
|
||||
|
||||
block.info.spellId = spellId
|
||||
block.info.time = time
|
||||
block.info.duration = auraDuration
|
||||
block.info.payload = payload
|
||||
|
||||
if (useIconOnBlock) then
|
||||
block.icon:SetTexture (lineData.icon)
|
||||
@@ -9502,7 +9512,7 @@ DF.TimeLineBlockFunctions = {
|
||||
GetBlock = function (self, index)
|
||||
local block = self.blocks [index]
|
||||
if (not block) then
|
||||
block = CreateFrame ("frame", nil, self)
|
||||
block = CreateFrame ("frame", nil, self, "BackdropTemplate")
|
||||
self.blocks [index] = block
|
||||
|
||||
local background = block:CreateTexture (nil, "background")
|
||||
@@ -9549,7 +9559,7 @@ DF.TimeLineFunctions = {
|
||||
local line = self.lines [index]
|
||||
if (not line) then
|
||||
--create a new line
|
||||
line = CreateFrame ("frame", "$parentLine" .. index, self.body)
|
||||
line = CreateFrame ("frame", "$parentLine" .. index, self.body, "BackdropTemplate")
|
||||
DF:Mixin (line, DF.TimeLineBlockFunctions)
|
||||
self.lines [index] = line
|
||||
|
||||
@@ -9680,7 +9690,7 @@ function DF:CreateTimeLineFrame (parent, name, options, timelineOptions)
|
||||
local scrollWidth = 800 --placeholder until the timeline receives data
|
||||
local scrollHeight = 800 --placeholder until the timeline receives data
|
||||
|
||||
local frameCanvas = CreateFrame ("scrollframe", name, parent)
|
||||
local frameCanvas = CreateFrame ("scrollframe", name, parent, "BackdropTemplate")
|
||||
DF:Mixin (frameCanvas, DF.TimeLineFunctions)
|
||||
|
||||
frameCanvas.data = {}
|
||||
@@ -9693,7 +9703,7 @@ function DF:CreateTimeLineFrame (parent, name, options, timelineOptions)
|
||||
insets = {left = 1, right = 1, top = 0, bottom = 1},})
|
||||
frameCanvas:SetBackdropColor (.1, .1, .1, .3)
|
||||
|
||||
local frameBody = CreateFrame ("frame", nil, frameCanvas)
|
||||
local frameBody = CreateFrame ("frame", nil, frameCanvas, "BackdropTemplate")
|
||||
frameBody:SetSize (scrollWidth, scrollHeight)
|
||||
|
||||
frameCanvas:SetScrollChild (frameBody)
|
||||
@@ -9708,7 +9718,7 @@ function DF:CreateTimeLineFrame (parent, name, options, timelineOptions)
|
||||
frameCanvas.elapsedTimeFrame = DF:CreateElapsedTimeFrame (frameBody, frameCanvas:GetName() and frameCanvas:GetName() .. "ElapsedTimeFrame", timelineOptions)
|
||||
|
||||
--create horizontal slider
|
||||
local horizontalSlider = CreateFrame ("slider", nil, parent)
|
||||
local horizontalSlider = CreateFrame ("slider", nil, parent, "BackdropTemplate")
|
||||
horizontalSlider.bg = horizontalSlider:CreateTexture (nil, "background")
|
||||
horizontalSlider.bg:SetAllPoints (true)
|
||||
horizontalSlider.bg:SetTexture (0, 0, 0, 0.5)
|
||||
@@ -9731,7 +9741,7 @@ function DF:CreateTimeLineFrame (parent, name, options, timelineOptions)
|
||||
horizontalSlider:SetValue (0)
|
||||
horizontalSlider:SetScript ("OnValueChanged", function (self)
|
||||
local _, maxValue = horizontalSlider:GetMinMaxValues()
|
||||
local stepValue = ceil (ceil(self:GetValue() * maxValue)/maxValue)
|
||||
local stepValue = ceil (ceil(self:GetValue() * maxValue) / max(maxValue, SMALL_FLOAT))
|
||||
if (stepValue ~= horizontalSlider.currentValue) then
|
||||
horizontalSlider.currentValue = stepValue
|
||||
frameCanvas:SetHorizontalScroll (stepValue)
|
||||
@@ -9741,7 +9751,7 @@ function DF:CreateTimeLineFrame (parent, name, options, timelineOptions)
|
||||
frameCanvas.horizontalSlider = horizontalSlider
|
||||
|
||||
--create scale slider
|
||||
local scaleSlider = CreateFrame ("slider", nil, parent)
|
||||
local scaleSlider = CreateFrame ("slider", nil, parent, "BackdropTemplate")
|
||||
scaleSlider.bg = scaleSlider:CreateTexture (nil, "background")
|
||||
scaleSlider.bg:SetAllPoints (true)
|
||||
scaleSlider.bg:SetTexture (0, 0, 0, 0.5)
|
||||
@@ -9775,7 +9785,7 @@ function DF:CreateTimeLineFrame (parent, name, options, timelineOptions)
|
||||
end)
|
||||
|
||||
--create vertical slider
|
||||
local verticalSlider = CreateFrame ("slider", nil, parent)
|
||||
local verticalSlider = CreateFrame ("slider", nil, parent, "BackdropTemplate")
|
||||
verticalSlider.bg = verticalSlider:CreateTexture (nil, "background")
|
||||
verticalSlider.bg:SetAllPoints (true)
|
||||
verticalSlider.bg:SetTexture (0, 0, 0, 0.5)
|
||||
@@ -9890,7 +9900,7 @@ f:Hide()
|
||||
function DF:ShowErrorMessage (errorMessage, titleText)
|
||||
|
||||
if (not DF.ErrorMessagePanel) then
|
||||
local f = CreateFrame ("frame", "DetailsFrameworkErrorMessagePanel", UIParent)
|
||||
local f = CreateFrame ("frame", "DetailsFrameworkErrorMessagePanel", UIParent, "BackdropTemplate")
|
||||
f:SetSize (400, 120)
|
||||
f:SetFrameStrata ("FULLSCREEN")
|
||||
f:SetPoint ("center", UIParent, "center", 0, 100)
|
||||
|
||||
Reference in New Issue
Block a user