summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <Sam@XPS-SUSE.site>2009-01-21 11:38:27 +0900
committerSam Spilsbury <Sam@XPS-SUSE.site>2009-01-21 11:38:27 +0900
commitab31db71492cd006f8ed3d84deb198f85143a173 (patch)
tree6af3ce997361278ac6a5e669a712bb5bc8c0c410
parent2190012e7ef1e4cfdd60e009f7bcf1474e7e7672 (diff)
parentabeb32d1b3ca8f633b46184d073f668a680257a4 (diff)
downloadsimple-animations-ab31db71492cd006f8ed3d84deb198f85143a173.tar.gz
simple-animations-ab31db71492cd006f8ed3d84deb198f85143a173.tar.bz2
Merge branch 'master' of ../simple-animations
-rw-r--r--animationsim.c2
-rw-r--r--animationsim.h2
-rw-r--r--animationsim.xml.in30
-rw-r--r--flyin.c16
4 files changed, 38 insertions, 12 deletions
diff --git a/animationsim.c b/animationsim.c
index 424f743..a52b83a 100644
--- a/animationsim.c
+++ b/animationsim.c
@@ -65,6 +65,8 @@ static const CompMetadataOptionInfo animEgScreenOptionInfo[] = {
{ "bounce_number", "int", 0, 0, 0 },
{ "bounce_fade", "bool", 0, 0, 0 },
{ "flyin_direction", "int", 0, 0, 0 },
+ { "flyin_direction_x", "float", 0, 0, 0 },
+ { "flyin_direction_y", "float", 0, 0, 0 },
{ "flyin_fade", "bool", 0, 0, 0 },
{ "flyin_distance", "float", 0, 0, 0 },
{ "rotatein_angle", "float", 0, 0, 0 },
diff --git a/animationsim.h b/animationsim.h
index 9fa39fa..ad0a655 100644
--- a/animationsim.h
+++ b/animationsim.h
@@ -26,6 +26,8 @@ typedef enum
ANIMSIM_SCREEN_OPTION_BOUNCE_NUMBER,
ANIMSIM_SCREEN_OPTION_BOUNCE_FADE,
ANIMSIM_SCREEN_OPTION_FLYIN_DIRECTION,
+ ANIMSIM_SCREEN_OPTION_FLYIN_DIRECTION_X,
+ ANIMSIM_SCREEN_OPTION_FLYIN_DIRECTION_Y,
ANIMSIM_SCREEN_OPTION_FLYIN_FADE,
ANIMSIM_SCREEN_OPTION_FLYIN_DISTANCE,
ANIMSIM_SCREEN_OPTION_ROTATEIN_ANGLE,
diff --git a/animationsim.xml.in b/animationsim.xml.in
index c4c3ceb..b815c0b 100644
--- a/animationsim.xml.in
+++ b/animationsim.xml.in
@@ -21,26 +21,44 @@
<option name="flyin_direction" type="int">
<_short>Fly In Direction</_short>
<_long>The direction in which the fly in should take place</_long>
- <default>1</default>
+ <default>0</default>
<desc>
- <value>1</value>
+ <value>0</value>
<name>Up</name>
</desc>
<desc>
- <value>2</value>
+ <value>1</value>
<name>Left</name>
</desc>
<desc>
- <value>3</value>
+ <value>2</value>
<name>Down</name>
</desc>
<desc>
- <value>4</value>
+ <value>3</value>
<name>Right</name>
</desc>
- <min>1</min>
+ <desc>
+ <value>4</value>
+ <name>User Defined</name>
+ </desc>
+ <min>0</min>
<max>4</max>
</option>
+ <option name="flyin_direction_x" type="float">
+ <_short>UD Direction X</_short>
+ <_long>Direction and Distance X for user defined fly in</_long>
+ <default>0</default>
+ <min>-1000</min>
+ <max>1000</max>
+ </option>
+ <option name="flyin_direction_y" type="float">
+ <_short>UD Direction Y</_short>
+ <_long>Direction and Distance Y for user defined fly in</_long>
+ <default>0</default>
+ <min>-1000</min>
+ <max>1000</max>
+ </option>
<option name="flyin_fade" type="bool">
<_short>Fade</_short>
<_long>Fade when flying in</_long>
diff --git a/flyin.c b/flyin.c
index e39e329..7aaceba 100644
--- a/flyin.c
+++ b/flyin.c
@@ -61,22 +61,26 @@ applyFlyinTransform (CompWindow *w)
switch (direction)
{
- case 1:
+ case 0:
offsetX = 0;
- offsetY = -animGetF (w, ANIMSIM_SCREEN_OPTION_FLYIN_DISTANCE);
+ offsetY = animGetF (w, ANIMSIM_SCREEN_OPTION_FLYIN_DISTANCE);
break;
- case 2:
+ case 1:
offsetX = animGetF (w, ANIMSIM_SCREEN_OPTION_FLYIN_DISTANCE);
offsetY = 0;
break;
- case 3:
+ case 2:
offsetX = 0;
offsetY = animGetF (w, ANIMSIM_SCREEN_OPTION_FLYIN_DISTANCE);
break;
- case 4:
- offsetX = -animGetF (w, ANIMSIM_SCREEN_OPTION_FLYIN_DISTANCE);
+ case 3:
+ offsetX = animGetF (w, ANIMSIM_SCREEN_OPTION_FLYIN_DISTANCE);
offsetY = 0;
break;
+ case 4:
+ offsetX = -animGetF (w, ANIMSIM_SCREEN_OPTION_FLYIN_DIRECTION_X);
+ offsetY = animGetF (w, ANIMSIM_SCREEN_OPTION_FLYIN_DIRECTION_Y);
+ break;
}
forwardProgress = fxFlyinAnimProgress (w);