Changed BackgroundEffects files to apply the playback rate to videos. Added GetUpdateRate to ActorFrame and Get/SetDecodeMovie to Sprite. Hope nobody is caught off guard by checkerboard no longer playing videos back at 4x rate.

This commit is contained in:
Kyzentun
2015-02-05 00:37:08 -07:00
parent 72aa6c6164
commit ad877b6dcb
29 changed files with 263 additions and 41 deletions
+16 -4
View File
@@ -4,14 +4,26 @@ local Color2 = color(Var "Color2");
local t = Def.ActorFrame {};
t[#t+1] = LoadActor(Var "File1") .. {
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
GainFocusCommand=cmd(play);
LoseFocusCommand=cmd(pause);
OnCommand=function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
-- Explanation in StretchNoLoop.lua.
if self.GetTexture then
self:GetTexture():rate(self:GetParent():GetUpdateRate())
end
end,
GainFocusCommand=cmd(play);
LoseFocusCommand=cmd(pause);
};
if Var("File2") ~= nil then
t[#t+1] = LoadActor(Var("File2")) .. {
OnCommand=cmd(blend,"BlendMode_Add";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color2;effectclock,"music";linear,1;diffusealpha,0);
OnCommand=function(self)
self:blend("BlendMode_Add"):x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color2):effectclock("music"):linear(1):diffusealpha(0)
-- Explanation in StretchNoLoop.lua.
if self.GetTexture then
self:GetTexture():rate(self:GetParent():GetUpdateRate())
end
end,
GainFocusCommand=cmd(play);
LoseFocusCommand=cmd(pause);
};