Skip to content

Commit

Permalink
Merge pull request #4 from Tercioo/shadowlands
Browse files Browse the repository at this point in the history
Shadowlands Branch Merge
  • Loading branch information
Tercioo authored Oct 22, 2020
2 parents b6ef659 + 3ccc198 commit a442708
Show file tree
Hide file tree
Showing 22 changed files with 723 additions and 377 deletions.
2 changes: 1 addition & 1 deletion LibDFramework-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 90001
## Title: Lib: LibDFramework-1.0
## Notes: Base Framework for many Addons

Expand Down
24 changes: 12 additions & 12 deletions auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
--pre checking which tables to fill to avoid checking if the table exists during the gigantic loop for performance

if (not DF.LoadingAuraAlertFrame) then
DF.LoadingAuraAlertFrame = CreateFrame ("frame", "DetailsFrameworkLoadingAurasAlert", UIParent)
DF.LoadingAuraAlertFrame = CreateFrame ("frame", "DetailsFrameworkLoadingAurasAlert", UIParent, "BackdropTemplate")
DF.LoadingAuraAlertFrame:SetSize (340, 75)
DF.LoadingAuraAlertFrame:SetPoint ("center")
DF.LoadingAuraAlertFrame:SetFrameStrata ("TOOLTIP")
Expand Down Expand Up @@ -137,7 +137,7 @@ do
--check if there's a metaPrototype already existing
if (_G[DF.GlobalWidgetControlNames["aura_tracker"]]) then
--get the already existing metaPrototype
local oldMetaPrototype = _G[DF.GlobalWidgetControlNames ["aura_tracker"]]
local oldMetaPrototype = _G[DF.GlobalWidgetControlNames["aura_tracker"]]
--check if is older
if ( (not oldMetaPrototype.dversion) or (oldMetaPrototype.dversion < DF.dversion) ) then
--the version is older them the currently loading one
Expand All @@ -148,11 +148,11 @@ do
end
else
--first time loading the framework
_G[DF.GlobalWidgetControlNames ["aura_tracker"]] = metaPrototype
_G[DF.GlobalWidgetControlNames["aura_tracker"]] = metaPrototype
end
end

local AuraTrackerMetaFunctions = _G[DF.GlobalWidgetControlNames ["aura_tracker"]]
local AuraTrackerMetaFunctions = _G[DF.GlobalWidgetControlNames["aura_tracker"]]

--create panels
local on_profile_changed = function (self, newdb)
Expand Down Expand Up @@ -210,15 +210,15 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")

local f = CreateFrame ("frame", name, parent)
local f = CreateFrame ("frame", name, parent, "BackdropTemplate")
f.db = db
f.OnProfileChanged = on_profile_changed
f.LocTexts = texts
options = options or {}
self.table.deploy (options, aura_panel_defaultoptions)

local f_auto = CreateFrame ("frame", "$parent_Automatic", f)
local f_manual = CreateFrame ("frame", "$parent_Manual", f)
local f_auto = CreateFrame ("frame", "$parent_Automatic", f, "BackdropTemplate")
local f_manual = CreateFrame ("frame", "$parent_Manual", f, "BackdropTemplate")
f_auto:SetPoint ("topleft", f, "topleft", 0, -24)
f_manual:SetPoint ("topleft", f, "topleft", 0, -24)
f_auto:SetSize (600, 600)
Expand Down Expand Up @@ -256,7 +256,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
end

local background_method_selection = CreateFrame ("frame", nil, f)
local background_method_selection = CreateFrame ("frame", nil, f, "BackdropTemplate")
background_method_selection:SetHeight (82)
background_method_selection:SetPoint ("topleft", f, "topleft", 0, 0)
background_method_selection:SetPoint ("topright", f, "topright", 0, 0)
Expand Down Expand Up @@ -342,12 +342,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local textEntryWidth = 120

--create the background
local background_add_blacklist = CreateFrame ("frame", nil, f_auto)
local background_add_blacklist = CreateFrame ("frame", nil, f_auto, "BackdropTemplate")
background_add_blacklist:SetSize (textEntryWidth + 10, 135)
DF:ApplyStandardBackdrop (background_add_blacklist)
background_add_blacklist.__background:SetVertexColor (0.47, 0.27, 0.27)

local background_add_tracklist = CreateFrame ("frame", nil, f_auto)
local background_add_tracklist = CreateFrame ("frame", nil, f_auto, "BackdropTemplate")
background_add_tracklist:SetSize (textEntryWidth + 10, 135)
DF:ApplyStandardBackdrop (background_add_tracklist)
background_add_tracklist.__background:SetVertexColor (0.27, 0.27, 0.47)
Expand Down Expand Up @@ -651,7 +651,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end

local createLineFunc = function (self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self)
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 1, - ((index - 1) * (lineHeight + 1)) - 1)
line:SetSize (scrollWidth - 2, lineHeight)
line:SetScript ("OnEnter", autoTrackList_LineOnEnter)
Expand Down Expand Up @@ -815,7 +815,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end

local scroll_createline = function (self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self)
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(scroll_line_height+1)) - 1)
line:SetSize (scroll_width - 2, scroll_line_height)
line:SetScript ("OnEnter", line_onenter)
Expand Down
Binary file removed background.tga
Binary file not shown.
Binary file removed border_1.tga
Binary file not shown.
Binary file removed border_2.tga
Binary file not shown.
Binary file removed border_3.tga
Binary file not shown.
14 changes: 13 additions & 1 deletion button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@ local ButtonMetaFunctions = _G[DF.GlobalWidgetControlNames ["button"]]
return self.icon:GetTexture()
end
end

function ButtonMetaFunctions:SetBackdrop(...)
return self.button:SetBackdrop(...)
end

function ButtonMetaFunctions:SetBackdropColor(...)
return self.button:SetBackdropColor(...)
end

function ButtonMetaFunctions:SetBackdropBorderColor(...)
return self.button:SetBackdropBorderColor(...)
end

function ButtonMetaFunctions:SetIcon (texture, width, height, layout, texcoord, overlay, textdistance, leftpadding, textheight, short_method)
if (not self.icon) then
Expand Down Expand Up @@ -1053,7 +1065,7 @@ function DF:NewButton (parent, container, name, member, w, h, func, param1, para
ButtonObject.container = container
ButtonObject.options = {OnGrab = false}

ButtonObject.button = CreateFrame ("button", name, parent)
ButtonObject.button = CreateFrame ("button", name, parent,"BackdropTemplate")
DF:Mixin (ButtonObject.button, DF.WidgetFunctions)

build_button (ButtonObject.button)
Expand Down
4 changes: 2 additions & 2 deletions cooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function DF:CreateCoolTip()
--> main frame
local frame1
if (not GameCooltipFrame1) then
frame1 = CreateFrame ("Frame", "GameCooltipFrame1", UIParent)
frame1 = CreateFrame ("Frame", "GameCooltipFrame1", UIParent,"TooltipBackdropTemplate")

tinsert (UISpecialFrames, "GameCooltipFrame1")
DF:CreateFlashAnimation (frame1)
Expand All @@ -299,7 +299,7 @@ function DF:CreateCoolTip()
--> secondary frame
local frame2
if (not GameCooltipFrame2) then
frame2 = CreateFrame ("Frame", "GameCooltipFrame2", UIParent)
frame2 = CreateFrame ("Frame", "GameCooltipFrame2", UIParent,"TooltipBackdropTemplate")

tinsert (UISpecialFrames, "GameCooltipFrame2")
DF:CreateFlashAnimation (frame2)
Expand Down
Binary file removed cooltip_background.tga
Binary file not shown.
25 changes: 19 additions & 6 deletions dropdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,19 @@ local DropDownMetaFunctions = _G[DF.GlobalWidgetControlNames ["dropdown"]]
end

------------------------------------------------------------------------------------------------------------

function DropDownMetaFunctions:SetBackdrop(...)
return self.dropdown:SetBackdrop(...)
end

function DropDownMetaFunctions:SetBackdropColor(...)
return self.dropdown:SetBackdropColor(...)
end

function DropDownMetaFunctions:SetBackdropBorderColor(...)
return self.dropdown:SetBackdropBorderColor(...)
end

--> methods
function DropDownMetaFunctions:IsShown()
return self.dropdown:IsShown()
Expand Down Expand Up @@ -1109,7 +1122,7 @@ function DF:NewDropDown (parent, container, name, member, w, h, func, default, t
end

if (template) then
DropDownObject:SetTemplate (template)
DropDownObject:SetTemplate(template)
end

return DropDownObject
Expand All @@ -1122,7 +1135,7 @@ local border_backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1
local child_backdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 256, insets = {left = 0, right = 0, top = 0, bottom = 0}}

function DF:CreateNewDropdownFrame (parent, name)
local f = CreateFrame ("button", name, parent)
local f = CreateFrame ("button", name, parent,"BackdropTemplate")
f:SetBackdrop (default_backdrop)
f:SetSize (150, 20)

Expand Down Expand Up @@ -1171,7 +1184,7 @@ function DF:CreateNewDropdownFrame (parent, name)
f.arrowTexture2:SetDrawLayer ("OVERLAY", 2)

--dropdown
local border = CreateFrame ("frame", "$Parent_Border", f)
local border = CreateFrame ("frame", "$Parent_Border", f,"BackdropTemplate")
border:Hide()
border:SetFrameStrata ("FULLSCREEN")
border:SetSize (150, 150)
Expand All @@ -1182,14 +1195,14 @@ function DF:CreateNewDropdownFrame (parent, name)
border:SetBackdropBorderColor (0, 0, 0, 1)
f.dropdownborder = border

local scroll = CreateFrame ("ScrollFrame", "$Parent_ScrollFrame", f)
local scroll = CreateFrame ("ScrollFrame", "$Parent_ScrollFrame", f,"BackdropTemplate")
scroll:Hide()
scroll:SetFrameStrata ("FULLSCREEN")
scroll:SetSize (150, 150)
scroll:SetPoint ("topleft", f, "bottomleft", 0, 0)
f.dropdownframe = scroll

local child = CreateFrame ("frame", "$Parent_ScrollChild", scroll)
local child = CreateFrame ("frame", "$Parent_ScrollChild", scroll,"BackdropTemplate")
child:SetSize (150, 150)
child:SetPoint ("topleft", scroll, "topleft", 0, 0)
child:SetBackdrop (child_backdrop)
Expand Down Expand Up @@ -1221,7 +1234,7 @@ end

function DF:CreateDropdownButton (parent, name)

local f = CreateFrame ("button", name, parent)
local f = CreateFrame ("button", name, parent,"BackdropTemplate")
f:SetSize (150, 20)

local statusbar = f:CreateTexture ("$parent_StatusBarTexture", "ARTWORK")
Expand Down
Binary file removed feedback_sites.tga
Binary file not shown.
Loading

0 comments on commit a442708

Please sign in to comment.