Exemple #1
0
 bool OnGraphDrag(EMouseButton button, Vector2 mousePosition, Vector2 delta)
 {
     if (button == EMouseButton.left)
     {
         Rect rect = SelectionRect.LocalRect;
         rect.size = RootCanvas.CalculateLocalPosition(mousePosition) - rect.position;
         SelectionRect.LocalRect = rect;
         return(true);
     }
     return(false);
 }
Exemple #2
0
 bool OnGraphDragBegin(EMouseButton button, Vector2 mousePosition)
 {
     if (button == EMouseButton.left)
     {
         Rect rect = SelectionRect.LocalRect;
         rect.size               = Vector2.zero;
         rect.position           = RootCanvas.CalculateLocalPosition(mousePosition);
         SelectionRect.LocalRect = rect;
         SelectionRect.Visible   = true;
         SelectComment(null, false);
         return(true);
     }
     return(false);
 }