[ease] Instantly transition for SlideActors with <=0 transition time.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] Instantly transition for SlideActors with <=0 transition time.
- Date: Sat, 29 May 2010 07:26:20 +0000 (UTC)
commit 28f23f52f78f758238fec3fe729895109f49990b
Author: Nate Stedman <natesm gmail com>
Date: Sat May 29 03:26:03 2010 -0400
Instantly transition for SlideActors with <=0 transition time.
src/Player.vala | 16 ++++++++++++----
src/SlideActor.vala | 2 +-
2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/Player.vala b/src/Player.vala
index 8a5741f..e6c2680 100644
--- a/src/Player.vala
+++ b/src/Player.vala
@@ -119,13 +119,21 @@ public class Ease.Player : GLib.Object
stage.add_actor(current_slide);
}
else
- {
+ {
old_slide = current_slide;
create_current_slide(slide);
stage.add_actor(current_slide);
- old_slide.transition(current_slide, stack_container);
- old_slide.animation_time.completed.connect(animation_complete);
- can_animate = false;
+
+ if (old_slide.slide.transition_time > 0)
+ {
+ old_slide.transition(current_slide, stack_container);
+ old_slide.animation_time.completed.connect(animation_complete);
+ can_animate = false;
+ }
+ else
+ {
+ animation_complete();
+ }
}
}
diff --git a/src/SlideActor.vala b/src/SlideActor.vala
index db058a2..b087d16 100644
--- a/src/SlideActor.vala
+++ b/src/SlideActor.vala
@@ -25,7 +25,7 @@
public class Ease.SlideActor : Clutter.Group
{
// the represented slide
- private Slide slide;
+ public Slide slide;
// the slide's background
public Clutter.Actor background;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]