View Single Post
  #7  
Unread 10-02-2010, 12:35 AM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
No...no.

See, you add that window/control to the window when you make the window itself, starting off with a background color so you can place and size it correctly. Once you do that, the only thing you have to put in your conditional is switching mouse visible on and off. eg:

Code:
SetupWindow = class(Olenn.DUInterface.Window );

function SetupWindow:Constructor()
	Olenn.DUInterface.Window.Constructor( self,380,225 );
       
        self.moveBlocker=Turbine.UI.Window();
	self.moveBlocker:SetParent(self);
	--Width should be about 25px less than self's width
        self.moveBlocker:SetSize(355,35);
	self.moveBlocker:SetPosition(0,0);
        -- remove following line after you make sure it's placed correctly
	self.moveBlocker:SetBackColor(Turbine.UI.Color(0,0,0));
	self.moveBlocker:SetZOrder(20);
        --next line will make it so window can be moved by default
        --omit it if you want the opposite (SetMouseVisible defaults to true)
        self.moveBlocker:SetMouseVisible(false);
Then your initial conditional

Code:
if ( SetupWindow.locked:IsChecked(true) ) then
     self.moveBlocker:SetMouseVisible(true);
else
     self.moveBlocker:SetMouseVisible(false);
end
finally an event handler example:

Code:
SetupWindow.locked.CheckChanged = function (sender,args)
     self.moveBlocker:SetMouseVisible(SetupWindow.locked:IsChecked());
end
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
Reply With Quote