[/] [trunk/] [InstantCosby/] [InstantCosbyButton.lua] - Rev 9
Compare with Previous |
Blame |
View Log
import "Turbine.UI"
InstantCosbyButton = class( Turbine.UI.Lotro.Button );
function InstantCosbyButton:Constructor()
--Stuff goes here
Turbine.UI.Button.Constructor( self );
self:SetSize( 50, 50 );
--self:SetBackColor( Turbine.UI.Color( 0, 0, 1 ) );
self:SetText( "Coz Me" );
cozWindow = Turbine.UI.Window();
theCoz = Turbine.UI.Button();
cozWindow:SetSize( 500, 589 );
theCoz:SetSize( 500, 489 );
local displayWidth, displayHeight = Turbine.UI.Display.GetSize();
local windowWidth, windowHeight = cozWindow:GetSize();
cozWindow:SetPosition( ( displayWidth - windowWidth ) / 2, ( displayHeight - windowHeight ) / 2 );
--cozWindow:SetBackground( "InstantCosby/resources/cosby1.jpg" );
cozWindow:SetBackColorBlendMode( Turbine.UI.BlendMode.Multiply );
theCoz:SetBackground( "InstantCosby/resources/cosby2.jpg" );
theCoz:SetParent( cozWindow );
local windowWidth, windowHeight = cozWindow:GetSize();
local cozWidth, cozHeight = theCoz:GetSize();
theCoz:SetPosition( ( windowWidth - cozWidth ) / 2 , ( windowHeight - cozHeight ) / 2 + 25);
self.Click = function( sender, args )
cozWindow:SetVisible(true);
end
theCoz.Click = function( sender, args )
cozWindow:SetVisible(false);
end
end
Compare with Previous |
Blame
All times are GMT -5. The time now is 01:49 PM.