aboutsummaryrefslogtreecommitdiff
path: root/src/MTools/Anim
diff options
context:
space:
mode:
authormarion2007-07-20 14:50:25 +0000
committermarion2007-07-20 14:50:25 +0000
commite61ee56e425cc7bd0c878729ec84b746a96c7e24 (patch)
tree4d82a19701fba28a28379b0307f1bf45d5d0f87a /src/MTools/Anim
parent389dc2edaab8987dfc1475149940b9e615c2182b (diff)
downloadmtc-e61ee56e425cc7bd0c878729ec84b746a96c7e24.zip
mtc-e61ee56e425cc7bd0c878729ec84b746a96c7e24.tar.gz
mtc-e61ee56e425cc7bd0c878729ec84b746a96c7e24.tar.bz2
mtc-e61ee56e425cc7bd0c878729ec84b746a96c7e24.tar.xz
Déplacement du plisten pour supprimer warning
Diffstat (limited to 'src/MTools/Anim')
-rw-r--r--src/MTools/Anim/MPath.pm57
1 files changed, 29 insertions, 28 deletions
diff --git a/src/MTools/Anim/MPath.pm b/src/MTools/Anim/MPath.pm
index eb8b221..6d73cff 100644
--- a/src/MTools/Anim/MPath.pm
+++ b/src/MTools/Anim/MPath.pm
@@ -98,34 +98,35 @@ sub pathchanged {
}
sub start {
- my ($self) = @_;
-
- my @points = @{$self -> mget ('path')};
- if (!@points) {return;}
- $self -> {__x} = $points [0] -> [0];
- $self -> {__y} = $points [0] -> [1];
- my $pacing = new Anim::Pacing::Linear (-duration => $self -> mget ('duration'));
- $self -> {__percentage} = 0;
- my $animationpath = new Anim::Path::Rectilinear (
- -xdep => 0,
- -ydep => 0,
- -xdest => 100,
- -ydest => 0,
- );
- $self -> {__animation} = my $animation = new Anim (
- -pacing => $pacing,
- -resources => [
- $animationpath,
- -command => sub { $self -> __event (@_)},
- -endcommand => sub {$self -> notify ('ANIMATION_END'); $self -> {__animation} = undef;},
- ],
- -stopcommand => sub {
- $self -> notify ('ANIMATION_ABORD', $self -> __getPoint ($self -> {__percentage}));
- $self -> {__animation} = undef;
- },
- -loop => $self -> mget ('loop'),
- );
- $animation -> start ();
+ my ($self) = @_;
+
+ my @points = @{$self -> mget ('path')};
+ if (!@points) {return;}
+ $self -> {__x} = $points [0] -> [0];
+ $self -> {__y} = $points [0] -> [1];
+ my $pacing = new Anim::Pacing::Linear (-duration => $self -> mget ('duration'));
+ $self -> {__percentage} = 0;
+ my $animationpath = new Anim::Path::Rectilinear (
+ -xdep => 0,
+ -ydep => 0,
+ -xdest => 100,
+ -ydest => 0,
+ );
+ $self -> {__animation} = my $animation = new Anim (
+ -pacing => $pacing,
+ -resources => [
+ $animationpath,
+ -command => sub { $self -> __event (@_)},
+ -endcommand => sub {$self -> notify ('ANIMATION_END');
+ $self -> {__animation} = undef;},
+ ],
+ -stopcommand => sub {
+ $self -> notify ('ANIMATION_ABORD', $self -> __getPoint ($self -> {__percentage}));
+ $self -> {__animation} = undef;
+ },
+ -loop => $self -> mget ('loop'),
+ );
+ $animation -> start ();
}
sub stop {