private void OnPointerUp(PointerEventArgs e) { BSplitterCJsInterop.releasePointerCapture(jsRuntimeCurrent, bSplitter.bsbSettings.ID, e.PointerId); DragMode = false; OnDragEnd?.Invoke(bSplitter.bsbSettings.index, (int)e.ClientX, (int)e.ClientY); }
public bool OnEndDrag(PointerEventData eventData) { if (_isDraggingPoint) { OnDragEnd?.Invoke(this, new EventArgs(eventData, isPointEvent: true)); } else if (_isDraggingOutHandle) { OnDragEnd?.Invoke(this, new EventArgs(eventData, isOutHandleEvent: true)); } else if (_isDraggingInHandle) { OnDragEnd?.Invoke(this, new EventArgs(eventData, isInHandleEvent: true)); } else { return(!IsEventOutside(eventData)); } _isDraggingPoint = false; _isDraggingOutHandle = false; _isDraggingInHandle = false; return(true); }
internal void DispatchEvent(PopupEventArgs eventArgs) { switch (eventArgs.Type) { case "close": OnClose?.Invoke(eventArgs); break; case "drag": OnDrag?.Invoke(eventArgs); break; case "dragend": OnDragEnd?.Invoke(eventArgs); break; case "dragstart": OnDragStart?.Invoke(eventArgs); break; case "open": OnOpen?.Invoke(eventArgs); break; } }
void _handle_up(ICogaManager coga) { isMouseDown = false; if (isDragging) { OnDragEnd?.Invoke(Parent); coga.UnlockHover(); } else { if (LongClickingEnabled) { // With long clicking enabled, allow early cancel out and // only long click past the const delay. if (mouseDownTime < MouseClickDelay) { _update_click(coga); } else { OnLongClick?.Invoke(Parent); OnEndClicking?.Invoke(Parent); } } else { // If we don't need to worry about the long click, // just always click. _update_click(coga); } } }
public virtual void DragEnd(UIDragEndEvent e) { OnDragEnd?.Invoke(e, this); if (PropagationRule.HasFlag(PropagationFlags.DragEnd)) { Parent?.DragEnd(e); } }
void MyDragEnd(UIDragEventArgs args) { if (Debug) { Console.WriteLine($"DR: {DataItem} END"); } OnDragEnd?.Invoke(args, DataItem); }
public void OnEndDrag(PointerEventData eventData) { SfxManager.Instance.Play(SfxType.UI_DragEnd); OnDragEnd?.Invoke(); selectedObject = null; Destroy(this.gameObject); }
private IEnumerator InvokeOnDragEndEvent() { //Wait until the end of the frame so that the OnHandleFinish event doesn't overlap with the OnMouseUp event yield return(new WaitForEndOfFrame()); //After dragging the handle, release the cursor EditorManager.Instance.ReleaseCursor(); //Notify all listeners that the selection drag box was disabled OnDragEnd?.Invoke(); }
public void OnEndDrag(PointerEventData eventData) { ExecOnEnabledAndFocus(() => { OnDragEnd?.Invoke(eventData); }); SetUnfocus(true); _isDragged = false; }
private void AdornedElement_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (dragging) { dragging = false; AdornedElement.ReleaseMouseCapture(); e.Handled = true; OnDragEnd?.Invoke(this, new EventArgs()); } }
private void Drag() { if (!isActive) { return; } if (!isUse) { assembleManager.OnSelect.Invoke(this); PrepareAssmeble(); } else if (prepareFinish) { if (Input.GetMouseButtonDown(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; containerBase = null; if (Physics.Raycast(ray, out hit, 100) && hit.transform.name == obj.name) { screenPosition = Camera.main.WorldToScreenPoint(obj.transform.position); mScreenPosition = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPosition.z); offset = obj.transform.position - Camera.main.ScreenToWorldPoint(mScreenPosition); isButtonDown = true; } if (OnDragBegin != null) { OnDragBegin.Invoke(); } } if (Input.GetMouseButton(0) && isButtonDown) { mScreenPosition = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPosition.z); obj.transform.position = Camera.main.ScreenToWorldPoint(mScreenPosition) + offset; } if (Input.GetMouseButtonUp(0) && isButtonDown) { isUse = false; isActive = false; isButtonDown = false; tempContainer = FindContainer(); if (JugeAssmeble(tempContainer)) { BeginAssmeble(tempContainer); } if (OnDragEnd != null) { OnDragEnd.Invoke(this, containerBase); } } } }
public void OnEndDrag(PointerEventData eventData) { var direction = eventData.position - startPosition; startPosition = Vector2.zero; if (direction.y >= 0) { OnDragEnd?.Invoke(Direction.Up); } else { OnDragEnd?.Invoke(Direction.Down); } }
static int SetDragEndCallBack(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); ScrollRectExtend obj = (ScrollRectExtend)ToLua.CheckObject <ScrollRectExtend>(L, 1); OnDragEnd arg0 = (OnDragEnd)ToLua.CheckDelegate <OnDragEnd>(L, 2); obj.SetDragEndCallBack(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
protected virtual Task HandleDragEnd(DragEventArgs args) { return(OnDragEnd.InvokeAsync(args)); }
protected virtual void RaiseOnDragEnd(DragEndEvent arg) { OnDragEnd?.Invoke(this, arg); }
protected void Invoke_OnDragEnd(object sender, DragArgs args) { OnDragEnd?.Invoke(sender, args); }
public void StopDragging() { OnDragEnd?.Invoke(); }
// ReSharper disable once MemberCanBePrivate.Global protected void OnDragFinish(Polygon polygon) { OnDragEnd?.Invoke(polygon); UpdatePointsAsync(CurrentPolygon); }
public void NotifyDragEnd(DragEndEvent eventArgs) { OnDragEnd?.Invoke(this, eventArgs); }
private void Timeline_MouseUp(object sender, MouseEventArgs e) { _dragging = false; OnDragEnd?.Invoke(this, null); }
public void OnEndDrag(PointerEventData eventData) { OnDragEnd?.Invoke(); }
public void TriggerOnDragEnd(Widget widget, PointerEventData eventData) { OnDragEnd?.Invoke(widget, eventData); }
internal virtual void DoDragEnd() { OnDragEnd?.Invoke(); }
internal void DispatchEvent(Map map, HtmlMarkerJsEventArgs eventArgs) { if (eventArgs.Options != null) { var popupOptions = Options.Popup; Options = eventArgs.Options; Options.Popup = popupOptions; } switch (eventArgs.Type) { case "click": OnClick?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "contextmenu": OnContextMenu?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "dblclick": OnDblClick?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "drag": OnDrag?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "dragend": OnDragEnd?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "dragstart": OnDragStart?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "keydown": OnKeyDown?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "keypress": OnKeyPress?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "keyup": OnKeyUp?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "mousedown": OnMouseDown?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "mouseenter": OnMouseEnter?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "mouseleave": OnMouseLeave?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "mousemove": OnMouseMove?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "mouseout": OnMouseOut?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "mouseover": OnMouseOver?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; case "mouseup": OnMouseUp?.Invoke(new HtmlMarkerEventArgs(map, eventArgs.Type, this)); break; } }
public void OnEndDrag(PointerEventData eventData) => OnDragEnd?.Invoke(this, new PointerEventArgs(eventData));