View Single Post
  #1  
Unread 09-26-2010, 10:20 PM
Olenn's Avatar
Olenn Olenn is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 47
Help affecting other windows

Okay i am working on the Settings Panel for Satchel, and I was on a roll until I hit the last line.

I am trying to make the slider change the opacity of the Satchel window. If I replace "Olenn.Satchel.SatchelWindow" with self it will successfully change the opacity of the settings window, but how do I get it to change the opacity of the Satchel window?

Code:
	self:SetText("Satchel Settings");
	self:SetSize(400, 500);
	self:SetPosition( (Turbine.UI.Display.GetWidth() / 2) - 200, (Turbine.UI.Display.GetHeight() / 2 ) - 325 );
	self:SetOpacity(1);
	

	self.opacityLabel = Turbine.UI.Label();
	self.opacityLabel:SetParent( self );
	self.opacityLabel:SetSize(100, 50);
	self.opacityLabel:SetPosition(50 , 75);
	self.opacityLabel:SetFont(Turbine.UI.Lotro.Font.Verdana18);
	self.opacityLabel:SetText("Opacity");		
	

	self.opacityScrollbar = Turbine.UI.Lotro.ScrollBar();
	self.opacityScrollbar:SetOrientation( Turbine.UI.Orientation.Horizontal );
	self.opacityScrollbar:SetParent( self );
	self.opacityScrollbar:SetSize( 300, 10 );
	self.opacityScrollbar:SetPosition(50,100);
	
	self.opacityScrollbar.ValueChanged = function( sender, args )
		Olenn.Satchel.SatchelWindow:SetOpacity( ( 55 + ( 200 - self.opacityScrollbar:GetValue() ) ) / 255 );
	end

Last edited by Olenn : 09-27-2010 at 11:21 AM.
Reply With Quote