/* pandora theme */ body_x=0.5; body_y=0.5; body_w=0; body_h=0; bar_x=0; bar_y=0.73; bar_w=0; bar_h=0; bar_dir=4; img_body = Image("body.png"); img_bar = Image("bar.png"); spr_body = Sprite(img_body); spr_bar = Sprite(img_bar); width = Window.GetHeight(); message="LliureX 15.05"; spr_msg = Sprite(Image.Text("LliureX 15.05")); Window.SetBackgroundTopColor(0.8,0.8,0.8); Window.SetBackgroundBottomColor(0.7,0.7,0.7); /* * message callback function */ fun message_callback(msg) { message=msg; } fun draw_message() { image = Image.Text(message,0,0,0,1); spr_msg.SetImage(image); spr_msg.SetZ(1); spr_msg.SetX(0.1 * Window.GetWidth()); spr_msg.SetY(0.95 * Window.GetHeight()); } fun refresh_callback() { bar_x=bar_x+bar_dir; if(bar_x>335) { bar_dir=-bar_dir; } if(bar_x<0) { bar_dir=-bar_dir; } spr_body.SetX( (body_x*Window.GetWidth())-233); spr_body.SetY(body_y*Window.GetHeight()); spr_bar.SetX((body_x*Window.GetWidth())-225+bar_x); spr_bar.SetY(body_y*Window.GetHeight()+110); draw_message(); } Plymouth.SetMessageFunction(message_callback); Plymouth.SetRefreshFunction (refresh_callback); Plymouth.SetDisplayNormalFunction(refresh_callback); Plymouth.SetUpdateStatusFunction(message_callback); /* End */