Exemple #1
0
 private void LinkButton()
 {
     m_buttonHead = null;
     if (interactive && m_rootMovie.hasButton)
     {
         m_focusOnLink = false;
         m_rootMovie.LinkButton();
         if (m_focus != null && !m_focusOnLink)
         {
             m_focus.RollOut();
             m_focus = null;
         }
     }
 }
Exemple #2
0
        public override void LinkButton()
        {
            if (!m_visible || !m_active || !m_hasButton)
            {
                return;
            }

            for (int dlDepth = 0; dlDepth < m_data.depths; ++dlDepth)
            {
                Object obj = m_displayList[dlDepth];
                if (obj != null)
                {
                    if (obj.IsButton())
                    {
                        ((Button)obj).LinkButton();
                    }
                    else if (obj.IsMovie())
                    {
                        Movie movie = (Movie)obj;
                        if (movie.m_hasButton)
                        {
                            movie.LinkButton();
                        }
                    }
                }
            }

            if (m_attachedMovies != null)
            {
                foreach (Movie movie in m_attachedMovieList.Values)
                {
                    if (movie != null && movie.m_hasButton)
                    {
                        movie.LinkButton();
                    }
                }
            }

            if (m_attachedLWFs != null)
            {
                foreach (LWFContainer lwfContainer in m_attachedLWFList.Values)
                {
                    if (lwfContainer != null)
                    {
                        lwfContainer.LinkButton();
                    }
                }
            }
        }
Exemple #3
0
        public int Exec(float tick    = 0,
                        Matrix matrix = null, ColorTransform colorTransform = null)
        {
            bool  execed          = false;
            float currentProgress = m_progress;

            if (m_execDisabled && tweens == null)
            {
                if (!m_executedForExecDisabled)
                {
                    ++m_execCount;
                    m_rootMovie.Exec();
                    m_rootMovie.PostExec(true);
                    m_executedForExecDisabled = true;
                    execed = true;
                }
            }
            else
            {
                bool progressing = true;
                m_thisTick = tick;
                if (tick == 0)
                {
                    m_progress = m_tick;
                }
                else if (tick < 0)
                {
                    m_progress  = m_tick;
                    progressing = false;
                }
                else
                {
                    if (m_time == 0)
                    {
                        m_time     += (double)m_tick;
                        m_progress += m_tick;
                    }
                    else
                    {
                        m_time     += (double)tick;
                        m_progress += tick;
                    }
                }

                if (m_execHandlers != null)
                {
                    m_execHandlers.ForEach(h => h(this));
                }

                int execLimit = m_execLimit;
                while (m_progress >= m_tick - m_roundOffTick)
                {
                    if (--execLimit < 0)
                    {
                        m_progress = 0;
                        break;
                    }
                    m_progress -= m_tick;
                    ++m_execCount;
                    m_rootMovie.Exec();
                    m_rootMovie.PostExec(progressing);
                    execed = true;
                }

                if (m_progress < m_roundOffTick)
                {
                    m_progress = 0;
                }

                m_buttonHead = null;
                if (interactive && m_rootMovie.hasButton)
                {
                    m_rootMovie.LinkButton();
                }
            }

            if (execed || isLWFAttached ||
                isPropertyDirty || matrix != null || colorTransform != null)
            {
                Update(matrix, colorTransform);
            }

            if (!m_execDisabled)
            {
                if (tick < 0)
                {
                    m_progress = currentProgress;
                }
            }

            return(m_renderingCount);
        }