WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR General Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=172)
-   -   Can someone help me out with the Backdrop Change? (https://www.wowinterface.com/forums/showthread.php?t=58173)

Kekskrümel 08-24-20 04:03 PM

Can someone help me out with the Backdrop Change?
 
Hi,

using an old Addon which doesn't get updated anymore, so the Bachdrop change broke it.

Can someone help me out, sadly I am a LUA Noob :/

Code:

local background      = "interface\\AddOns\\aPanels\\media\\halback"         
local border    = "interface\\AddOns\\aPanels\\media\\border"           
 
local panels,n  = {},0
local aPanels = CreateFrame("frame",nil,UIParent)
 
CreatePanel = function(tag, x, y, width, height, texture, border, point, rpoint, anchor, parent)
        panels[n] = CreateFrame("frame", tag, parent)
        panels[n]:SetWidth(width)
        panels[n]:SetHeight(height)
        panels[n]:SetPoint(point, anchor, rpoint, x, y)
        panels[n]:SetBackdrop({bgFile = texture, edgeFile = border, edgeSize = 14,
                          insets = {left = 2, right = 2, top = 2, bottom = 2},
                                                  tile = true, tileSize = 256})
        panels[n]:SetFrameStrata("BACKGROUND")
        panels[n]:Show()
        n = n + 1
end

aPanels.PLAYER_LOGIN = function(self)
        --FuBar
        CreatePanel("aPanels_Fubar01",0,457,1676,30,background,border,"CENTER","CENTER",UIParent,UIParent)
        CreatePanel("aPanels_Fubar02",0,457,1676,30,background,border,"CENTER","CENTER",UIParent,UIParent)

Thx & Greetings

Fizzlemizz 08-24-20 06:13 PM

Lua Code:
  1. local background       = "interface\\AddOns\\aPanels\\media\\halback"          
  2. local border     = "interface\\AddOns\\aPanels\\media\\border"            
  3.  
  4. local panels,n   = {},0
  5. local aPanels = CreateFrame("frame",nil,UIParent)
  6.  
  7. CreatePanel = function(tag, x, y, width, height, texture, border, point, rpoint, anchor, parent)
  8.     panels[n] = CreateFrame("frame", tag, parent, BackdropTemplateMixin and "BackdropTemplate")
  9.     panels[n]:SetWidth(width)
  10.     panels[n]:SetHeight(height)
  11.     panels[n]:SetPoint(point, anchor, rpoint, x, y)
  12.     panels[n]:SetBackdrop({bgFile = texture, edgeFile = border, edgeSize = 14,
  13.                           insets = {left = 2, right = 2, top = 2, bottom = 2},
  14.                           tile = true, tileSize = 256})
  15.     panels[n]:SetFrameStrata("BACKGROUND")
  16.     panels[n]:Show()
  17.     n = n + 1
  18. end
  19.  
  20. aPanels.PLAYER_LOGIN = function(self)
  21.     --FuBar
  22.     CreatePanel("aPanels_Fubar01",0,457,1676,30,background,border,"CENTER","CENTER",UIParent,UIParent)
  23.     CreatePanel("aPanels_Fubar02",0,457,1676,30,background,border,"CENTER","CENTER",UIParent,UIParent)

Kekskrümel 08-25-20 10:36 AM

Yay working.

Thx for the help !

myrroddin 08-25-20 03:42 PM

Heheheh. "Fubar" :eek: Yep, the addon you are updating is ancient. I suggest switching to https://www.wowace.com/projects/libdatabroker-1-1 to support Broker/TitanPanel, and https://www.wowace.com/projects/libdbicon-1-0 if you want an optional button on your minimap.


All times are GMT -6. The time now is 12:15 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI