Esempio n. 1
0
 static Rect ResizeTop(Rect currentRect, ResizeHandleState handleState, Event currentEvent, int minimumWidth, int minimumHeight)
 {
     currentRect.height = currentRect.height - (currentEvent.mousePosition.y - handleState.origin.y);
     currentRect.height = Mathf.Max(currentRect.height, minimumHeight);
     currentRect.y      = handleState.startingRect.yMax - currentRect.height;
     return(currentRect);
 }
Esempio n. 2
0
 static Rect ResizeLeft(Rect currentRect, ResizeHandleState handleState, Event currentEvent, int minimumWidth, int minimumHeight)
 {
     currentRect.width = currentRect.width - (currentEvent.mousePosition.x - handleState.origin.x);
     currentRect.width = Mathf.Max(currentRect.width, minimumWidth);
     currentRect.x     = handleState.startingRect.xMax - currentRect.width;
     return(currentRect);
 }
Esempio n. 3
0
 static Rect ResizeRight(Rect currentRect, ResizeHandleState handleState, Event currentEvent, int minimumWidth, int minimumHeight)
 {
     currentRect.width = handleState.startingRect.width + (currentEvent.mousePosition.x - handleState.origin.x);
     return(currentRect);
 }
Esempio n. 4
0
 static Rect ResizeBottom(Rect currentRect, ResizeHandleState handleState, Event currentEvent, int minimumWidth, int minimumHeight)
 {
     currentRect.height = handleState.startingRect.height + (currentEvent.mousePosition.y - handleState.origin.y);
     return(currentRect);
 }