, __isFocused(false)
, __currentFocusedIndex(-1)
, __selectedActionID(-1)
+ , __isAnimating(false)
, __pBoundsTimingFunction(null)
, __pOpacityTimingFunction(null)
, __windowRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
bool
_OptionMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (__isAnimating && GetVisualElement())
+ {
+ GetVisualElement()->RemoveAllAnimations();
+ }
+
_KeyCode keyCode = keyInfo.GetKeyCode();
if (keyCode == _KEY_ENTER && __isFocused)
void
_OptionMenu::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
{
+ __isAnimating = false;
+
if (keyName == L"ClosingOpacityAnimation")
{
SetVisibleState(false);
pVisualElement->AddAnimation(L"OpeningBoundsAnimation", *pBoundsAnimation);
pVisualElement->AddAnimation(L"OpeningOpacityAnimation", *pOpacityAnimation);
+ __isAnimating = true;
+
delete pBoundsAnimation;
delete pOpacityAnimation;
pVisualElement->AddAnimation(L"ClosingBoundsAnimation", *pBoundsAnimation);
pVisualElement->AddAnimation(L"ClosingOpacityAnimation", *pOpacityAnimation);
+ __isAnimating = true;
+
delete pBoundsAnimation;
delete pOpacityAnimation;
bool
_OptionMenu::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
{
+ if (__isAnimating && GetVisualElement())
+ {
+ GetVisualElement()->RemoveAllAnimations();
+ }
+
return __pOptionMenuPresenter->OnTouchReleased(source, touchinfo);
}