aboutsummaryrefslogtreecommitdiff
path: root/src/MTools/Anim
diff options
context:
space:
mode:
authorribet2007-06-06 06:22:04 +0000
committerribet2007-06-06 06:22:04 +0000
commitcc5a8f9ba0bd6bb53d1629e45c781be965799435 (patch)
tree56b5b54cedd8ec64003638a7bb798a7e2f127378 /src/MTools/Anim
parent13d58fea0c447d967c17523bcb95b606ff4feae2 (diff)
downloadmtc-cc5a8f9ba0bd6bb53d1629e45c781be965799435.zip
mtc-cc5a8f9ba0bd6bb53d1629e45c781be965799435.tar.gz
mtc-cc5a8f9ba0bd6bb53d1629e45c781be965799435.tar.bz2
mtc-cc5a8f9ba0bd6bb53d1629e45c781be965799435.tar.xz
Code plus polyvalent
Diffstat (limited to 'src/MTools/Anim')
-rw-r--r--src/MTools/Anim/MOpacity.pm9
-rw-r--r--src/MTools/Anim/MPath.pm9
-rw-r--r--src/MTools/Anim/MScalor.pm9
-rw-r--r--src/MTools/Anim/MTranslator.pm9
4 files changed, 32 insertions, 4 deletions
diff --git a/src/MTools/Anim/MOpacity.pm b/src/MTools/Anim/MOpacity.pm
index d7aba19..cbb5571 100644
--- a/src/MTools/Anim/MOpacity.pm
+++ b/src/MTools/Anim/MOpacity.pm
@@ -129,7 +129,14 @@ sub __event {
}
for (my $i = 0; $i < @targets; $i++)
{
- $targets [$i] -> mconfigure ('-alpha' => $opacity);
+ if (ref($targets [$i]) eq '')
+ {
+ mconfigure ($targets[$i], '-alpha' => $opacity);
+ }
+ else
+ {
+ $targets [$i] -> mconfigure ('-alpha' => $opacity);
+ }
}
$self -> {__opacity} = $opacity;
$self -> notify ('OPACITY_CHANGED', $opacity);
diff --git a/src/MTools/Anim/MPath.pm b/src/MTools/Anim/MPath.pm
index d24e740..910cfb5 100644
--- a/src/MTools/Anim/MPath.pm
+++ b/src/MTools/Anim/MPath.pm
@@ -177,7 +177,14 @@ sub __event {
}
for (my $i = 0; $i < @targets; $i++)
{
- $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y});
+ if (ref($targets [$i]) eq '')
+ {
+ translate ($targets [$i], $x - $self -> {__x}, $y - $self -> {__y});
+ }
+ else
+ {
+ $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y});
+ }
}
$self -> {__x} = $x;
$self -> {__y} = $y;
diff --git a/src/MTools/Anim/MScalor.pm b/src/MTools/Anim/MScalor.pm
index eb8695f..8131b7a 100644
--- a/src/MTools/Anim/MScalor.pm
+++ b/src/MTools/Anim/MScalor.pm
@@ -139,7 +139,14 @@ sub __event {
}
for (my $i = 0; $i < @targets; $i++)
{
- scale ($targets [$i], $x / $self -> {__x}, $y / $self -> {__y}, $cx, $cy);
+ if (ref($targets [$i]) eq '')
+ {
+ scale ($targets [$i], $x / $self -> {__x}, $y / $self -> {__y}, $cx, $cy);
+ }
+ else
+ {
+ $targets [$i] -> scale ($x / $self -> {__x}, $y / $self -> {__y}, $cx, $cy);
+ }
}
$self -> {__x} = $x;
$self -> {__y} = $y;
diff --git a/src/MTools/Anim/MTranslator.pm b/src/MTools/Anim/MTranslator.pm
index c50aef9..734f42b 100644
--- a/src/MTools/Anim/MTranslator.pm
+++ b/src/MTools/Anim/MTranslator.pm
@@ -155,7 +155,14 @@ sub event {
}
else
{
- $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y});
+ if (ref($targets [$i]) eq '')
+ {
+ translate ($targets [$i], $x - $self -> {__x}, $y - $self -> {__y});
+ }
+ else
+ {
+ $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y});
+ }
}
}
$self -> {__x} = $x;