Exemplo n.º 1
0
        protected override void UpdateMenu(bool active)
        {
            if (active)
            {
                bool alreadyAtHoldEnd = Fade.AtHoldEnd;
                bool alreadyFinished  = Fade.Finished;
                Fade.update();

                if ((Fade.AtHoldEnd && !alreadyAtHoldEnd) ||
                    // Hold End is supposed to happen on frame 0
                    Fade.FrameOneHoldEnd)
                {
                    if (ParentMenu != null)
                    {
                        if (FadeIn)
                        {
                            ParentMenu.FadeShow();
                        }
                        else
                        {
                            ParentMenu.FadeHide();
                        }
                    }
                }

                if (Fade.Finished && !alreadyFinished)
                {
                    OnFinished(new EventArgs());
                    if (ParentMenu != null)
                    {
                        if (FadeIn)
                        {
                            ParentMenu.FadeOpen();
                        }
                        else
                        {
                            ParentMenu.FadeClose();
                        }
                    }
                }
            }
        }