public IUIHandler ProcessInput(object eventArgs) { var active = NotificationUtils.MouseKeyboardSwitch(eventArgs, this, OnMouseDown, OnMouseMove, OnMouseUp); if (ActiveElement != null) { return(ActiveElement.ProcessInput(eventArgs) ?? active); } return(active); }
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()); }