Hmm, thanks Scott.
I'm doing this at present for resizing so I guess I need to use the title instead of nil.
Code:
plugin.sizeChanged = function( scale, height, width )
local options = plugin.options;
local Objectives = plugin.Objectives;
plugin.scale = scale;
nUI_Movers:lockFrame( Objectives, false, nil );
Objectives:SetWidth( width );
Objectives:SetHeight( height );
nUI_Movers:lockFrame( Objectives, true, nil );
end
And this is the code I have set up for enabling it.
Code:
plugin.setEnabled = function( enabled )
if plugin.enabled ~= enabled then
plugin.enabled = enabled;
if not enabled then
local Objectives = plugin.Objectives;
if Objectives.saved_parent then
nUI_Movers:lockFrame( Objectives, false, nil );
Objectives:SetParent( Objectives.saved_parent );
Objectives:SetPoint( "TOPRIGHT", MinimapCluster, "BOTTOMRIGHT", 0, 0 );
Objectives:SetBackdropBorderColor( Objectives.border_color );
Objectives:SetBackdropColor( Objectives.backdrop_color );
end
else
local Objectives = WatchFrame;
print(Objectives);
plugin.Objectives = Objectives;
if not Objectives.saved_parent then
Objectives.saved_parent = Objectives:GetParent();
Objectives.border_color = Objectives:GetBackdropBorderColor();
Objectives.backdrop_color =Objectives:GetBackdropColor();
end
Objectives:SetParent( plugin.container );
Objectives:SetPoint( "TOPLEFT", plugin.container, "TOPLEFT", 10, -10 );
Objectives:SetPoint( "BOTTOMRIGHT", plugin.container, "BOTTOMRIGHT", 0, 0 );
Objectives:SetFrameStrata( plugin.container:GetFrameStrata() );
Objectives:SetFrameLevel( plugin.container:GetFrameLevel()+1 );
Objectives:SetBackdropBorderColor( 0, 0, 0, 0 );
Objectives:SetBackdropColor( 0, 0, 0, 0 );
nUI_Movers:lockFrame( Objectives, true, nil );
end
end
end
It's the same code I use for my other info panels but I guess the big time resizing we need for the watchframe needs an extra set of change ?
Will try it out again tomorrow though.