protected override bool OnDragStart(DragStartEvent e) { changeHandler?.BeginChange(); return(true); }
protected override bool OnDragStart(DragStartEvent e) => placementControlPoint != null;
public override bool OnToolDragStart(DragStartEvent e) { var mousePos = ToSpaceOfOtherDrawable(ToLocalSpace(e.ScreenSpaceMouseDownPosition), Editor.NotesTimeline.NoteSelectionIndicators); var selectedNoteTime = 0d; var selectedNoteCoord = Vector2.Zero; foreach (var noteAndTime in NotesTimeline.SelectedNoteToTime) { var note = noteAndTime.Key; var noteToTimelineNote = Editor.NotesTimeline.NoteToTimelineNote; if (noteToTimelineNote.TryGetValue(note, out var timelineNote) && IsMouseOnTimelineNote(mousePos, timelineNote)) { ToDrag = SelectToolDragState.DragTimelineNote; OldHitTime = selectedNoteTime = note.HitTime; if (note is HoldNote holdNote && IsMouseOnEndOfHoldNote(mousePos, holdNote)) { ToDrag = SelectToolDragState.DragHoldNoteEndTime; OldEndTime = holdNote.EndTime; OldFirstVisibleTick = NotesTimeline.FirstVisibleTick; } break; } } if (ToDrag == SelectToolDragState.None) { foreach (var note in GetVisibleStoryNotes()) { if (IsMouseOnNote(e.ScreenSpaceMousePosition, note)) { if (note is HoldNote holdNote) { continue; } // Temp fix to stop dragging holdnote preview ToDrag = SelectToolDragState.DragNote; OldCoords = selectedNoteCoord = note.Coordinates; break; } } } switch (ToDrag) { case SelectToolDragState.DragHoldNoteEndTime: case SelectToolDragState.DragTimelineNote: foreach (var noteAndTime in NotesTimeline.SelectedNoteToTime) { var note = noteAndTime.Key; TimelineNoteToDragPointDelta[note] = GetGameTimeAtMouse(e.ScreenSpaceMouseDownPosition) - selectedNoteTime; } break; case SelectToolDragState.DragNote: foreach (var noteAndTime in NotesTimeline.SelectedNoteToTime) { var note = noteAndTime.Key; NoteToDragPointDelta[note] = note.Coordinates - selectedNoteCoord; } break; case SelectToolDragState.None: break; } return(true); }
protected override bool OnDragStart(DragStartEvent e) => CurrentlyDragging = true;
protected override bool OnDragStart(DragStartEvent e) { OperationStarted?.Invoke(); return(true); }
protected override bool OnDragStart(DragStartEvent e) { Vector2 posDiff = e.MouseDownPosition - e.MousePosition; return(Math.Abs(posDiff.X) > Math.Abs(posDiff.Y)); }
protected override bool OnDragStart(DragStartEvent e) { isDragging = true; return(base.OnDragStart(e)); }
protected override bool OnDragStart(DragStartEvent e) => true;
protected override bool OnDragStart(DragStartEvent e) { nativeDragPosition = e.ScreenSpaceMousePosition; draggedItem = items.FirstOrDefault(d => d.IsDraggable); return(draggedItem != null || base.OnDragStart(e)); }
protected override bool OnDragStart(DragStartEvent e) { handleMouseInput(e.ScreenSpaceMousePosition); return(true); }
protected override bool OnDragStart(DragStartEvent e) => e.Button == MouseButton.Left;
public override bool OnDragStart(DragStartEvent e) { return(onDragStart != null && onDragStart(e)); }
protected override bool OnDragStart(DragStartEvent e) { this.FadeIn(250, Easing.OutQuint); return(true); }
protected override bool OnDragStart(DragStartEvent e) { return(true); }
protected override bool OnDragStart(DragStartEvent e) { dragOffset = e.MousePosition[(int)ScrollDirection] - Position[(int)ScrollDirection]; return(true); }
protected override bool OnDragStart(DragStartEvent e) { AddUserVertex(e.MousePosition); DrawText.Text = "Custom Smoothed Drawn: Smoothed=" + NumVertices + ", Raw=" + NumRaw; return(true); }
protected override bool OnDragStart(DragStartEvent e) => AllowDrag;
protected override bool OnDragStart(DragStartEvent e) { // This text box is intended to be "read only" without actually specifying that. // As such we don't want to allow the user to select its content with a drag. return(false); }
private void startArrangement(RearrangeableListItem <TModel> item, DragStartEvent e) { currentlyDraggedItem = item; screenSpaceDragPosition = e.ScreenSpaceMousePosition; }