View Single Post
08-17-20, 01:19 PM   #28
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
A side note for future travelers, applying the Mixin directly would primarily be used for frames you didn't create but wanted to set a backdrop on (as p3lim pointed out earlier in the thread).

In the library, because lines are created by it, instead of applying the Mixin at
Code:
tipPrototype:AddSeparator(height, r, g, b, a)
you could inherit the template where the line is created

Code:
local function AcquireFrame(parent)
	local frame = tremove(frameHeap) or CreateFrame("Frame", nil, nil, "BackdropTemplate")
Both methods work but the second might save some code if after frame creation, you branch into different functions that also apply backdrops but possibly using different styles etc. (the template does the job of applying the mixin without extra lines of code)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 08-17-20 at 02:19 PM.
  Reply With Quote