View Single Post
05-24-21, 08:06 PM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Code:
<Scripts>
	<OnLoad inherit="prepend">
		if BackdropTemplateMixin then -- if this is NOT a Classic type frame, add the backdrop mixin
			Mixin(self, BackdropTemplateMixin)
		end
		self:SetBackdropColor(1.0,1.0,1.0,1);
	</OnLoad>
	<OnMouseDown>
		if ( button == "LeftButton" ) then
			self:StartMoving();
		end
	</OnMouseDown>
	<OnMouseUp>
		self:StopMovingOrSizing();
	</OnMouseUp>
</Scripts>
I missed your OnLoad code.

Lua Code:
  1. if BackdropTemplateMixin then -- if this is NOT a Classic type frame, add the backdrop mixin
  2.     Mixin(self, BackdropTemplateMixin)
  3. end
  4. self:SetBackdropColor(1.0,1.0,1.0,1);
Adding the mixin just configures the frame to use a backdrop. Once that is done, you've then have to actually add the backdrop to colour.

Lua Code:
  1. if BackdropTemplateMixin then -- if this is NOT a Classic type frame, add the backdrop mixin
  2.     Mixin(self, BackdropTemplateMixin)
  3. end
  4. self:SetBackdrop( {... you have to find the actual backdrop information to put here } );
  5. self:SetBackdropColor(1.0,1.0,1.0,1); -- and set the colour
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote