Пример #1
0
        public IUIHandler ProcessInput(object eventArgs)
        {
            var active = NotificationUtils.MouseKeyboardSwitch(eventArgs, this, OnMouseDown, OnMouseMove, OnMouseUp);

            if (ActiveElement != null)
            {
                return(ActiveElement.ProcessInput(eventArgs) ?? active);
            }

            return(active);
        }
Пример #2
0
        public void ProcessInput(object eventArgs)
        {
            if (FCurrentHandler == null)
            {
                //get pick path
                FPickPath = NotificationUtils.PositionEvent(eventArgs, FPickPath, pos => GetPickPath(pos.GetUnitRect()));

                //calc hover, active, selected
                FCurrentHandler = NotificationUtils.MouseKeyboardSwitch(eventArgs, FCurrentHandler, OnMouseDown, OnMouseMove);
            }
            else
            {
                //calc unhover
                //NotificationHelpers.MouseKeyboardSwitch(eventArgs, null, null, OnMouseMoveUnhover, null);
            }

            //do handler
            FCurrentHandler = FCurrentHandler?.ProcessInput(eventArgs);

            //System.Diagnostics.Debug.WriteLine("Notification: " + eventArgs?.ToString());
            //System.Diagnostics.Debug.WriteLine("FCurrentHandler: " + FCurrentHandler?.ToString());
        }