Use easing within the carousel views scrolling
It is visible if you scroll more than one card
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define _CAROUSEL_DECK_VIEW_H_
|
||||
|
||||
#include "DeckView.h"
|
||||
#include "Easing.h"
|
||||
|
||||
class CarouselDeckView : public DeckView
|
||||
{
|
||||
@@ -9,8 +10,7 @@ private:
|
||||
enum AnimationStage{
|
||||
NONE = 0,
|
||||
SLIDE_UP,
|
||||
SLIDE_DOWN,
|
||||
SCROLL_TO_SELECTED
|
||||
SLIDE_DOWN
|
||||
};
|
||||
|
||||
static const float scroll_speed;
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
//maintains the current rotation for fluid animations
|
||||
private:
|
||||
float mRotation; //[-1,1]. defines the current rotation of the cards
|
||||
InOutQuadEasing mScrollOffset; //[-1,1]. defines the current rotation of the cards
|
||||
float mSlide; //[-1,1]. defines, the y-offset of the cards
|
||||
int mScrollTarget; //0 <= mScrollTarget < mCards.size(). defines where to scroll to if the current animation is a scroll animation
|
||||
AnimationStage mStage; // state machine state. for animation purposes
|
||||
|
||||
Reference in New Issue
Block a user