示例#1
0
        /// <summary>
        ///
        /// </summary>
        public void Begin()
        {
            current = this;

            frameId++;
            if (frameId == 0)
            {
                frameId = 1;
            }
            renderingOrder        = 0;
            batchingDepth         = 0;
            rectMaskDepth         = 0;
            stencilReferenceValue = 0;
            alpha  = 1;
            grayed = false;

            clipped = false;
            _clipStack.Clear();

            Stats.ObjectCount   = 0;
            Stats.GraphicsCount = 0;

            _tmpBegin = OnBegin;
            OnBegin   = null;

            //允许OnBegin里再次Add,这里没有做死锁检查
            while (_tmpBegin != null)
            {
                _tmpBegin.Invoke();
                _tmpBegin = OnBegin;
                OnBegin   = null;
            }

            working = true;
        }
        public void Begin()
        {
            frameId++;
            if (frameId == 0)
                frameId = 1;
            counter = 0;
            renderingOrder = 0;
            batchingDepth = 0;
            rectMaskDepth = 0;
            stencilReferenceValue = 0;
            alpha = 1;
            grayed = false;

            clipped = false;
            _clipStack.Clear();

            _tmpBegin = OnBegin;
            OnBegin = null;

            //允许OnBegin里再次Add,这里没有做死锁检查
            while (_tmpBegin != null)
            {
                _tmpBegin.Invoke();
                _tmpBegin = OnBegin;
            }
        }
示例#3
0
        public void Begin()
        {
            frameId++;
            if (frameId == 0)
            {
                frameId = 1;
            }
            counter               = 0;
            renderingOrder        = 0;
            batchingDepth         = 0;
            rectMaskDepth         = 0;
            stencilReferenceValue = 0;
            alpha  = 1;
            grayed = false;

            clipped = false;
            _clipStack.Clear();

            if (OnBegin != null)
            {
                OnBegin.Invoke();
            }

            OnBegin = null;
        }
示例#4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="gameTime"></param>
        public void Update(GameTime gameTime)
        {
            Timers.inst.Update(gameTime);
            TweenManager.Update(gameTime);

            HandleInputCapturer();
            HandleKeyEvents();
            HandleMouseEvents();
            if (_focused is InputTextField)
            {
                HandleTextInput();
            }

            _tempDelegate = beforeUpdate;
            beforeUpdate  = null;

            //允许beforeUpdate里再次Add,这里没有做死锁检查
            while (_tempDelegate != null)
            {
                _tempDelegate.Invoke();
                _tempDelegate = beforeUpdate;
                beforeUpdate  = null;
            }
            _tempDelegate = null;

            Update();

            if (afterUpdate != null)
            {
                afterUpdate.Invoke();
            }

            afterUpdate = null;
        }
示例#5
0
        public void OnRender()
        {
            Global.gEnv.pHardwareMouse.GetHardwareMouseClientPosition(ref _mousePositionX, ref _mousePositionY);
            if ((_mousePositionX < 0 || _mousePositionY < 0 || _mousePositionX >= this.width || _mousePositionY >= this.height) &&
                _touchInfo.began)
            {
                HandleMouseEvents((int)_mousePositionX, (int)_mousePositionY, EHARDWAREMOUSEEVENT.HARDWAREMOUSEEVENT_LBUTTONUP, 0);
            }
            if (_focused is InputTextField)
            {
                HandleTextInput();
            }


            _tempDelegate = beforeVisit;
            beforeVisit   = null;

            //允许beforeVisit里再次Add,这里没有做死锁检查
            while (_tempDelegate != null)
            {
                _tempDelegate.Invoke();
                _tempDelegate = beforeVisit;
                beforeVisit   = null;
            }
            _tempDelegate = null;

            Visit();

            if (afterVisit != null)
            {
                afterVisit.Invoke();
            }

            afterVisit = null;
        }
示例#6
0
        public void Begin()
        {
            frameId++;
            if (frameId == 0)
            {
                frameId = 1;
            }
            counter               = 0;
            renderingOrder        = 0;
            batchingDepth         = 0;
            rectMaskDepth         = 0;
            stencilReferenceValue = 0;
            alpha  = 1;
            grayed = false;

            clipped = false;
            _clipStack.Clear();

            _tmpBegin = OnBegin;
            OnBegin   = null;

            //允许OnBegin里再次Add,这里没有做死锁检查
            while (_tmpBegin != null)
            {
                _tmpBegin.Invoke();
                _tmpBegin = OnBegin;
            }
        }
示例#7
0
        /// <summary>
        /// 
        /// </summary>
        public void Begin()
        {
            current = this;

            frameId++;
            if (frameId == 0)
                frameId = 1;
            renderingOrder = 0;
            batchingDepth = 0;
            rectMaskDepth = 0;
            stencilReferenceValue = 0;
            alpha = 1;
            grayed = false;

            clipped = false;
            _clipStack.Clear();

            Stats.ObjectCount = 0;
            Stats.GraphicsCount = 0;

            _tmpBegin = OnBegin;
            OnBegin = null;

            //允许OnBegin里再次Add,这里没有做死锁检查
            while (_tmpBegin != null)
            {
                _tmpBegin.Invoke();
                _tmpBegin = OnBegin;
                OnBegin = null;
            }

            working = true;
        }
示例#8
0
        public void End()
        {
            if (OnEnd != null)
            {
                OnEnd.Invoke();
            }

            OnEnd = null;
        }
示例#9
0
        /// <summary>
        ///
        /// </summary>
        public void End()
        {
            working = false;

            if (OnEnd != null)
            {
                OnEnd.Invoke();
            }

            OnEnd = null;
        }
示例#10
0
        public void Call(EventContext context)
        {
            if (_isLock)
            {
                return;
            }

            _isLock = true;

            _callbacks0?.Invoke();
            _callbacks1?.Invoke(context);

            _isLock = false;
        }
示例#11
0
 /// <summary>
 /// 确定按钮
 /// </summary>
 private void OnConfirmClick()
 {
     ecb0?.Invoke();
     Close();
 }