Apply background bitmap appear/disappear effect
authorWoowon <woowon.park@samsung.com>
Tue, 16 Jul 2013 12:24:37 +0000 (21:24 +0900)
committerWoowon <woowon.park@samsung.com>
Thu, 18 Jul 2013 07:45:51 +0000 (16:45 +0900)
Change-Id: Ibed7d58ee37ab190742bb5d035f2953e4d24041b
Signed-off-by: Woowon <woowon.park@samsung.com>
src/nfc-push-ui-app-control/inc/NfcPushUiForm.h
src/nfc-push-ui-app-control/src/NfcPushUiForm.cpp

index 2f51bb5..fa2d693 100644 (file)
@@ -47,8 +47,8 @@ public:
 public:
        result CaptureScreen(void);
        result DrawBitmapToCanvas(const Tizen::Graphics::Rectangle& rect);
-       result DrawAppInfoToCanvas(const Tizen::Graphics::Rectangle& rect);
-       result DrawGuideTextToCanvas(const Tizen::Graphics::Rectangle& rect);
+       result DrawAppInfoToCanvas(const Tizen::Graphics::Rectangle& rect, Tizen::Graphics::Canvas* pCanvas);
+       result DrawGuideTextToCanvas(const Tizen::Graphics::Rectangle& rect, Tizen::Graphics::Canvas* pCanvas);
        void FinishAppControl(RequestId reqId, Tizen::App::AppCtrlResult appCtrlResult);
 
        void PlayBoundsAnimation(const Tizen::Base::String& animationName, int repeatCount, int duration, bool autoReverse = false);
@@ -84,10 +84,35 @@ public:
        virtual void OnNfcDeactivated(result r) {}
 
 public:
-       static const int _DURATION_GROW_;
-       static const int _DURATION_OPACITY_;
-       static const int _DURATION_REPEAT_;
-       static const int _DURATION_OPACITY2_;
+       static const int _DURATION_GROW_ = 667;
+       static const int _DURATION_REPEAT_ = 516;
+       static const int _DURATION_OPACITY_ICON_APPEAR_ = 497;
+       static const int _DURATION_OPACITY_BACKGROUND_ = 333;
+       static const int _DURATION_OPACITY_ICON_DISAPPEAR_ = 431;
+
+       static const int _DELAY_GROW_ = 167;
+       static const int _DELAY_BACKGROUND_DISAPPEAR_ = 500;
+       static const int _DELAY_GUIDE_TEXT_DISAPPEAR_ = 500;
+       static const int _DELAY_APPINFO_TEXT_DISAPPEAR_ = 500;
+       static const int _DELAY_OPACITY_ICON_APPEAR_ = 336;
+
+       static const int _GUIDE_TEXT_WIDTH_ = 720;
+       static const int _GUIDE_TEXT_HEIGHT_ = 42;
+       static const int _GUIDE_TEXT_COORDINATES_X_ = 0;
+       static const int _GUIDE_TEXT_COORDINATES_Y_ = 250;
+       static const int _APPINFO_TEXT_WIDTH_ = 720;
+       static const int _APPINFO_TEXT_HEIGHT_ = 42;
+       static const int _APPINFO_TEXT_COORDINATES_X_ = 0;
+       static const int _APPINFO_TEXT_COORDINATES_Y_ = 770;
+       static const int _CIRCLE_WIDTH_ = 242;
+       static const int _CIRCLE_HEIGHT_ = 242;
+       static const int _CIRCLE_COORDINATES_X_ = 239;
+       static const int _CIRCLE_COORDINATES_Y_ = 486;
+       static const int _ICON_WIDTH_ = 106;
+       static const int _ICON_HEIGHT_ = 106;
+       static const int _ICON_COORDINATES_X_ = 307;
+       static const int _ICON_COORDINATES_Y_ = 554;
+
 
 private:
        RequestId __reqId;
@@ -99,6 +124,9 @@ private:
        Tizen::Net::Nfc::NfcManager* __pNfcManager;
        Tizen::Ui::Animations::VisualElement* __pVisualElementBounds;
        Tizen::Ui::Animations::VisualElement* __pVisualElementOpacity;
+       Tizen::Ui::Animations::VisualElement* __pVisualElementBackground;
+       Tizen::Ui::Animations::VisualElement* __pVisualElementGuideText;
+       Tizen::Ui::Animations::VisualElement* __pVisualElementAppInfo;
        Tizen::Ui::Animations::VisualElement* __pVisualElement;
        Tizen::Graphics::FloatRectangle __startRect;
        Tizen::Graphics::FloatRectangle __endRect;
index 118a28f..a72a222 100644 (file)
@@ -46,11 +46,6 @@ using namespace Tizen::Graphics;
 using namespace Tizen::Net::Nfc;
 using namespace Tizen::Media;
 
-const int NfcPushUiForm::_DURATION_GROW_ = 667;
-const int NfcPushUiForm::_DURATION_OPACITY_ = 497;
-const int NfcPushUiForm::_DURATION_REPEAT_ = 516;
-const int NfcPushUiForm::_DURATION_OPACITY2_ = 431;
-
 NfcPushUiForm::NfcPushUiForm(void)
        : __reqId(-1)
        , __pCapturedScreen(null)
@@ -61,6 +56,9 @@ NfcPushUiForm::NfcPushUiForm(void)
        , __pNfcManager(null)
        , __pVisualElementBounds(null)
        , __pVisualElementOpacity(null)
+       , __pVisualElementBackground(null)
+       , __pVisualElementGuideText(null)
+       , __pVisualElementAppInfo(null)
        , __pVisualElement(null)
        , __startRect()
        , __endRect()
@@ -153,20 +151,103 @@ NfcPushUiForm::OnInitializing(void)
        GetVisualElement()->AttachChild(*__pVisualElement);
 
        ////////////////////////////////////////////////////////////////////////////////
+       // Opacity background
+       ////////////////////////////////////////////////////////////////////////////////
+       Rectangle rect = GetClientAreaBounds();
+       __pVisualElementBackground = new (std::nothrow) VisualElement();
+       __pVisualElementBackground->Construct();
+       __pVisualElementBackground->SetName(L"Background");
+       __pVisualElementBackground->SetBounds(FloatRectangle(0, 0, __rect.width, __rect.height));
+       __pVisualElementBackground->SetShowState(true);
+       __pVisualElementBackground->SetImplicitAnimationEnabled(false);
+       __pVisualElement->AttachChild(*__pVisualElementBackground);
+
+       std::unique_ptr<Canvas> pCanvas(__pVisualElementBackground->GetCanvasN());
+       SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Failed to get canvas.");
+
+       if (__isCaptured == false)
+       {
+               // get canvas from form
+               r = CaptureScreen();
+               SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to capture screen.");
+               __isCaptured = true;
+       }
+
+       __startOpacity = 0.0f;
+       __endOpacity = 1.0f;
+
+       // draw bitmap
+       pCanvas->SetBackgroundColor(Color(0x00000000));
+       pCanvas->Clear();
+       r = pCanvas->DrawBitmap(rect, *__pCapturedScreen);
+       SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to draw captured screen to canvas.");
+
+       // darkening
+       r = pCanvas->FillRectangle(Color(0xC0000000), rect);
+       SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to darken the captured screen.");
+
+       // set an opacity level
+       __pVisualElementBackground->SetOpacity(__startOpacity);
+
+       ////////////////////////////////////////////////////////////////////////////////
+       // Opacity guide text
+       ////////////////////////////////////////////////////////////////////////////////
+       __pVisualElementGuideText = new (std::nothrow) VisualElement();
+       __pVisualElementGuideText->Construct();
+       __pVisualElementGuideText->SetName(L"GuideText");
+       __pVisualElementGuideText->SetBounds(FloatRectangle(_GUIDE_TEXT_COORDINATES_X_, _GUIDE_TEXT_COORDINATES_Y_,
+                       _GUIDE_TEXT_WIDTH_, 100));
+       __pVisualElementGuideText->SetShowState(true);
+       __pVisualElementGuideText->SetImplicitAnimationEnabled(false);
+       __pVisualElement->AttachChild(*__pVisualElementGuideText);
+
+       pCanvas.reset(__pVisualElementGuideText->GetCanvasN());
+       SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Failed to get canvas.");
+
+       // draw guide text
+       pCanvas->SetBackgroundColor(Color(0x00000000));
+       pCanvas->Clear();
+       DrawGuideTextToCanvas(rect, pCanvas.get());
+       // set an opacity level
+       __pVisualElementGuideText->SetOpacity(__startOpacity);
+
+       ////////////////////////////////////////////////////////////////////////////////
+       // Opacity app info
+       ////////////////////////////////////////////////////////////////////////////////
+       __pVisualElementAppInfo = new (std::nothrow) VisualElement();
+       __pVisualElementAppInfo->Construct();
+       __pVisualElementAppInfo->SetName(L"AppInfo");
+       __pVisualElementAppInfo->SetBounds(FloatRectangle(_APPINFO_TEXT_COORDINATES_X_, _APPINFO_TEXT_COORDINATES_Y_,
+                       _APPINFO_TEXT_WIDTH_, 100));
+       __pVisualElementAppInfo->SetShowState(true);
+       __pVisualElementAppInfo->SetImplicitAnimationEnabled(false);
+       __pVisualElement->AttachChild(*__pVisualElementAppInfo);
+
+       pCanvas.reset(__pVisualElementAppInfo->GetCanvasN());
+       SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Failed to get canvas.");
+
+       // draw app info
+       pCanvas->SetBackgroundColor(Color(0x00000000));
+       pCanvas->Clear();
+       DrawAppInfoToCanvas(rect, pCanvas.get());
+       // set an opacity level
+       __pVisualElementAppInfo->SetOpacity(__startOpacity);
+
+       ////////////////////////////////////////////////////////////////////////////////
        // bounds
        ////////////////////////////////////////////////////////////////////////////////
        __pVisualElementBounds = new (std::nothrow) VisualElement();
        __pVisualElementBounds->Construct();
        __pVisualElementBounds->SetName(L"Grow");
-       __pVisualElementBounds->SetBounds(FloatRectangle((__rect.width / 2.0f) - 121.0f, __rect.height  - 794.0f, 242.0f, 242.0f));
+       __pVisualElementBounds->SetBounds(FloatRectangle(_CIRCLE_COORDINATES_X_, _CIRCLE_COORDINATES_Y_, _CIRCLE_WIDTH_, _CIRCLE_HEIGHT_));
        __pVisualElementBounds->SetShowState(true);
        __pVisualElementBounds->SetImplicitAnimationEnabled(false);
        __pVisualElement->AttachChild(*__pVisualElementBounds);
 
        __endRect = __pVisualElementBounds->GetBounds();
-       __startRect = FloatRectangle(__endRect.x + 121.0f, __endRect.y + 121.0f, 0, 0);
+       __startRect = FloatRectangle(__endRect.x + (_CIRCLE_WIDTH_ / 2), __endRect.y + (_CIRCLE_HEIGHT_ / 2), 0, 0);
 
-       std::unique_ptr<Canvas> pCanvas(__pVisualElementBounds->GetCanvasN());
+       pCanvas.reset(__pVisualElementBounds->GetCanvasN());
        SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Failed to get canvas.");
 
        std::unique_ptr<Bitmap> pBitmap;
@@ -181,7 +262,7 @@ NfcPushUiForm::OnInitializing(void)
        SysTryReturnResult(NID_NET_NFC, pBitmap != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
 
        // scale the bitmap
-       r = pBitmap->Scale(Dimension(242, 242));
+       r = pBitmap->Scale(Dimension(_CIRCLE_WIDTH_, _CIRCLE_HEIGHT_));
        SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to scale the bitmap.");
 
        // draw the bitmap
@@ -198,7 +279,7 @@ NfcPushUiForm::OnInitializing(void)
        __pVisualElementOpacity = new (std::nothrow) VisualElement();
        __pVisualElementOpacity->Construct();
        __pVisualElementOpacity->SetName(L"Opacity");
-       __pVisualElementOpacity->SetBounds(FloatRectangle((__rect.width / 2) - 53, __rect.height - 726, 106, 106));
+       __pVisualElementOpacity->SetBounds(FloatRectangle(_ICON_COORDINATES_X_, _ICON_COORDINATES_Y_, _ICON_WIDTH_, _ICON_HEIGHT_));
        __pVisualElementOpacity->SetShowState(true);
        __pVisualElementOpacity->SetImplicitAnimationEnabled(false);
        __pVisualElement->AttachChild(*__pVisualElementOpacity);
@@ -211,12 +292,9 @@ NfcPushUiForm::OnInitializing(void)
        SysTryReturnResult(NID_NET_NFC, pBitmap != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
 
        // scale the bitmap
-       r = pBitmap->Scale(Dimension(106, 106));
+       r = pBitmap->Scale(Dimension(_ICON_WIDTH_, _ICON_HEIGHT_));
        SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to scale the bitmap.");
 
-       __startOpacity = 0.0f;
-       __endOpacity = 1.0f;
-
        // draw the bitmap
        pCanvas->SetBackgroundColor(Color(0x00000000));
        pCanvas->Clear();
@@ -228,8 +306,11 @@ NfcPushUiForm::OnInitializing(void)
 
        SysLog(NID_NET_NFC, "start to play animation");
        AnimationTransaction::Begin();
+       PlayOpacityAnimation(L"background_appear", _DURATION_OPACITY_BACKGROUND_);
+       PlayOpacityAnimation(L"guidetext_appear", _DURATION_OPACITY_BACKGROUND_);
+       PlayOpacityAnimation(L"appinfo_appear", _DURATION_OPACITY_BACKGROUND_);
        PlayBoundsAnimation(L"grow", 1, _DURATION_GROW_);
-       PlayOpacityAnimation(L"opacity", _DURATION_OPACITY_);
+       PlayOpacityAnimation(L"icon_appear", _DURATION_OPACITY_ICON_APPEAR_);
        AnimationTransaction::Commit();
 
        return r;
@@ -259,14 +340,6 @@ NfcPushUiForm::OnDraw(void)
        r = DrawBitmapToCanvas(rect);
        SysTryCatch(NID_NET_NFC, r == E_SUCCESS, , r, "[%s] Failed to draw captured screen.", GetErrorMessage(r));
 
-       // guide text
-       r = DrawGuideTextToCanvas(rect);
-       SysTryCatch(NID_NET_NFC, r == E_SUCCESS, , r, "[%s] Failed to draw guide text.", GetErrorMessage(r));
-
-       // app info
-       r = DrawAppInfoToCanvas(rect);
-       SysTryCatch(NID_NET_NFC, r == E_SUCCESS, , r, "[%s] Failed to draw app info.", GetErrorMessage(r));
-
        return r;
 
 CATCH:
@@ -311,16 +384,11 @@ NfcPushUiForm::DrawBitmapToCanvas(const Rectangle& rect)
        SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r,
                        "[%s] exception occurred. Failed to draw captured screen to canvas.", GetErrorMessage(r));
 
-       // darkening
-       r = pCanvas->FillRectangle(Color(0xC0000000), rect);
-       SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r,
-                       "[%s] exception occurred. Failed to darken the captured screen.", GetErrorMessage(r));
-
        return r;
 }
 
 result
-NfcPushUiForm::DrawAppInfoToCanvas(const Tizen::Graphics::Rectangle& rect)
+NfcPushUiForm::DrawAppInfoToCanvas(const Tizen::Graphics::Rectangle& rect, Tizen::Graphics::Canvas* pCanvas)
 {
        result r = E_SUCCESS;
        const int textAreaWidth = rect.width;
@@ -346,25 +414,21 @@ NfcPushUiForm::DrawAppInfoToCanvas(const Tizen::Graphics::Rectangle& rect)
        pTextElement->SetTextColor(Color::GetColor(COLOR_ID_WHITE));
        {
                Font font;
-               font.Construct(FONT_STYLE_BOLD, 42);
+               font.Construct(FONT_STYLE_PLAIN, _APPINFO_TEXT_HEIGHT_);
                pTextElement->SetFont(font);
        }
 
        // Adds the TextElement and the bitmap to the EnrichedText
        pEnrichedText->Add(*pTextElement);
 
-       // canvas
-       std::unique_ptr<Canvas> pCanvas(GetCanvasN());
-       SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
-
        // Draws the EnrichedText at the specified Point
-       pCanvas->DrawText(Point(0, rect.height - 510), *pEnrichedText);
+       pCanvas->DrawText(Point(__rect.x, __rect.y), *pEnrichedText);
 
        return r;
 }
 
 result
-NfcPushUiForm::DrawGuideTextToCanvas(const Tizen::Graphics::Rectangle& rect)
+NfcPushUiForm::DrawGuideTextToCanvas(const Tizen::Graphics::Rectangle& rect, Tizen::Graphics::Canvas* pCanvas)
 {
        result r = E_SUCCESS;
        const int textAreaWidth = rect.width;
@@ -404,7 +468,7 @@ NfcPushUiForm::DrawGuideTextToCanvas(const Tizen::Graphics::Rectangle& rect)
        pTextElement->SetTextColor(Color::GetColor(COLOR_ID_WHITE));
        {
                Font font;
-               font.Construct(FONT_STYLE_BOLD, 42);
+               font.Construct(FONT_STYLE_PLAIN, _GUIDE_TEXT_HEIGHT_);
                pTextElement->SetFont(font);
        }
 
@@ -412,12 +476,8 @@ NfcPushUiForm::DrawGuideTextToCanvas(const Tizen::Graphics::Rectangle& rect)
        r = pEnrichedText->Add(*pTextElement);
        SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to add text element to enriched text.");
 
-       // canvas
-       std::unique_ptr<Canvas> pCanvas(GetCanvasN());
-       SysTryReturnResult(NID_NET_NFC, pCanvas != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
-
        // Draws the EnrichedText at the specified Point
-       r = pCanvas->DrawText(Point((rect.width - textAreaWidth) / 2, rect.height -1030), *pEnrichedText);
+       r = pCanvas->DrawText(Point(__rect.x, __rect.y), *pEnrichedText);
        SysTryReturnResult(NID_NET_NFC, r == E_SUCCESS, r, "Failed to draw text to canvas.");
 
        return r;
@@ -438,13 +498,23 @@ NfcPushUiForm::PlayBoundsAnimation(const Tizen::Base::String& animationName, int
        pAnimation->SetRepeatCount(repeatCount);
        pAnimation->SetAutoReverseEnabled(autoReverse);
        pAnimation->SetVisualElementAnimationStatusEventListener(this);
-       if (animationName == L"grow" || animationName == L"shrink")
+       if (animationName == L"grow")
        {
                pTimingFunction.reset(new (std::nothrow) EaseInOutTimingFunction());
+               pAnimation->SetDelay(_DELAY_GROW_);
                pAnimation->SetTimingFunction(pTimingFunction.release());
+               __pVisualElementBounds->AddAnimation(animationName, *pAnimation);
+       }
+       else if (animationName == L"shrink")
+       {
+               pTimingFunction.reset(new (std::nothrow) EaseInOutTimingFunction());
+               pAnimation->SetTimingFunction(pTimingFunction.release());
+               __pVisualElementBounds->AddAnimation(animationName, *pAnimation);
+       }
+       else
+       {
+               __pVisualElementBounds->AddAnimation(animationName, *pAnimation);
        }
-
-       __pVisualElementBounds->AddAnimation(animationName, *pAnimation);
 }
 
 void
@@ -459,12 +529,43 @@ NfcPushUiForm::PlayOpacityAnimation(const Tizen::Base::String& animationName, in
        pAnimation->SetEndValue(Variant(__endOpacity));
        pAnimation->SetDuration(duration);
        pAnimation->SetVisualElementAnimationStatusEventListener(this);
-       if (animationName == L"opacity")
+       if (animationName == L"background_appear")
+       {
+               __pVisualElementBackground->AddAnimation(animationName, *pAnimation);
+       }
+       else if (animationName == L"background_disappear")
+       {
+               pAnimation->SetDelay(_DELAY_BACKGROUND_DISAPPEAR_);
+               __pVisualElementBackground->AddAnimation(animationName, *pAnimation);
+       }
+       else if (animationName == L"guidetext_appear")
+       {
+               __pVisualElementGuideText->AddAnimation(animationName, *pAnimation);
+       }
+       else if (animationName == L"guidetext_disappear")
        {
-               pAnimation->SetDelay(247);
+               pAnimation->SetDelay(_DELAY_GUIDE_TEXT_DISAPPEAR_);
+               __pVisualElementGuideText->AddAnimation(animationName, *pAnimation);
+       }
+       else if (animationName == L"appinfo_appear")
+       {
+               __pVisualElementAppInfo->AddAnimation(animationName, *pAnimation);
+       }
+       else if (animationName == L"appinfo_disappear")
+       {
+               pAnimation->SetDelay(_DELAY_APPINFO_TEXT_DISAPPEAR_);
+               __pVisualElementAppInfo->AddAnimation(animationName, *pAnimation);
+       }
+       else if (animationName == L"icon_appear")
+       {
+               pAnimation->SetDelay(_DELAY_OPACITY_ICON_APPEAR_);
+               __pVisualElementOpacity->AddAnimation(animationName, *pAnimation);
+       }
+       else if (animationName == L"icon_disappear")
+       {
+               __pVisualElementOpacity->AddAnimation(animationName, *pAnimation);
        }
 
-       __pVisualElementOpacity->AddAnimation(animationName, *pAnimation);
 }
 
 void
@@ -486,7 +587,7 @@ NfcPushUiForm::OnVisualElementAnimationFinished(const VisualElementAnimation& an
 {
        if(completedNormally)
        {
-               if (keyName == L"opacity")
+               if (keyName == L"icon_appear")
                {
                        float margin = (__endRect.width * 0.05f) / 2;
                        __startRect = __endRect;
@@ -496,7 +597,7 @@ NfcPushUiForm::OnVisualElementAnimationFinished(const VisualElementAnimation& an
                        // start second animation - repeat
                        PlayBoundsAnimation(L"repeat", 0, _DURATION_REPEAT_, true);
                }
-               else if (keyName == L"shrink")
+               else if (keyName == L"background_disappear")
                {
                        // finish this app control with success
 
@@ -505,10 +606,6 @@ NfcPushUiForm::OnVisualElementAnimationFinished(const VisualElementAnimation& an
 
                        result r = E_SUCCESS;
 
-                       // remove the guide text and app description
-                       r = DrawBitmapToCanvas(rect);
-                       SysTryReturnVoidResult(NID_NET_NFC, r == E_SUCCESS, r, "[%s] Failed to remove guide text and app description.", GetErrorMessage(r));
-
                        FinishAppControl(__reqId, APP_CTRL_RESULT_SUCCEEDED);
                }
        }
@@ -523,12 +620,15 @@ NfcPushUiForm::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Gr
 
        // reset the circles size
        __startRect = __endRect;
-       __endRect = FloatRectangle(__startRect.x + 127.05f, __startRect.y + 127.05f, 0, 0);
+       __endRect = FloatRectangle(_CIRCLE_COORDINATES_X_ + (_CIRCLE_WIDTH_ / 2), _CIRCLE_COORDINATES_Y_ + (_CIRCLE_HEIGHT_ / 2), 0, 0);
 
        // play animation
        AnimationTransaction::Begin();
-       PlayOpacityAnimation(L"opacity2", _DURATION_OPACITY2_);
-       PlayBoundsAnimation(L"shrink", 1, 667, false);
+       PlayOpacityAnimation(L"icon_disappear", _DURATION_OPACITY_ICON_DISAPPEAR_);
+       PlayBoundsAnimation(L"shrink", 1, _DURATION_GROW_, false);
+       PlayOpacityAnimation(L"background_disappear", _DURATION_OPACITY_BACKGROUND_);
+       PlayOpacityAnimation(L"guidetext_disappear", _DURATION_OPACITY_BACKGROUND_);
+       PlayOpacityAnimation(L"appinfo_disappear", _DURATION_OPACITY_BACKGROUND_);
        AnimationTransaction::Commit();
 }