EmptyAnim

This commit is contained in:
miks1965 2018-03-16 14:32:42 +03:00
parent 6e86ad9d32
commit fc02fe8edc
4 changed files with 43 additions and 15 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "3";
public const string Build = "5";
public const string Revision = "1638";
public const string Revision = "1639";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=3
%REVISION%=1638
%COREVERSION%=5
%REVISION%=1639
%MINOR%=3
%MAJOR%=3

View file

@ -1 +1 @@
!define VERSION '3.3.5.1638'
!define VERSION '3.3.5.1639'

View file

@ -767,15 +767,6 @@ type
d();
end;
procedure BeginT;
begin
sb := CreateStoryboard;
InitAnim(sb);
ApplyAllDecorators;
sb.Completed += procedure (o, e) -> sb.Children.Clear;
sb.Begin;
end;
procedure InitAnimWait(sb: StoryBoard; waittime: real); virtual;
begin
end;
@ -870,9 +861,34 @@ type
Result := Self;
end;
private
procedure BeginT;
begin
sb := CreateStoryboard;
InitAnim(sb);
ApplyAllDecorators;
sb.Completed += procedure (o, e) -> sb.Children.Clear;
sb.Begin;
end;
procedure RemoveT := begin
sb.Pause;
sb := new Storyboard;
end;
procedure ChangeT(a: MyAnimation);
begin
sb := CreateStoryboard;
Print(a.sb);
foreach var d in a.sb.Children do
sb.Children.Add(d);
Print(2);
end;
public
procedure &Begin; virtual := Invoke(BeginT);
procedure Pause := sb.Pause;
procedure Resume := sb.Resume;
procedure Remove := Invoke(RemoveT);
procedure Change(a: MyAnimation) := Invoke(ChangeT,a);
procedure Pause := if sb<>nil then sb.Pause;
procedure Resume := if sb<>nil then sb.Resume;
function Duration: real; virtual := seconds;
function &Then(second: MyAnimation): MyAnimation;
function Forever: MyAnimation; virtual := Self;
@ -880,6 +896,16 @@ type
function AccelerationRatio(acceleration: real; deceleration: real := 0): MyAnimation; virtual := Self;
end;
EmptyAnimation = class(MyAnimation)
public
constructor(wait: real);
begin
Self.Seconds := wait;
end;
procedure InitAnim(sb: StoryBoard); virtual := InitAnimWait(sb, Seconds);
end;
Double1AnimationBase = class(MyAnimation)
private
v: real;
@ -1279,6 +1305,8 @@ function operator*(a, b: MyAnimation): MyAnimation; extensionmethod := Animate.G
function MyAnimation.&Then(second: MyAnimation): MyAnimation := Self + second;
function EmptyAnim(sec: real) := EmptyAnimation.Create(sec);
//------------------------------ End Animation -------------------------------