//
// Mi Layout
// Theme by Rafa
class UserConfig
{
}
local my_config = fe.get_config();
//Main Screen
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;
/////////////////////////////////////////////////////////
//
// Global variables
//
///////////////////////////////////////////////////////
//modules
fe.load_module("animate");
//background
local bg = fe.add_image("infinito.jpg" 0, 0, flw, flh); //Fondo del layout imagen video o gif y su posicion en pantalla
//background move
local bg_rise_cfg = { //rise es el efecto de la animacion hay muchas:fall,bottom,etc
when = When.StartLayout, //Cuando se muestra la animacion
when = Transition.ToNewList, //Tipo de transicion
property = "position", //Propiedad hay varios tipos como rise segun la propiedad diferente codigo
start = { x = 0, y = "1080" }, //Donde comienza la animacion posicion x e y
end = { x = 0, y = "0" }, //Donde finaliza la animacion posicion x e y
time = 350 //duracion antes que se muestre
delay = 0 //la velocidad a la que se muestra
tween = Tween.Linear, //tween es otro tipo de efecto este caso en linea
}
animation.add( PropertyAnimation( bg, bg_rise_cfg ) );
//system bar
local snap = fe.add_artwork( "bg.png", 0, 691, 1920, 119 );
//system bar move
local snap_rise_cfg = {
when = When.StartLayout,
when = Transition.ToNewList,
property = "position",
start = { x = 0, y = "1080" },
end = { x = 0, y = "491" },
time = 350
delay = 0
tween = Tween.Linear,
}
animation.add( PropertyAnimation( snap, snap_rise_cfg ) );
//----------------------------------------------------------------------- Wheel List
local surface = fe.add_surface(flw,flh);
surface.visible = true;
local w1 = surface.add_artwork( "wheel", flx*0.001, flh, flw*0.09, flh*0.09 );
w1.index_offset = -3;
w1.preserve_aspect_ratio = true;
w1.alpha = 155;
local w2 = surface.add_artwork( "wheel", flx*0.150, flh, flw*0.09, flh*0.09 );
w2.index_offset = -2;
w2.preserve_aspect_ratio = true;
w2.alpha = 155;
local w3 = surface.add_artwork( "wheel", flx*0.300, flh, flw*0.09, flh*0.09 );
w3.index_offset = -1;
w3.preserve_aspect_ratio = true;
w3.alpha = 155;
local w4 = surface.add_artwork( "wheel", flx*0.434, flh, flw*0.13, flh*0.13 );
w4.index_offset = 0;
w4.preserve_aspect_ratio = true;
local w5 = surface.add_artwork( "wheel", flx*0.600, flh, flw*0.09, flh*0.09 );
w5.index_offset = 1;
w5.preserve_aspect_ratio = true;
w5.alpha = 155;
local w6 = surface.add_artwork( "wheel", flx*0.750, flh, flw*0.09, flh*0.09 );
w6.index_offset = 2;
w6.preserve_aspect_ratio = true;
w6.alpha = 155;
local w7 = surface.add_artwork( "wheel", flx*0.900, flh, flw*0.09, flh*0.09 );
w7.index_offset = 3;
w7.preserve_aspect_ratio = true;
w7.alpha = 155;
local move_w_1 = {
when = Transition.StartLayout,
property = "y",
start = flh,
end = fly*0.880,
time = 2000 easing = Easing.Out,
}
local move_w_s_1 = {
when = Transition.StartLayout,
property = "y",
start = flh,
end = fly*0.855,
time = 2000 easing = Easing.Out,
}
animation.add( PropertyAnimation( w1, move_w_1 ) );
animation.add( PropertyAnimation( w2, move_w_1 ) );
animation.add( PropertyAnimation( w3, move_w_1 ) );
animation.add( PropertyAnimation( w4, move_w_s_1 ) );
animation.add( PropertyAnimation( w5, move_w_1 ) );
animation.add( PropertyAnimation( w6, move_w_1 ) );
animation.add( PropertyAnimation( w7, move_w_1 ) );
En tu layout funciona asi pero las wheels quedan abajo, no sabia q las querias en el centro...
P.D. Si usas el mismo layout para todos los sistemas no te cargara la animacion.
Tenia por ahi una plugin para recargar el layout pero tambien puedes simplemente hacer varios layuts iguales por ej layoutmd,layoutsnes...