WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Aurora skinning help (https://www.wowinterface.com/forums/showthread.php?t=48673)

10leej 12-15-13 03:20 PM

Aurora skinning help
 
So love Aurora except it's 2 pixel border doesn't work well with BobUI very well. So rather than making my own version of Aurora is there a way i can grab the CreateBG function Aurora uses and apply my own border function without having to modify Aurora itself (copyright reasons and all)?

I know I can just skin the frames using the Createborder function from !Beautycase but rather than indexing every frame I'd like to save myself the hassle.

humfras 12-15-13 03:59 PM

You can access Aurora via the global "Aurora".
This table contains two tables:
Aurora[1] contains all functions and Aurora[2] contains constants and config.

You can change/hook the function CreateBG via 'Aurora[1].CreateBG'.

10leej 12-15-13 04:26 PM

So then I can just do something like this?

Lua Code:
  1. Aurora[1].CreateBG = function(frame)
  2.     local f = frame
  3.     if frame:GetObjectType() == "Texture" then f = frame:GetParent() end
  4.     frame:CreateBorder(12,1,1,1)
  5.  
  6.     local bg = f:CreateTexture(nil, "BACKGROUND")
  7.     bg:SetPoint("TOPLEFT", frame, -1, 1)
  8.     bg:SetPoint("BOTTOMRIGHT", frame, 1, -1)
  9.     bg:SetTexture("Interface\\ChatFrame\\ChatFrameBackground")
  10.     bg:SetVertexColor(0, 0, 0)
  11.  
  12.     return bg
  13. end

Sorry not at the comp right now so can't really test via trial and error


All times are GMT -6. The time now is 11:10 PM.

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