public override void TouchesBegan(NSSet touches, UIEvent evt) { var touch = (UITouch) touches.AnyObject; if (touch.Phase == UITouchPhase.Began){ Console.WriteLine ("Overlay view touched"); } }
public override void SendEvent(UIEvent evt) { // Send the event to its original destination base.SendEvent (evt); // Get touchs from the event var touchs = evt.AllTouches; // Count will be one most of the time (single touch) but multitouch will appear here. E.g. Pinch touchs.Count = 2 if (touchs.Count > 0) { // Get one touch event from the array UITouch touch = touchs.AnyObject as UITouch; if (touch != null) { // You can get the touch phase // UITouchPhase.Began || UITouchPhase.Cancelled || UITouchPhase.Ended || UITouchPhase.Moved || UITouchPhase.Stationary // touch.Phase; // How many taps the click had // touch.TapCount // Target view // touch.View // Target Window // touch.Window // Touch event timestamp // touch.Timestamp // And a few more things } } }
/// <summary> /// Called when the touches are cancelled due to a phone call, etc. /// </summary> public override void TouchesCancelled (NSSet touches, UIEvent evt) { base.TouchesCancelled (touches, evt); // we fail the recognizer so that there isn't unexpected behavior // if the application comes back into view base.State = UIGestureRecognizerState.Failed; }
public override UIView HitTest(CGPoint point, UIEvent uievent) { var hitView = base.HitTest(point, uievent); if (hitView == RootViewController.View) hitView = null; return hitView; }
/// <summary> /// Called when the fingers move /// </summary> public override void TouchesMoved (NSSet touches, UIEvent evt) { base.TouchesMoved (touches, evt); // if we haven't already failed if (base.State != UIGestureRecognizerState.Failed) { // get the current and previous touch point CGPoint newPoint = (touches.AnyObject as UITouch).LocationInView (View); CGPoint previousPoint = (touches.AnyObject as UITouch).PreviousLocationInView (View); // if we're not already on the upstroke if (!strokeUp) { // if we're moving down, just continue to set the midpoint at // whatever point we're at. when we start to stroke up, it'll stick // as the last point before we upticked if (newPoint.X >= previousPoint.X && newPoint.Y >= previousPoint.Y) { midpoint = newPoint; } // if we're stroking up (moving right x and up y [y axis is flipped]) else if (newPoint.X >= previousPoint.X && newPoint.Y <= previousPoint.Y) { strokeUp = true; } // otherwise, we fail the recognizer else { base.State = UIGestureRecognizerState.Failed; } } } Console.WriteLine (base.State.ToString ()); }
public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesBegan (touches, evt); UITouch touch = touches.AnyObject as UITouch; if (touch != null) { if (c > MAX_SHAPES) { foreach (UIView v in this.Subviews) { if (v != Subviews[0]) v.RemoveFromSuperview (); } var monkeyView = Subviews[0]; UIView.BeginAnimations ("flip"); monkeyView.Transform = CGAffineTransform.MakeRotation ((float)Math.PI * n); (monkeyView as UIImageView).Image = SwapMonkey (); UIView.CommitAnimations (); Util.Instance.PlaySound (); n++; c = 0; } else { PointF pt = touch.LocationInView (this); _sv = CreateShapeView (pt); this.AddSubview (_sv); } c++; } PulseShape (); }
public override void TouchesEnded (NSSet touches, UIEvent evt) { CanvasView.DrawTouches (touches, evt); CanvasView.EndTouches (touches, false); ReticleView.Hidden = true; }
public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesBegan (touches, evt); UITouch touch = touches.AnyObject as UITouch; _previousLocation = touch.LocationInView (touch.View); }
public override void TouchesEnded(NSSet touches, UIEvent evt) { try { bool allTouchesEnded = (touches.Count == evt.TouchesForView (this).Count); // first check for plain single/double tap, which is only possible if we haven't seen multiple touches if (!multipleTouches) { var touch = (UITouch)touches.AnyObject; // tapLocation = touch.LocationInView(this); if (touch.TapCount == 1) { if (Tapped != null) Tapped (this); } else if (touch.TapCount == 2) { if (DoubleTapped != null) DoubleTapped (this); } } } catch { } base.TouchesEnded (touches, evt); }
public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesMoved (touches, evt); actions [(int)PlayerActions.Action] = false; actions [(int)PlayerActions.Left] = false; actions [(int)PlayerActions.Right] = false; actions [(int)PlayerActions.Forward] = false; actions [(int)PlayerActions.Back] = false; UITouch touch = (UITouch)touches.AnyObject; var location = touch.LocationInView (View); var deltaX = location.X - controlledShip.Position.X; var deltaY = (480 - location.Y) - controlledShip.Position.Y; if (Math.Abs (deltaX) < 30 && Math.Abs (deltaY) < 30) actions [(int)PlayerActions.Action] = true; else if (Math.Abs (deltaX) > Math.Abs (deltaY)) { if (deltaX < 0) actions [(int)PlayerActions.Left] = true; else actions [(int)PlayerActions.Right] = true; } else { if (deltaY < 0) actions [(int)PlayerActions.Forward] = true; else actions [(int)PlayerActions.Back] = true; } }
bool Append (HashSet<UITouch> touches, UIEvent uievent) { var touchToAppend = trackedTouch; if (touchToAppend == null) return false; // Cancel the stroke recognition if we get a second touch during cancellation period. foreach (var touch in touches) { if (touch != touchToAppend && (touch.Timestamp - initialTimestamp < cancellationTimeInterval)) { State = (State == Possible) ? Failed : Cancelled; return false; } } // See if those touches contain our tracked touch. If not, ignore gracefully. if (!touches.Contains (touchToAppend)) return false; var coalescedTouches = uievent.GetCoalescedTouches (touchToAppend); var lastIndex = coalescedTouches.Length - 1; for (var index = 0; index <= lastIndex; index++) Collect (Stroke, coalescedTouches [index], CoordinateSpaceView, (index != lastIndex), false); if (Stroke.State == StrokeState.Active) { var predictedTouches = uievent.GetPredictedTouches (touchToAppend); foreach (var touch in predictedTouches) Collect (Stroke, touch, CoordinateSpaceView, false, true); } return true; }
public void TouchesBegan(NSSet touchSet, UIEvent evnt) { if (DispatchEvents) { List<TouchHandler> handlers = new List<TouchHandler>(_touchHandlers); // Make full-aot aware of the needed ICollection<UITouch> types ICollection<UITouch> touches_col = (ICollection<UITouch>)touchSet.ToArray<UITouch>(); #pragma warning disable 0219 // this is a tiny hack, make sure the AOT compiler knows about // UICollection.Count, as it will need it when we instantiate the list below int touches_count = touches_col.Count; #pragma warning restore 0219 List<UITouch> touches = new List<UITouch>(touches_col); foreach (TouchHandler handler in handlers) { if (handler.TouchesBegan(touches, evnt)) { break; } if (touches.IsEmpty()) { break; } } } }
//TODO: Step 2 - Subscribe to touches began events public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesBegan(touches, evt); // we can get the number of fingers from the touch count, but Multitouch must be enabled lblNumberOfFingers.Text = string.Format("Number of Fingers: {0}", touches.Count); // get the touch var touch = touches.AnyObject as UITouch; if (touch == null) return; Console.WriteLine("screen touched"); //TODO: Step 3 - Check if touch was on a particular view if (imgTouchMe.Frame.Contains(touch.LocationInView(View))) lblTouchStatus.Text = "Touch Status: Touches Began"; //TODO: Step 4 - Detect multiple taps if (touch.TapCount == 2 && imgTapMe.Frame.Contains(touch.LocationInView(View))) { imgTapMe.Image = UIImage.FromBundle( imageHighlighted ? "Images/DoubleTapMe.png" : "Images/DoubleTapMe_Highlighted.png"); imageHighlighted = !imageHighlighted; } //TODO: Step 5 - Start recording a drag event if (imgDragMe.Frame.Contains(touch.LocationInView(View))) touchStartedInside = true; }
public override void SendEvent(UIEvent theEvent) { // Console.WriteLine (theEvent); // // Console.WriteLine (theEvent.Subtype); // if (theEvent.Type == UIEventType.RemoteControl) { // // Console.WriteLine (theEvent.Subtype); // switch (theEvent.Subtype) { // // case UIEventSubtype.RemoteControlPause: // case UIEventSubtype.RemoteControlPlay: // case UIEventSubtype.RemoteControlTogglePlayPause: // // break; // case UIEventSubtype.RemoteControlPreviousTrack: // //Util.Previous (); // break; // // case UIEventSubtype.RemoteControlBeginSeekingForward: // case UIEventSubtype.RemoteControlNextTrack: // // break; // // default: // break; // } // } else base.SendEvent (theEvent); }
public override void TouchesBegan (NSSet touches, UIEvent evt) { this.ExclusiveTouch = true; IndexCount++; var path = new UIBezierPath { LineWidth = PenWidth } ; var touch = (UITouch)touches.AnyObject; PreviousPoint = (PointF)touch.PreviousLocationInView (this); var newPoint = touch.LocationInView (this); path.MoveTo (newPoint); InvokeOnMainThread (SetNeedsDisplay); CurrentPath = path; var line = new VESLine { Path = CurrentPath, Color = UIColor.Black, Index = IndexCount } ; Lines.Add (line); }
public override void TouchesBegan (NSSet touches, UIEvent evt) { base.TouchesBegan (touches, evt); // we can get the number of fingers from the touch count, but Multitouch must be enabled lblNumberOfFingers.Text = "Number of fingers: " + touches.Count.ToString(); // get the touch UITouch touch = touches.AnyObject as UITouch; if (touch != null) { Console.WriteLine("screen touched"); //==== IMAGE TOUCH if (imgTouchMe.Frame.Contains (touch.LocationInView (View))) lblTouchStatus.Text = "TouchesBegan"; //==== IMAGE DOUBLE TAP if(touch.TapCount == 2 && imgTapMe.Frame.Contains (touch.LocationInView (View))) { if (imageHighlighted) imgTapMe.Image = UIImage.FromBundle ("Images/DoubleTapMe.png"); else imgTapMe.Image = UIImage.FromBundle ("Images/DoubleTapMe_Highlighted.png"); imageHighlighted = !imageHighlighted; } //==== IMAGE DRAG // check to see if the touch started in the dragme image if (imgDragMe.Frame.Contains (touch.LocationInView (View))) touchStartedInside = true; } }
public override void TouchesBegan(NSSet touches, UIEvent evt) { foreach (UITouch touch in touches.ToArray<UITouch>()) { Console.WriteLine(touch); } }
public override UIView HitTest(PointF point, UIEvent uievent) { if (this.MenuState == MenuStateEnum.FullMenu) { var view = this.itemViews [0]; if (this.Bounds.Contains (point)) { return base.HitTest (point, uievent); } else { return null; } } else if (this.MenuState == MenuStateEnum.IconMenu) { var view = this.itemViews [0]; if (view.ImageViewProxy.Frame.Contains (point)) { return base.HitTest (point, uievent); } else { return null; } } else if (this.MenuState == MenuStateEnum.MainMenu) { var view = this.itemViews [0]; if (view.Frame.Contains (point)) { return base.HitTest (point, uievent); } else { return null; } } return null; }
// public override void TouchesBegan(Foundation.NSSet touches, UIEvent evt) { base.TouchesBegan (touches, evt); UITouch touch1 = evt.AllTouches.AnyObject as UITouch; CGPoint point = touch1.LocationInView (View); if (point.X > lbl1.Frame.X && point.X < lbl1.Frame.X + lbl1.Frame.Size.Width && point.Y > lbl1.Frame.Y && point.Y < lbl1.Frame.Y + lbl1.Frame.Size.Height) { myLab = lbl1; } if (point.X > lbl2.Frame.X && point.X < lbl2.Frame.X + lbl2.Frame.Size.Width && point.Y > lbl2.Frame.Y && point.Y < lbl2.Frame.Y + lbl2.Frame.Size.Height) { myLab = lbl2; } if (point.X > lbl3.Frame.X && point.X < lbl3.Frame.X + lbl3.Frame.Size.Width && point.Y > lbl3.Frame.Y && point.Y < lbl3.Frame.Y + lbl3.Frame.Size.Height) { myLab = lbl3; } if (point.X > lbl4.Frame.X && point.X < lbl4.Frame.X + lbl4.Frame.Size.Width && point.Y > lbl4.Frame.Y && point.Y < lbl4.Frame.Y + lbl4.Frame.Size.Height) { myLab = lbl4; } if (point.X > lbl5.Frame.X && point.X < lbl5.Frame.X + lbl5.Frame.Size.Width && point.Y > lbl5.Frame.Y && point.Y < lbl5.Frame.Y + lbl5.Frame.Size.Height) { myLab = lbl5; } }
public override void TouchesCancelled(NSSet touches, UIEvent evt) { base.TouchesCancelled(touches, evt); // reset our tracking flags touchStartedInside = false; }
public override void TouchesEnded(NSSet touches, UIEvent evt) { base.TouchesEnded(touches, evt); //TODO : check this to make sure Control is ok or do we need another on like InputControl var source = Controller.TableView.Source as BaseDialogViewSource; if (source != null) { foreach (var section in source.Sections.Values) { foreach (var viewList in section.Views.Values) { foreach(var view in viewList) { var focusable = view as IFocusable; if (focusable != null && focusable.Control != null && focusable.Control.IsFirstResponder) { focusable.Control.ResignFirstResponder(); break; } } } } } ResetTextShadow(true, touches); }
public override bool ContinueTracking(UITouch uitouch, UIEvent uievent) { if (!minThumbOn && !maxThumbOn) return true; var touchPoint = uitouch.LocationInView (this); if (minThumbOn) { minThumb.Center = new PointF(Math.Max ( XForValue(MinValue), Math.Min(touchPoint.X - distanceFromCenter, XForValue(SelectedMaxValue - MinRange))), minThumb.Center.Y - Frame.Top); SelectedMinValue = ValueForX (minThumb.Center.X); } if (maxThumbOn) { maxThumb.Center = new PointF(Math.Min ( XForValue(MaxValue), Math.Max( touchPoint.X - distanceFromCenter, XForValue(SelectedMinValue + MinRange) ) ), maxThumb.Center.Y - Frame.Top); SelectedMaxValue = ValueForX (maxThumb.Center.X); } UpdateTrackHighlight(); this.SetNeedsLayout(); if (ThumbChanged != null) ThumbChanged(this); return true; }
public override void TouchesBegan(NSSet touchesSet, UIEvent evt) { var touches = touchesSet.ToArray<UITouch> (); touchPhaseLabel.Text = "Phase:Touches began"; touchInfoLabel.Text = ""; var numTaps = touches.Sum (t => t.TapCount); if (numTaps >= 2){ touchInfoLabel.Text = string.Format ("{0} taps", numTaps); if (numTaps == 2 && piecesOnTop) { // recieved double tap -> align the three pieces diagonal. firstImage.Center = new PointF (padding + firstImage.Frame.Width / 2f, touchInfoLabel.Frame.Bottom + padding + firstImage.Frame.Height / 2f); secondImage.Center = new PointF (View.Bounds.Width / 2f, View.Bounds.Height / 2f); thirdImage.Center = new PointF (View.Bounds.Width - thirdImage.Frame.Width / 2f - padding, touchInstructionLabel.Frame.Top - thirdImage.Frame.Height); touchInstructionLabel.Text = ""; } } else { touchTrackingLabel.Text = ""; } foreach (var touch in touches) { // Send to the dispatch method, which will make sure the appropriate subview is acted upon DispatchTouchAtPoint (touch.LocationInView (View)); } }
public override void TouchesMoved (Foundation.NSSet touches, UIEvent evt) { swiped = true; UITouch touch = touches.AnyObject as UITouch; CGPoint currentPoint= touch.LocationInView (this); UIGraphics.BeginImageContext(Frame.Size); tempDrawImage.Image.Draw(new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height)); using (var context = UIGraphics.GetCurrentContext ()) { context.MoveTo(lastPoint.X, lastPoint.Y); context.AddLineToPoint(currentPoint.X,currentPoint.Y); context.SetLineCap (CGLineCap.Round); context.SetLineWidth (brush); context.SetStrokeColor (PaintColor.CGColor); context.SetBlendMode (CGBlendMode.Normal); context.StrokePath (); } tempDrawImage.Image = UIGraphics.GetImageFromCurrentImageContext (); tempDrawImage.Alpha = opacity; UIGraphics.EndImageContext (); lastPoint = currentPoint; }
public override void TouchesEnded (Foundation.NSSet touches, UIEvent evt) { if(!swiped) { UIGraphics.BeginImageContext(Frame.Size); tempDrawImage.Image.Draw (new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height)); using (var context = UIGraphics.GetCurrentContext ()) { context.SetLineCap (CGLineCap.Round); context.SetLineWidth (brush); context.SetStrokeColor(PaintColor.CGColor); context.MoveTo(lastPoint.X, lastPoint.Y); context.AddLineToPoint(lastPoint.X, lastPoint.Y); context.StrokePath (); context.Flush (); tempDrawImage.Image = UIGraphics.GetImageFromCurrentImageContext (); UIGraphics.EndImageContext(); } } UIGraphics.BeginImageContext(mainImage.Frame.Size); mainImage.Image.Draw(new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height), CGBlendMode.Normal, 1.0f); tempDrawImage.Image.Draw (new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height), CGBlendMode.Normal, opacity); mainImage.Image = UIGraphics.GetImageFromCurrentImageContext (); //tempDrawImage.Image = CreateImageFromColor (); UIGraphics.EndImageContext(); }
public void OnEvent(UIEvent aEvent) { switch(aEvent) { case UIEvent.MOUSE_CLICK: OnMouseClickEvent(); break; case UIEvent.MOUSE_DOUBLE_CLICK: OnMouseDoubleClickedEvent(); break; case UIEvent.MOUSE_DOWN: OnMouseDownEvent(); break; case UIEvent.MOUSE_ENTER: OnMouseEnterEvent(); break; case UIEvent.MOUSE_EXIT: OnMouseExitEvent(); break; case UIEvent.MOUSE_HOVER: OnMouseHoverEvent(); break; case UIEvent.ON_ACTION: OnActionEvent(); break; case UIEvent.SELECTED: OnSelectedEvent(); break; case UIEvent.UNSELECTED: OnUnselectedEvent(); break; } }
public override void OnRelayEvent(UIEvent aEvent, UIEventListener aListener) { if(aListener == null) { return; } switch(aEvent) { case UIEvent.MOUSE_CLICK: case UIEvent.MOUSE_DOUBLE_CLICK: if(aListener == m_Singleplayer) { SinglePlayerClicked(); } else if(aListener == m_Online) { OnlineClicked(); } else if(aListener == m_Options) { OptionsClicked(); } else if(aListener == m_Quit) { QuitClicked(); } else if(aListener == m_Back) { BackClicked(); } break; } }
public override void TouchesBegan (NSSet touches, UIEvent evt) { // hide keyboard name.ResignFirstResponder(); email.ResignFirstResponder(); comments.ResignFirstResponder(); }
public override void TouchesEnded( NSSet touches, UIEvent evt ) { if( Interceptor != null ) { Interceptor.TouchesEnded( touches, evt ); } }
public override void TouchesBegan(NSSet touches, UIEvent evt) { if (!Dragging) NextResponder.TouchesBegan(touches, evt); else base.TouchesBegan(touches, evt); }
public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesBegan(touches, evt); _thumbSelectedCallback(this); }
public override bool PointInside(CGPoint point, UIEvent uievent) { RemoveFromSuperview(); return(false); }
private void HandleMouseClick(UIEvent e) { _model.SetPropertyValue(_valueSelector, !_valueSelector.Compile()(_model)); }
public override void TouchesEnded(NSSet touches, UIEvent evt) { base.TouchesEnded(touches, evt); _textField.ResignFirstResponder(); }
public override void TouchesEnded(NSSet touches, UIEvent evt) { base.TouchesEnded(touches, evt); }
public override void TouchesCancelled(NSSet touches, UIEvent evt) { base.TouchesCancelled(touches, evt); _shouldNotDismiss = true; }
public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesBegan(touches, evt); _shouldNotDismiss = false; // reset }
public override void TouchesBegan(Foundation.NSSet touches, UIEvent evt) { base.TouchesBegan(touches, evt); TintAdjustmentMode = UIViewTintAdjustmentMode.Dimmed; }
public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesBegan(touches, evt); this.View.EndEditing(true); }
public override void TouchesCancelled(Foundation.NSSet touches, UIEvent evt) { base.TouchesCancelled(touches, evt); TintAdjustmentMode = UIViewTintAdjustmentMode.Automatic; }
protected override bool Handle(UIEvent e) { return(base.Handle(e) || e is DragStartEvent); }
public override void TouchesCancelled(NSSet touches, UIEvent evt) { this.AnimateToDeselectedState(); this.SendActionForControlEvents(UIControlEvent.TouchCancel); }
/// <summary> /// Triggers events on drawables in <paramref cref="drawables"/> until it is handled. /// </summary> /// <param name="drawables">The drawables in the queue.</param> /// <param name="e">The event.</param> /// <returns>Whether the event was handled.</returns> protected virtual bool PropagateBlockableEvent(IEnumerable <Drawable> drawables, UIEvent e) { var handledBy = drawables.FirstOrDefault(target => target.TriggerEvent(e)); if (handledBy != null) { var detail = handledBy is ISuppressKeyEventLogging?e.GetType().ReadableName() : e.ToString(); Logger.Log($"{detail} handled by {handledBy}.", LoggingTarget.Runtime, LogLevel.Debug); } return(handledBy != null); }
public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesBegan(touches, evt); State = UIGestureRecognizerState.Recognized; }
public override void TouchesBegan(NSSet touches, UIEvent evt) { base.TouchesBegan(touches, evt); OnTapped(); }
public override void TouchesCancelled(NSSet touches, UIEvent e) { }
public override void TouchesCancelled(NSSet touches, UIEvent evt) { base.TouchesCancelled(touches, evt); touching = false; SetNeedsDisplay(); }
public override void TouchesEnded(NSSet touches, UIEvent evt) { //TODO: set diferent background color SetNeedsDisplay(); }
public override void TouchesEnded(NSSet touches, UIEvent evt) { ZoomIn(touches); }
protected override bool Handle(UIEvent e) { base.Handle(e); return(false); }
public override void TouchesEnded(NSSet touches, UIEvent evt) { OnTouchesEnded.Fire(this, EventArgs.Empty); }
public override void TouchesCancelled(NSSet touches, UIEvent evt) { ZoomOut(); }
protected override bool Handle(UIEvent e) => base.Handle(e) || EventDelegate(e);
public override void TouchesBegan(NSSet touches, UIEvent evt) { }
private void OnAcceptButtonPressed(UIEvent e) { BnetFriendMgr.Get().AcceptInvite(this.m_invite.GetId()); }
public override UIView HitTest(CGPoint point, UIEvent uievent) { // All touches that are on this view (and not its subviews) are ignored return(HitTestOutsideFrame ? this.HitTestOutsideFrame(point, uievent) : base.HitTest(point, uievent)); }
private void DispatchUIEvent(enUIEventType eventType, PointerEventData pointerEventData) { UIEvent uiEvent = Singleton <UIEventManager> .GetInstance().GetUIEvent(); switch (eventType) { case enUIEventType.Down: if (m_onDownEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onDownEventID; uiEvent.eventParams = m_onDownEventParams; break; case enUIEventType.Click: PostWwiseEvent(m_onDownWwiseEvents); PostWwiseEvent(m_onClickedWwiseEvents); if (m_onClickEventID == enUIEventID.None) { if (onClick != null) { uiEvent.eventID = enUIEventID.None; uiEvent.eventParams = m_onClickEventParams; uiEvent.srcWidget = gameObject; onClick(uiEvent); } return; } uiEvent.eventID = m_onClickEventID; uiEvent.eventParams = m_onClickEventParams; break; case enUIEventType.HoldStart: if (this.m_onHoldStartEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onHoldStartEventID; uiEvent.eventParams = m_onHoldStartEventParams; break; case enUIEventType.Hold: if (m_onHoldEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onHoldEventID; uiEvent.eventParams = m_onHoldEventParams; break; case enUIEventType.HoldEnd: if (m_onHoldEndEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onHoldEndEventID; uiEvent.eventParams = m_onHoldEndEventParams; break; case enUIEventType.DragStart: if (m_onDragStartEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onDragStartEventID; uiEvent.eventParams = m_onDragStartEventParams; break; case enUIEventType.Drag: if (m_onDragEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onDragEventID; uiEvent.eventParams = m_onDragEventParams; break; case enUIEventType.DragEnd: if (m_onDragEndEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onDragEndEventID; uiEvent.eventParams = m_onDragEndEventParams; break; case enUIEventType.Drop: if (m_onDropEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onDropEventID; uiEvent.eventParams = m_onDropEventParams; break; case enUIEventType.Up: if (m_onUpEventID == enUIEventID.None) { return; } uiEvent.eventID = m_onUpEventID; uiEvent.eventParams = m_onUpEventParams; break; } uiEvent.srcFormScript = belongedFormScript; uiEvent.srcWidgetBelongedListScript = belongedListScript; uiEvent.SrcWidgetIndexInBelongedList = indexInList; uiEvent.srcWidget = gameObject; uiEvent.srcWidgetScript = this; uiEvent.pointerEventData = pointerEventData; if (eventType == enUIEventType.Click && onClick != null) { onClick(uiEvent); } base.DispatchUIEvent(uiEvent); }
private void OnDeclineButtonPressed(UIEvent e) { BnetFriendMgr.Get().DeclineInvite(this.m_invite.GetId()); }
public override void TouchesBegan(NSSet touches, UIEvent evt) { this.EndEditing(true); }
public override void TouchesMoved(NSSet touches, UIEvent evt) { base.TouchesMoved(touches, evt); DispatchDateSelection(touches); }