Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --file in the Load() function is the song's BG
- local t = Def.ActorFrame{
- LoseFocusCommand=function(self)
- self:RunCommandsOnChildren(function(child) child:visible(false):finishtweening() end, {})
- end,
- Def.Quad{
- OnCommand=function(self)
- self:FullScreen()
- end
- },
- }
- local num = #t+1
- t[num] = Def.ActorFrameTexture{}
- local t_tex = t[num]
- for i = 1,4 do
- t_tex[#t_tex+1] = Def.Sprite{
- OnCommand=function(self)
- self:Load(file, "stretch")
- self:SetSize(640,480)
- if i == 2 then
- self:zoomx(-1)
- self:x( self:GetX() + self:GetWidth() )
- elseif i == 3 then
- self:zoomy(-1)
- self:y( self:GetY() + self:GetHeight() )
- elseif i == 4 then
- self:zoomx(-1)
- self:zoomy(-1)
- self:xy( self:GetX() + self:GetWidth(), self:GetY() + self:GetHeight() )
- end
- end
- }
- end
- t_tex.OnCommand = function(self)
- self:SetTextureName( "Example 1" )
- self:SetWidth( 640 * 2 )
- self:SetHeight( 480 * 2 )
- self:Create()
- self:Draw()
- self:hibernate(math.huge)
- end
- t[#t+1] = Def.Sprite{
- Texture="Example 1",
- OnCommand=function(self)
- self:Center()
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement