View Single Post
08-04-20, 11:36 AM   #20
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Originally Posted by p3lim View Post
Lua Code:
  1. Mixin(yourFrame, BackdropTemplateMixin)
Great!

Now I just have to use this code on OnLoad of my old frames, without inherits="BackdropTemplate" and it works on both 8.x and 9.0 versions:
Code:
---------------------------------- testing WoW version
local wowversion, wowbuild, wowdate, wowtocversion = GetBuildInfo()
if (wowtocversion > 90000) then Mixin(self, BackdropTemplateMixin)
---------------------------------- same code for 8.x and 9.x
self:SetBackdrop({
	bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", 
	edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
	tile = true,
	tileSize = 32,
	edgeSize = 32,
	insets = {left = 12, right = 12, top = 12, bottom = 11},
})
----------------------------------
  Reply With Quote