Esempio n. 1
0
        //Need to fix -> Change function name
        internal void AnimateChangeState(RotaryLayerView layer, bool isEditMode, bool onlyIndicatorMoving = false)
        {
            animationCore.Clear();
            animationCore.Duration = 350;

            if (isEditMode)
            {
                animationCore.AnimateTo(layer.GetContainer(), "Scale", new Vector3(0.9f, 0.9f, 1.0f), 0, 333, alphaGlideOut);
                animationCore.AnimateTo(layer.GetMainText(), "Opacity", 1.0f, 0, 333, alphaGlideOut);
            }
            else
            {
                if (!onlyIndicatorMoving)
                {
                    animationCore.AnimateTo(layer.GetContainer(), "Scale", new Vector3(1.0f, 1.0f, 1.0f), 0, 333, alphaGlideOut);
                    animationCore.AnimateTo(layer.GetMainText(), "Opacity", 1.0f, 0, 333, alphaGlideOut);
                }


                RotaryIndicator indicator = layer.GetIndicator();
                if (!indicator.isNotMoving())
                {
                    animationCore.AnimatePath(indicator, mAniUtil.GetIndicatorRotaryPath(indicator), Vector3.Zero, 0, 200, alphaSineOut33);
                    animationCore.AnimateTo(indicator, "Scale", new Vector3(1.1f, 1.1f, 1.1f), 0, 200, alphaSineOut33);
                    animationCore.AnimateTo(indicator, "Scale", new Vector3(1.0f, 1.0f, 1.0f), 200, 350, alphaSineOut33);
                }
            }
            animationCore.Play();
        }
Esempio n. 2
0
        internal RotarySelectorManager(Size rotarySize)
        {
            this.rotarySize = rotarySize;

            rotaryTouchController = new RotaryTouchNormalMode();
            wrapperList           = new List <RotaryItemWrapper>();

            // First Page
            for (int i = 0; i < ApplicationConstants.MAX_ITEM_COUNT; i++)
            {
                RotaryItemWrapper rotaryItemWrapper = new RotaryItemWrapper(i);
                wrapperList.Add(rotaryItemWrapper);
            }

            // Second Page
            for (int i = 0; i < ApplicationConstants.MAX_ITEM_COUNT; i++)
            {
                RotaryItemWrapper rotaryItemWrapper = new RotaryItemWrapper(i);
                wrapperList.Add(rotaryItemWrapper);
            }

            rotaryLayerView = new RotaryLayerView()
            {
                WidthResizePolicy      = ResizePolicyType.FillToParent,
                HeightResizePolicy     = ResizePolicyType.FillToParent,
                ParentOrigin           = Tizen.NUI.ParentOrigin.Center,
                PivotPoint             = Tizen.NUI.PivotPoint.Center,
                PositionUsesPivotPoint = true,
            };

            animationManager = new AnimationManager();

            pagination = new RotaryPagination();
        }
Esempio n. 3
0
        internal void AnimatePageLayerContents(RotaryLayerView layer, bool cw)
        {
            float val = (cw ? 30.0f : -30.0f);

            animationCore.AnimateTo(layer.GetIndicator(), "Opacity", 0.0f, 0, 150);
            animationCore.AnimateTo(layer.GetIndicator(), "Opacity", 1.0f, 150, 400);

            animationCore.AnimateBy(layer.GetMainText(), "Position", new Position(val, 0.0f), 0, 83, alphaGlideOut);
            animationCore.AnimateTo(layer.GetMainText(), "Opacity", 0.0f, 0, 83, alphaGlideOut);
            animationCore.AnimateTo(layer.GetMainText(), "Position", new Position(-val, 0.0f), 84, 84);

            animationCore.AnimateBy(layer.GetMainText(), "Position", new Position(val, 0.0f), 85, 250, alphaSineOut33);
            animationCore.AnimateTo(layer.GetMainText(), "Opacity", 1.0f, 85, 250, alphaSineOut33);
        }
Esempio n. 4
0
        internal void AnimateStarting(RotaryLayerView layer, List <RotaryItemWrapper> wrapperList)
        {
            animationCore.Duration = 350;
            animationCore.Clear();

            RotaryIndicator indicator = layer.GetIndicator();
            TextLabel       mainText  = layer.GetMainText();

            //Init value -> Animate position from 131(radius) to default value
            indicator.Position = indicator.GetRotaryPosition(indicator.CurrentIndex + 1, 131);
            indicator.Opacity  = 0.0f;

            mainText.Opacity = 0.0f;
            mainText.Scale   = new Vector3(1.2f, 1.2f, 1.2f);
            mainText.Text    = wrapperList[0].RotaryItem.MainText;

            //Add animation
            animationCore.AnimateTo(indicator, "Position", indicator.GetRotaryPosition(indicator.CurrentIndex + 1), alphaSineInOut80);
            animationCore.AnimateTo(indicator, "Opacity", 1.0f, alphaSineInOut80);

            animationCore.AnimateTo(mainText, "Scale", new Vector3(1.0f, 1.0f, 1.0f), alphaSineInOut80);
            animationCore.AnimateTo(mainText, "Opacity", 1.0f, alphaSineInOut80);

            // Second Page -> hide
            for (int i = 0; i < wrapperList.Count; i++)
            {
                RotarySelectorItem item = wrapperList[i]?.RotaryItem;
                if (item != null)
                {
                    item.Opacity  = 0.0f;
                    item.Position = wrapperList[i].GetRotaryPosition(wrapperList[i].CurrentIndex + 1, true, 170);

                    animationCore.AnimateTo(item, "Position", wrapperList[i].GetRotaryPosition(wrapperList[i].CurrentIndex + 1, true, 139), alphaSineInOut80);
                    animationCore.AnimateTo(item, "Opacity", 1.0f, alphaSineInOut80);
                }
            }

            animationCore.Play();
        }