Пример #1
0
// Constructor
SlideOutWidget::SlideOutWidget()
{
   mActivating = false;
   mWidth = 350;           // Menus should set this to a real value so they appear more quickly
   setStartingOffset(0);
   mDisplayEasing = Easing::QuarticEaseIn;
   mHideEasing = Easing::QuarticEaseOut;
}
Пример #2
0
// User requested widget to close
void SlideOutWidget::onDeactivated()
{
   S32 currentWidth  = getCurrentDisplayWidth();
   S32 expectedWidth = getTotalDisplayWidth();
   setStartingOffset(0);
   setExpectedWidth(expectedWidth);

   mAnimationTimer.reset(currentWidth / WidgetSpeed, expectedWidth / WidgetSpeed);
   mActivating = false;
}
Пример #3
0
// User requested widget to open
void SlideOutWidget::onActivated() 
{
   S32 currDisplayWidth = 0;
   mActivationDirection = true;     // Normal

   // If we're still playing the animation from a previous action, we need to grab it's width to
   // use as the starting point for animating this activation
   if(isActive())
      currDisplayWidth = getCurrentDisplayWidth();

   mActivating = true;
   setStartingOffset(currDisplayWidth);
   adjustAnimationTimer();
}
Пример #4
0
// Constructor
SlideOutWidget::SlideOutWidget()
{
   mActivating = false;
   mWidth = 350;           // Menus should set this to a real value so they appear more quickly
   setStartingOffset(0);
}