View Single Post
04-06-13, 05:50 AM   #7
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
Couldn't you create a function that creates the frame and then call on that function every time you create such a frame?

Lua Code:
  1. -- Creates an ordinary frame, just more awesome
  2. function CreateAwesomeFrame(name)
  3.     local f = CreateFrame("Frame", name, UIParent)
  4.     f:SetSize(128, 128) -- this is the really awesome bit
  5.     f:SetBackdrop({
  6.         bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
  7.         insets = {top = 0, left = 0, bottom = 0, right = 0},
  8.     })
  9.     f:SetBackdropColor(1, 1, 1, 0)
  10.     f:SetPoint("CENTER")
  11.    
  12.     return f
  13. end
  14.  
  15. local AwesomeFrame = CreateAwesomeFrame()
__________________
Oh, the simulated horror!
  Reply With Quote