View Single Post
12-19-20, 07:26 AM   #20
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Originally Posted by Spyro View Post
Didn't know the backdrop borders have parentkeys.

Do the corners have parentkeys too?

Currently I'm accesing them with GetRegions() lol.
These are the default names:
TopLeftCorner
TopRightCorner
BottomLeftCorner
BottomRightCorner
TopEdge
BottomEdge
LeftEdge
RightEdge
Center

However, the pieces are accessed via:
Lua Code:
  1. local function GetNineSlicePiece(container, pieceName)
  2.     if container.GetNineSlicePiece then
  3.         local piece = container:GetNineSlicePiece(pieceName);
  4.         if piece then
  5.             return piece, true;
  6.         end
  7.     end
  8.  
  9.     local piece = container[pieceName];
  10.     if piece then
  11.         return piece, true;
  12.     else
  13.         piece = container:CreateTexture()
  14.         container[pieceName] = piece;
  15.         return piece, false;
  16.     end
  17. end

The only two places I found using GetNineSlicePiece were for Blizzard_BFAMissionUI and Blizzard_CovenantMissionUI which had keys:
TopLeftCorner
TopRightCorner
BotLeftCorner
BotRightCorner
TopBorder
BottomBorder
LeftBorder
RightBorder
  Reply With Quote