コード例 #1
0
 public static bool Released(this HUMEvents.Data.Left left)
 {
     HUMEvents.clickCount--;
     return(left.mouse.e.button == 0 && left.mouse.e.type == EventType.MouseUp);
 }
コード例 #2
0
 public static bool Clicked(this HUMEvents.Data.Left left)
 {
     HUMEvents.clickCount++;
     return(left.mouse.e.button == 0 && left.mouse.e.type == EventType.MouseDown);
 }
コード例 #3
0
        /// <summary>
        /// A horizontal handle for manipulating a rects size.
        /// Changes the cursor when inside the left of rect.
        /// Clicking and holding the left mouse will return a new value based on the mouse movement.
        /// </summary>
        public static Rect Resizer(this HUMEvents.Data.Left left, Rect rect, Vector2 minSize, Vector2 maxSize, float handleWidth, bool mouseDown, ref bool isUsing)
        {
            var handleRect = new Rect(rect.x - (handleWidth / 2), rect.y, handleWidth, rect.height);

            return(Resizer(left.mouse, handleRect, rect, minSize, maxSize, HUMEvents_Children.Side.Left, mouseDown, ref isUsing));
        }